CI improvements for PRs that do not target main#22435
Closed
kfc35 wants to merge 5 commits intobevyengine:mainfrom
Closed
CI improvements for PRs that do not target main#22435kfc35 wants to merge 5 commits intobevyengine:mainfrom
kfc35 wants to merge 5 commits intobevyengine:mainfrom
Conversation
mockersf
reviewed
Jan 8, 2026
Member
|
the commenting workflow should look more like https://github.com/bevyengine/bevy/blob/main/.github/workflows/welcome.yml
|
only comment when pr is opened Co-authored-by: François Mockers <francois.mockers@vleue.com>
Comment on lines
+6
to
+11
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| branches-ignore: | ||
| - main |
Check failure
Code scanning / zizmor
use of fundamentally insecure workflow trigger Error
Contributor
Author
There was a problem hiding this comment.
I’m assuming this is warning about the use of pull_request_target but as far as I can read for the past few moments, I’m supposed to use it here for commenting on the pull request… thoughts?
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.
Objective
Solution
Example Runif the pull request targets themainbranch. (Example Runis a requirement forExample Run - PR Comments, which is the job that reports the screenshots comparison results)PR Not Targeting Main - PR Commentwhere, if the last comment was not from GH actions, it will comment “This PR does not target themainbranch. If this was a mistake, you can edit your pull request and set thebasebranch tomain.” I copied this based off ofExample Run - PR Commentsand just edited/deleted where I thought necessary.If you’d like for the new GH Action check for a label, there’s currently no label to distinguish between a PR targeting
mainvs otherwise. Please create one for me and I can add that check to the new GitHub action.This is my first time playing around with GH Actions so an extra careful eye is appreciated :)
Testing
I did not test this… I think we have to test it out in the wild, no? Or is there some other way?