Skip to content

Fix validate-pr-target-branch workflow for non-user actors like Copilot#37953

Merged
AndriySvyryd merged 1 commit intomainfrom
copilot/fix-user-not-found-behavior
Mar 19, 2026
Merged

Fix validate-pr-target-branch workflow for non-user actors like Copilot#37953
AndriySvyryd merged 1 commit intomainfrom
copilot/fix-user-not-found-behavior

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

  • Case-insensitive bot detection: All isBot comparisons now operate on the lowercased username
  • Early return on unknown users: 404 from the permissions API (non-user accounts) now returns early instead of assuming external contributor. Other permission errors also bail out to avoid false-positive PR closures.

…ive Copilot check

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the validate-pr-target-branch GitHub Actions workflow to avoid incorrectly treating non-user actors (e.g., Copilot) as external contributors, preventing erroneous PR closures while keeping the release-branch targeting policy intact.

Changes:

  • Makes bot detection case-insensitive by lowercasing usernames before comparison.
  • Changes permission-check error handling to bail out (including on 404) instead of assuming “external contributor” on API errors.

You can also share your feedback on Copilot code review. Take the survey.

@AndriySvyryd AndriySvyryd marked this pull request as ready for review March 19, 2026 00:53
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner March 19, 2026 00:53
@roji roji assigned AndriySvyryd and unassigned roji Mar 19, 2026
@AndriySvyryd AndriySvyryd merged commit f9393e7 into main Mar 19, 2026
14 of 16 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/fix-user-not-found-behavior branch March 19, 2026 17:01
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.

4 participants