Description
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):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.