Skip to content

ci: request CODEOWNERS reviewers on staging-sync PRs#10422

Merged
maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:codeowners-sync-reviewers
May 13, 2026
Merged

ci: request CODEOWNERS reviewers on staging-sync PRs#10422
maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:codeowners-sync-reviewers

Conversation

@maliberty
Copy link
Copy Markdown
Member

GitHub's CODEOWNERS auto-request silently skips PRs opened from an org-owned fork (the staging mirror), even though it fires normally for user forks. The sync workflow's PRs were never getting owners assigned, so branch protection blocked merges with no reviewers in flight.

Add a post-send_pr step that parses CODEOWNERS from the PR base branch, matches changed files, and explicitly requests the resulting teams and users via gh pr edit --add-reviewer. Chunked at 15 to respect the request-reviewers endpoint cap.

GitHub's CODEOWNERS auto-request silently skips PRs opened from an
org-owned fork (the staging mirror), even though it fires normally for
user forks. The sync workflow's PRs were never getting owners assigned,
so branch protection blocked merges with no reviewers in flight.

Add a post-send_pr step that parses CODEOWNERS from the PR base branch,
matches changed files, and explicitly requests the resulting teams and
users via `gh pr edit --add-reviewer`. Chunked at 15 to respect the
request-reviewers endpoint cap.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty requested a review from a team as a code owner May 13, 2026 20:49
@maliberty maliberty requested a review from eder-matheus May 13, 2026 20:49
@maliberty maliberty self-assigned this May 13, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

System Python on ubuntu-latest is PEP 668 externally-managed, so the
bare `pip install pathspec` failed the new CODEOWNERS-request step with
`externally-managed-environment`. Create a venv under /tmp and install
into it instead.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dead22978d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/github-actions-on-label-create.yml
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

`gh pr edit --add-reviewer` runs a GraphQL query that touches team
login/name/slug fields, all of which require read:org. Our tokens
have repo+workflow but not read:org, so the step fails with "Your
token has not been granted the required scopes."

Switch to POST /repos/{owner}/{repo}/pulls/{n}/requested_reviewers,
which only writes and works with the existing pull-requests:write
scope. Send team_reviewers (bare slug, not org/slug) and reviewers in
separate arrays, each chunked to 15.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@openroad-ci openroad-ci force-pushed the codeowners-sync-reviewers branch from 4a7fcea to 6cdf883 Compare May 13, 2026 21:14
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Copy Markdown
Member Author

This is a ugly hack to workaround what appears to be an undocumented GitHub limitation. I've filed a ticket but in the meantime this should generate reviews for the PII use case. The ordinary user fork works fine already.

@maliberty maliberty merged commit 0d2df95 into The-OpenROAD-Project:master May 13, 2026
13 of 16 checks passed
@maliberty maliberty deleted the codeowners-sync-reviewers branch May 13, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant