Skip to content

Even though the requested team has maintain permissions on the repo, action fails complaining about it #355

@pmalek

Description

@pmalek

🐞 Describe the bug

Even though the requested team (TEAM_REVIEWERS: Kong/k8s-maintainers) has maintain permissions

Image

the action complains:

Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the repository.

https://github.com/Kong/gateway-operator/actions/runs/15050038501/job/42302332855#step:3:28

Repository Info
Slug		: charts
Owner		: Kong
Https Url	: https://github.com/Kong/charts
Branch		: default
	
Found existing PR 1312
Locally syncing file(s) between source and target repository
Source is directory
Pushing changes to target repository
Overwriting existing PR
Notice: Pull Request #1312 created/updated: https://github.com/Kong/charts/pull/1312
Adding label(s) "sync" to PR
Adding team reviewer(s) "Kong/k8s-maintainers" to PR
Error: Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the Kong/charts repository.

📚 To reproduce

Set a team with maintain permissions as TEAM_REVIEWERS.

💡 Expected behavior

No error.

🖼️ Screenshots

No response

⚙️ Environment

https://github.com/BetaHuhn/repo-file-sync-action/releases/tag/v1.21.1

📋 Additional context

No response

Activity

adrianriepl

adrianriepl commented on Jul 24, 2025

@adrianriepl

Have you tried specifying the team without the owner in front? So instead of Kong/k8s-maintainers use k8s-maintainers only when specifying TEAM_REVIEWERS.

When I did that I got the following error:

Validation Failed: "Could not resolve to a node with the global id of 'XXXX'."

This error however, is a permission issue as my app installation token did not have the permission to read teams, which actually is the Members (read) permission.

I think adding these insights to the README would be great.

pmalek

pmalek commented on Jul 25, 2025

@pmalek
Author

@adrianriepl

It seems that I'm also getting the same error:

Adding team reviewer(s) "k8s-maintainers" to PR
Error: Validation Failed: "Could not resolve to a node with the global id of 'T_kwDOAA6vcM4AdUim'."

but my PAT is also set to have the read permissions on members:

Image
adrianriepl

adrianriepl commented on Jul 25, 2025

@adrianriepl

The error you get now indicates that there is a permission issue.

You are using a "classic" PAT, correct? Because I have selected the permission below and then it worked. You might need to use a fine-grained personal access token. If you change to this type of PAT, make sure to set IS_FINE_GRAINED too.

Image

I am not sure, which permission corresponds to the same permission in a classic PAT.

Also don't know if one of these apply to your org:

Image
pmalek

pmalek commented on Aug 1, 2025

@pmalek
Author

You are using a "classic" PAT, correct?

That is true.

AFAIR the issue with fine-grained tokens was that it required the user to be added to the org which I couldn't do at the time.

In any case I left the team reviewers unset. I believe that the error should be more explicit to give users information on what's actually the problem here rather than just dumping the ambiguous error like Could not resolve to a node with the global id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pmalek@adrianriepl

        Issue actions

          Even though the requested team has `maintain` permissions on the repo, action fails complaining about it · Issue #355 · BetaHuhn/repo-file-sync-action