Run step 2/3 exercise workflows automatically on merged PRs without approval gating - #53
Closed
arilivigni with Copilot wants to merge 2 commits into
Closed
Run step 2/3 exercise workflows automatically on merged PRs without approval gating#53arilivigni with Copilot wants to merge 2 commits into
arilivigni with Copilot wants to merge 2 commits into
Conversation
Copilot created this pull request from a session on behalf of
arilivigni
June 10, 2026 00:18
View session
arilivigni
marked this pull request as ready for review
June 10, 2026 00:20
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Skills exercise Step 2 and Step 3 GitHub Actions workflows so they can run automatically after PRs are merged to main, using pull_request_target plus merge-only job guards to avoid running on unmerged PR closures.
Changes:
- Switched Step 2 and Step 3 workflow triggers from
pull_requesttopull_request_targetonclosedevents targetingmain. - Added merge-only job conditions (
if: github.event.pull_request.merged == true) for the primary jobs in both workflows. - Pinned repository checkouts to a trusted ref (currently
main) for Step 2/3 jobs.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/2-step.yml | Trigger moved to pull_request_target, jobs gated on merged PRs, and checkout pinned to a trusted ref. |
| .github/workflows/3-last-step.yml | Trigger moved to pull_request_target, jobs gated on merged PRs, and checkout pinned to a trusted ref. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 5
Comment on lines
26
to
+28
| check_step_work: | ||
| name: Check step work | ||
| if: github.event.pull_request.merged == true |
Comment on lines
37
to
+39
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: main |
Comment on lines
120
to
+122
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: main |
Comment on lines
25
to
+27
| post_review_content: | ||
| name: Post review content | ||
| if: github.event.pull_request.merged == true |
Comment on lines
36
to
+38
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: main |
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.
Step 2 and Step 3 exercise workflows were waiting on approval and not reliably progressing after PR merge. This updates their triggers and execution guards so they run automatically after merges to
mainwhile avoiding untrusted PR-code execution.Trigger + merge gating
pull_requesttopull_request_targetin:.github/workflows/2-step.yml.github/workflows/3-last-step.ymlif: github.event.pull_request.merged == trueTrusted checkout under
pull_request_targetwith: ref: mainRepresentative change