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

Checking for user permissions will fail if user is a member of the nested team #120

Open
@yafanasiev

Description

@yafanasiev

Hi! First of all, thanks for a wonderful action. We do use it a lot.

We hit an issue where users who have write access to the repository can't trigger slash commands whenpermission property is set towrite. After investigation, I found out that the issue occurs if user has permissions on repository through the nested team (so the teammain is assignedwrite permissions on the repo, it has sub-teamsub, and user is a member of teamsub). I tried to reproduce the calls that actions does locally (specifically

asyncgetActorPermission(repo:Repository,actor:string):Promise<string>{
and it appers that for those users Github's API returns empty reponse. After reaching out to Github support, they acknowledge this as a intendent behaviour for now, to quote them

the collaborators relation only returns first-level users (users that are directly added to repository) or members of the team that is added to the repository, but not nested teams

and this is something that could change in the future, but not right now.
I do understand that this is something relatively specific to our use case, but I am adding this in case someone hits the same problem and does not waste as much time as we did. I also checkedREST API version of this request, and it returns the correct list of collaborators. This could server as a substitute for current implementation, but would require getting all of the collaborators and then filtering by current actor name, which is not quite neat as the GraphQL version. So it is up to mainteners to make the call, but at least this could be added to README somewhere to save others some time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp