Repository navigation
fix(autograder): update-or-create comments + failure fallback + concurrency for Challenge 14 - #5
accesswatch wants to merge 1 commit into
Conversation
Challenge 10: Local commit verified!Found 2 commit(s) on branch |
Content Validation ReportAccessibility
Learning ResourcesAutomated validation by Learning Room. Questions? Check the guides or mention @Facilitator. |
PR Validation ReportValidation Needs Attention [ACTION REQUIRED] Required Checks
Learning ResourcesBased on your changes, these guides might help: Automated validation by Learning Room Bot. Aria generated this review. Last updated: 2026-05-04T19:01:47.921Z |
There was a problem hiding this comment.
Pull request overview
Updates the Challenge 14 autograder workflow to reduce duplicate PR comments, provide a friendly fallback comment when the workflow fails, and cancel stale workflow runs when a student pushes new commits to the same PR.
Changes:
- Add workflow-level
concurrencyto cancel in-progress runs for the same PR. - Replace unconditional comment creation with an update-or-create pattern keyed off a Challenge 14 marker.
- Add an
if: failure()step that posts (or updates) a workflow-error notice comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const { data: comments } = await github.rest.issues.listComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body | ||
| issue_number: context.issue.number | ||
| }); | ||
| const existing = comments.find(c => c.user.type === 'Bot' && c.body.includes(MARKER)); |
| const { data: comments } = await github.rest.issues.listComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number |
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true |
0a861c9 to
533908a
Compare
Challenge 10: Local commit verified!Found 2 commit(s) on branch |
|
Superseded by source-aligned template sync in PR #13, which includes these grading reliability updates. |
Applies the same three fixes to
autograder-template.ymlthat were already applied to C7/C10/C16 in PRs #2-4:nn- Comment spam: update-or-create instead of barecreateCommentif: failure()fallback step posts a friendly message if the job crashesn- **Race conditions**:concurrency` group cancels stale runs when a student pushes again