fix: add required triggers for org ruleset workflow#2
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigures the 'required-zizmor' GitHub Actions workflow to be triggerable by pull_request and merge_queue events so it can be used as an organization required_workflow ruleset. Sequence diagram for pull_request and merge_queue triggering required-zizmor workflowsequenceDiagram
actor Developer
participant GitHubRepo
participant GitHubActions
participant RequiredWorkflow
Developer->>GitHubRepo: Open pull_request or update PR
GitHubRepo-->>GitHubActions: Emit pull_request event
GitHubActions->>RequiredWorkflow: Start run via pull_request trigger
Developer->>GitHubRepo: Add PR to merge_queue
GitHubRepo-->>GitHubActions: Emit merge_queue event
GitHubActions->>RequiredWorkflow: Start run via merge_queue trigger
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider scoping the
pull_requesttrigger to specific event types (e.g.types: [opened, synchronize]) to avoid unnecessary workflow runs on actions like labeling or assigning.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider scoping the `pull_request` trigger to specific event types (e.g. `types: [opened, synchronize]`) to avoid unnecessary workflow runs on actions like labeling or assigning.
## Individual Comments
### Comment 1
<location> `.github/workflows/required-zizmor.yml:5` </location>
<code_context>
on:
+ pull_request:
+ merge_queue:
workflow_call:
</code_context>
<issue_to_address>
**issue (bug_risk):** The `merge_queue` trigger name appears incorrect; GitHub uses `merge_group` for merge queue workflows.
Using `merge_queue` here will stop the workflow from ever running when the merge queue processes items. Please change this event key to `merge_group` and update any logic that depends on the event payload shape if needed.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| on: | ||
| pull_request: | ||
| merge_queue: |
There was a problem hiding this comment.
issue (bug_risk): The merge_queue trigger name appears incorrect; GitHub uses merge_group for merge queue workflows.
Using merge_queue here will stop the workflow from ever running when the merge queue processes items. Please change this event key to merge_group and update any logic that depends on the event payload shape if needed.
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.
Add pull_request and merge_queue triggers so the workflow can be used by org required_workflows rulesets.
Summary by Sourcery
Build: