Workflow to comment with code review checklists on PRs.#16460
Closed
stephaniehobson wants to merge 25 commits intomozilla:mainfrom
stephaniehobson:master
Closed
Workflow to comment with code review checklists on PRs.#16460stephaniehobson wants to merge 25 commits intomozilla:mainfrom stephaniehobson:master
stephaniehobson wants to merge 25 commits intomozilla:mainfrom
stephaniehobson:master
Conversation
Add checklist workflow for testing
This reverts commit c788782.
Contributor
Author
|
Looks like it fails on PRs that are not on the same repository...? It's failing here anyway. |
janbrasna
reviewed
Jul 31, 2025
Comment on lines
+3
to
+5
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] |
Collaborator
There was a problem hiding this comment.
Ah yeah that was a good call to try from a fork. For this type of things (not actually executing foreign code, however running from the context of the base repo default branch) you may need to trigger this on pull_request_target instead:
- https://stackoverflow.com/q/74957218/what-is-the-difference-using-pull-request-target
- https://runs-on.com/github-actions/pull-request-vs-pull-request-target/
(which then has some security considerations mentioned in the links)
That might be necessary for the createComment, updateComment APIs to actually have the token access to write to the PR anyways.
Contributor
Author
|
Superseded by #16472 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-line summary
Workflow to comment with code review checklists on PRs.
Significant changes and points to review
The idea is to create a GitHub workflow which will post appropriate checklists in a comment when a pull request is opened if some file types have been added. So, these are a little general in places. But, I'm hoping they can help keep our code base consistent-ish as we have more new developers contributing.
The conditions where the checklists should post are:
experimentin the nameexperiment_viewvariations = [and the array is not empty=> each condition should only trigger relevant checks
Add checklists for:
Did a bit of markdown cleanup too.
Issue / Bugzilla link
n/a
Testing
You can see an earlier version of the script at work on the pulls here: https://github.com/stephaniehobson/bedrock/pulls
I'll re-run with the most recent version of the script tomorrow.