Skip to content

fix: use permissions: write in bonk instead of CODEOWNERS#30926

Merged
mvvmm merged 5 commits into
productionfrom
fix/bonk-auto-review-codeowners
May 19, 2026
Merged

fix: use permissions: write in bonk instead of CODEOWNERS#30926
mvvmm merged 5 commits into
productionfrom
fix/bonk-auto-review-codeowners

Conversation

@mvvmm
Copy link
Copy Markdown
Contributor

@mvvmm mvvmm commented May 19, 2026

Summary

The bonk-auto-review job was failing with exit code 1 for contributors who are codeowners via team membership (e.g. jhutchings1). The ask-bonk action's internal permissions: CODEOWNERS check does a flat string match against the CODEOWNERS file and does not resolve GitHub team membership, so it rejects valid codeowners listed via team references like @cloudflare/product-owners. Cloudflare-Studio/ask-bonk#173

Replaces permissions: CODEOWNERS with permissions: write in the bonk steps. The write check uses GitHub's actual permissions API, which correctly resolves team membership. Generally speaking, all CODEOWNERS should have write access. This also serves as defense-in-depth alongside the job-level if: condition which gates on needs.check-codeowner.outputs.is-codeowner == 'true'.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/content-engineering, @kodster28, @mvvmm, @colbywhite, @ahaywood, @MohamedH1998

@ask-bonk ask-bonk Bot added engineering Problems or updates to developers.cloudflare.com website bug Something isn't working labels May 19, 2026
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

No issues found. The change correctly addresses the false-positive failures for team-member codeowners.

Follow-up: the bonk job on line 90 still uses permissions: CODEOWNERS and may fail for the same reason when team members invoke /bonk. Consider aligning both jobs in a future PR.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 19, 2026

Review completed for PR #30926.

  • Added labels: engineering, bug
  • Posted a PR review comment

Summary: The change is correct and well-explained. Replacing permissions: CODEOWNERS with permissions: write in the bonk-auto-review job fixes the false-positive failures for contributors who are codeowners via GitHub team membership, while the existing job-level if: condition still provides the primary security gate.

Follow-up noted: The regular bonk job on line 90 still uses permissions: CODEOWNERS. Team-member codeowners who invoke /bonk could hit the same issue, so consider aligning both jobs in a future PR.

github run

@mvvmm mvvmm changed the title fix: remove redundant CODEOWNERS check from bonk-auto-review fix: use permissions: write in bonk-auto-review instead of CODEOWNERS May 19, 2026
@mvvmm mvvmm marked this pull request as ready for review May 19, 2026 14:57
@mvvmm mvvmm changed the title fix: use permissions: write in bonk-auto-review instead of CODEOWNERS fix: use permissions: write in bonk instead of CODEOWNERS May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

@mvvmm
Copy link
Copy Markdown
Contributor Author

mvvmm commented May 19, 2026

/bonk review

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Both instances of are now correctly replaced with . The change aligns the and jobs and fixes the false-positive failures for codeowners via team membership.

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Both instances of permissions: CODEOWNERS are now correctly replaced with permissions: write. The change aligns the bonk and bonk-auto-review jobs and fixes the false-positive failures for codeowners via team membership.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 19, 2026

Review posted for PR #30926.

The change is correct. Both permissions: CODEOWNERS instances in .github/workflows/bonk.yml are now permissions: write, which fixes the false-positive failures for contributors who are codeowners via GitHub team membership. The bonk and bonk-auto-review jobs are now aligned.

No issues found — the PR is ready to merge.

github run

@mvvmm mvvmm merged commit eff0134 into production May 19, 2026
15 checks passed
@mvvmm mvvmm deleted the fix/bonk-auto-review-codeowners branch May 19, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working engineering Problems or updates to developers.cloudflare.com website size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants