-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
team-reviewers
option doesn't work anymore
#1638
Comments
Hi @aswen No changes have been made to the action recently that could cause this. If it was working until five days ago then I think some changes have been made to teams for your org. Perhaps check with your GitHub org admin to find out what changed. The other possibility is that the permissions of your PAT contained in |
Hi guys, we have the same issue. I figured it is some change in Github, that it does not recognize private teams anymore. :-/ |
Ok, so it sounds like GitHub may have made some permissions related changes. Could you try giving the PAT you are using with the action the |
We are using the default |
It's possible that GitHub closed a security hole where you could "find" private teams. I would suggest trying to use a PAT, issued on a user that belongs to the org. |
I also tried
and I got |
I have the same issue, except that my repo nor team are private. The team was added to the repo and has Like |
peter-evans/create-pull-request#1638 Will come back if there's any progress in that issue
We're experiencing the same issue with some of our actions, but they will sometimes go through. Looking at our most recent 25 runs, it worked 10 times. When it doesn't go through the message is the same as mentioned here: Given that it sometimes works I doubt it's a permission change from GH 🤔 |
I've not had time to look into this issue in depth, but I'm fairly confident that the cause is either a GitHub bug, or they have deliberately changed the permissions model. The latter of those possibilities is far more likely. I've experienced them making permissions model changes a few times over the last couple of years. |
@harpener What you tried will not work because the default If anyone tries the possible solution I commented here, please let me know if it worked.
I understand that some don't want to use a PAT, but you might have no other choice if GitHub has changed the permissions model to require |
Chiming in to say we've tried with a PAT, and we're still seeing the same issue. Using the same token with the |
|
@peter-evans you can find the code here and the logs here I've tried multiple PAT's, including my own which is an admin for our org and works with the |
@davejrt I've tried to reproduce the issue and your working solution with I created a secret team in an org called You can see my tests here:
Additionally, when you read the docs about secret teams it doesn't make any sense that you could add a secret team as reviewers to a pull request. I don't even seem to be able to do that manually through the UI. If I've misunderstood please let me know, but it seems to me that if this was working before it was probably a mistake on GitHub's part to allow it, and now it's been fixed. |
@peter-evans I should mention that in my case the team is not secret, but visible to everyone in our organization. Only the repository is private to the outside world. |
Thanks @harpener, I misunderstood the conditions under which this was occurring. I've got it now so I'll test some more. |
Perhaps this is the cause. Did GitHub stop allowing requesting team reviewers for private repositories under the GitHub Free billing plans recently? I can't find any public announcement about this if they did change it recently. |
Good to know. But I am told we are using Github Team subscription: https://docs.github.com/en/get-started/learning-about-github/githubs-products#github-team |
Here is the workflow I used with gh to create a PR with a team reviewer. Our repo is public, we have a github teams plan. I created a new token only with
|
I've opened a GitHub support case because something is clearly wrong with the API and it seems difficult to reproduce and debug. In the meantime, I'll look into using the GraphQL API to request team reviewers, since that appears to work. |
This comment was marked as outdated.
This comment was marked as outdated.
For the record, I tried it with default
The PR was created, but review was not requested from given team. |
I received a response to the support ticket. This is the explanation given.
So what that suggests is, the users who are experiencing this issue are trying to request a review from a team that is "non-existent". It also suggests that users who suddenly had this issue in their workflow never had My guess as for why a team would be "non-existent" for the majority of cases affected by this is that the team is being specified as Please specify teams like this: - name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
team-reviewers: |
dev-experience
developers
qa-team I might make an update to the action to remove the leading |
I remember testing this as well, it returned a different kind of error about actually non-existing object. The organization prefix was necessary for us before. |
The error looked like the one in this issue: #155 (comment) |
@harpener You are getting that error because you are using the default Summary:
If you don't specify the teams correctly without the leading
If you don't use a PAT with
|
This comment was marked as resolved.
This comment was marked as resolved.
Github recently changed their API, which no longer allows(reqiures) the org prefix on team reviewers. Response from github: ``` I took a look and it does seem like we made changes to the API endpoint about the time the report was first made in the peter-evans/create-pull-request#1638 15). Before then, we return a 201 response also when the requested reviewer or team is non-existent. This response is incorrect, as we should be returning a 422 -- the change on the endpoint was targeted at fixing that behavior. ``` and full issue peter-evans/create-pull-request#1638 ## Test plan Tested on feature branch https://github.com/sourcegraph/sourcegraph/actions/runs/4577519273/jobs/8083025675
I've made a couple of changes that I've released in
|
This updates the action from v4 to v5 and replaces the use of `team-reviewers` with `reviewers`. Background: - peter-evans/create-pull-request#1638 - peter-evans/create-pull-request#155
Subject of the issue
Since 5 days ago the option to request a review from any of the owners, or later, the members of a team doesn't work anymore with the following error:
Steps to reproduce
Create a PR with:
Later, I tried with the same as above, but:
But that failed with same error. I also tried other things like
team-reviewers: team-name
and:All of them failed.
The text was updated successfully, but these errors were encountered: