Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

What permissions are required for github.rest.teams.listMembersInOrg?#481

Unanswered
johnbatclari asked this question inQ&A
Discussion options

I'm struggling to find what permissions are required to be able to makegithub.rest.teams.listMembersInOrg calls. I'm currently getting 404's when a workflow is triggered by apull_request, though I can successfully execute the workflow if I run it usingnetkos/act locally. I've searched docs without success. Any help would be much appreciated!

Currently configured permissions:

permissions:contents:readpull-requests:write

And the call in question:

      -name:Check for approvalsid:needs-approvalsuses:actions/github-script@v7with:github-token:${{ secrets.GITHUB_TOKEN }}script:|            const { data: approvalTeamMembers } = await github.rest.teams.listMembersInOrg({                org: 'myorg',                team_slug: 'myteam'            });            console.debug(`Team members: ${approvalTeamMembers.map(member => member.login).join(', ')}`);
You must be logged in to vote

Replies: 1 comment

Comment options

👋 This would require the"Members" organization permissions (read) permission per:https://docs.github.com/en/rest/orgs/members?apiVersion=2022-11-28#list-organization-members

The ActionsGITHUB_TOKEN does not have organization permissions, so you'd need to use a personal access token (PAT) or GitHub App token.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@johnbatclari@joshmgross

[8]ページ先頭

©2009-2025 Movatter.jp