Trigger step checks on merge to main to avoid Actions approval - #68
Merged
Conversation
Steps 2 and 3 triggered on pull_request:closed. Because the Copilot coding agent authors the exercise PRs, those workflow runs were held in "waiting for approval" and never ran on merge, so the exercise never advanced past Step 2 (issues #59, #64). Switch the Step 2 and Step 3 triggers to push on main (paths docs/**), matching the Step 0 start workflow. The merge push is performed by the learner, so runs start automatically without manual approval. This also fixes a latent bug where a PR closed without merging would advance. Docs: soften the Step 1 Actions-approval note to optional, add Copilot Space troubleshooting for the conversation blanking on send (#67), and note in Steps 2/3 and the README that steps advance automatically on merge. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the exercise automation so Step 2 and Step 3 workflows run after a merge to main (via push), avoiding GitHub Actions’ “workflow approval required” gate that can block runs for bot-authored pull requests. It also updates learner-facing docs to clarify that steps advance automatically and to add troubleshooting tips.
Changes:
- Switch Step 2 and Step 3 workflow triggers from
pull_request: closedtopushonmain(scoped todocs/**). - Update step documentation and README to clarify that no manual workflow approval is needed and to point learners to the Actions tab when progress is delayed.
- Reframe the Step 1 “require approval for first-time contributors” note as optional and add Copilot Spaces troubleshooting guidance.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds clarification that steps advance automatically on merge and suggests checking Actions when delayed. |
| .github/workflows/2-step.yml | Triggers Step 2 on push to main affecting docs/** to avoid approval gating. |
| .github/workflows/3-last-step.yml | Triggers Step 3 on push to main affecting docs/** to avoid approval gating. |
| .github/steps/1-step.md | Updates preflight guidance (optional approval settings) and adds troubleshooting for Copilot Spaces UI behavior. |
| .github/steps/2-step.md | Adds troubleshooting note explaining Step 2 advances automatically on merge and to check Actions. |
| .github/steps/3-step.md | Adds troubleshooting note explaining Step 3 runs automatically on merge and to check Actions. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Why
Learners reported the exercise gets stuck after Step 2 and never advances: Mona posts no feedback and Step 3 stays locked even after the pull request is merged (issues #59 and #64).
The root cause is the Actions approval gate. Steps 2 and 3 triggered on
pull_request: closed, but the exercise pull requests are authored by the Copilot coding agent. GitHub holds workflow runs on bot/first-time-contributor pull requests in "waiting for approval," so the grading job and the "post next step" job never ran when the learner merged.What changed
2-step.yml) and Step 3 (3-last-step.yml) triggers frompull_request: closedtopushonmainwithpaths: docs/**, matching the existing Step 0 start workflow. The merge push is performed by the learner (who has write access), so the checks run automatically with no manual approval. As a bonus this fixes a latent bug where a pull request closed without merging would have advanced the exercise.[!NOTE](kept for now, can be removed later), since progression no longer depends on it.Notes for reviewers
Verified that neither Step 2 nor Step 3 uses
github.event.pull_request.*context or amergedguard, so dropping the pull_request event is safe. Grading only inspectsdocs/README.mdon disk, which is present onmainafter merge. The Step 1 -> 2 -> 3 enable/disable gating is unchanged, so disabled steps still won't fire on the initial template push. All four workflow YAML files parse cleanly.Issue #67's deeper Copilot Space UI behavior is a product-side concern; this change only adds learner-facing troubleshooting for it.