You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Actions GITHUB_TOKEN does not have access to organization permissions, so you'll need to use a PAT or GitHub App token and pass that to your actions/github-script.
Describe the bug
Tried the same url in Postman using the rest api and it returns me 200 while the script returns 400
const members = await github.rest.teams.listMembersInOrg({
org: context.repo.owner, --- does this need to be changed?
team_slug: ''
});
Results from actions:
request: { method: 'GET', url: 'https://api.github.com/orgs/<orgName>/teams/<team-slug>/members', // ---> this is the final url its hitting headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/20.18.0 (darwin; arm64)', authorization: 'token [REDACTED]' }, request: { agent: [Agent], hook: [Function: bound bound register] } }
response:
data: { message: 'Not Found', documentation_url: 'https://docs.github.com/rest/teams/members#list-team-members', status: '404' }
Request in Postman client
https://api.github.com/orgs//teams//members
To Reproduce
run the above script and also the api in postman to see the diff in result.
[using script v6](uses: actions/github-script@v6)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: