Git Product home page Git Product logo

Comments (3)

choldgraf avatar choldgraf commented on August 24, 2024 1

yeeeees!

bask in the glory of automated team sync issues: 2i2c-org/team-compass#52

from ghapi.

hamelsmu avatar hamelsmu commented on August 24, 2024

@choldgraf do you think there is a bug in your script? In this line
It has:

api = GhApi(token=github_token())

shouldn't it be

api = GhApi(token=token)

😄 It would be wonderful if this fixes the issue. LMK

from ghapi.

hamelsmu avatar hamelsmu commented on August 24, 2024

The code of github_token() is this

def github_token():
    "Get GitHub token from `GITHUB_TOKEN` env var if available, or from `github` context"
    return os.getenv('GITHUB_TOKEN', context_github.get('token', None))

This means you are trying to getting the GITHUB_TOKEN [1] from the actions runner (due to the bug above), which you don't want - basically you want to grab YOUR token you put in ACCESS_TOKEN not the one from the Actions Runner, The one in the Actions Runner has locked down permissions and won't be able to do what you want. This will definitely solve your problem.

[1] I don't think you are getting any token b/c in create_team_sync.yaml you are not defining GITHUB_TOKEN its just that you have a bug that is trying to grab the wrong environment variable.

from ghapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.