Skip to content

Conversation

@alongosz
Copy link
Member

@alongosz alongosz commented Nov 7, 2025

🎫 Issue n/a

Related PRs:

Description:

Note

Attempting to adjust the workflow expanding team review requests into separate members request. A while ago GitHub API started returning

HTTP 422: Review cannot be requested from pull request author

when PR author was in the list of members a review was requested from. Seems like breaking change, but logical. We need to filter out PR author from the members list when processing this workflow.

Another issue that gave me a bit of headache was

HTTP 422: Invalid request. (https://api.github.com/repos/ibexa/rest/pulls/205/requested_reviewers)

"reviewers" wasn't supplied.

When executing gh pr edit .... Seems the culprit was removal of a team. Something is broken or changed together with the other API change and it's not possible to remove a team, if this is the only reviewer we want to remove.

I've opened an issue with GH CLI. It has been fixed so do we get the current solution as-is or we wait for the release of GH?

For the time being, for deleting team reviewer I swithed to raw REST API. Tested via https://github.com/ibexa/shopping-list/pull/14 and seems to be working.

@alongosz alongosz force-pushed the adjust-expand-team-reviewers-workflow branch 2 times, most recently from d4b2252 to 6f8c7ce Compare November 7, 2025 16:41
@alongosz alongosz force-pushed the adjust-expand-team-reviewers-workflow branch from 6f8c7ce to 78148d0 Compare November 7, 2025 17:43
@alongosz alongosz force-pushed the adjust-expand-team-reviewers-workflow branch 2 times, most recently from 2ef0812 to 2222936 Compare November 7, 2025 17:54
@alongosz alongosz changed the title [GHA][Expand Team Reviewers] Aligned the workflow with GitHub API changes [Expand Team Reviewers] Aligned the workflow with GitHub API changes Nov 7, 2025
@alongosz alongosz marked this pull request as ready for review November 7, 2025 18:36
Comment on lines +50 to +56
exit_code=$?
if [[ $exit_code -ne 0 ]]
then
echo "Error: Failed to fetch team members"
echo "$members" # contains the error message
exit $exit_code
fi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Without this, the workflow tries to input error message as a list of reviewers, which is at least a waste of GHA tokens (aka Żappsy :D)

@alongosz alongosz requested review from a team and removed request for a team November 7, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants