fix(auto-grade): allow fork PR checkout for assignment graders - #4
Closed
lassebenni wants to merge 1 commit into
Closed
fix(auto-grade): allow fork PR checkout for assignment graders#4lassebenni wants to merge 1 commit into
lassebenni wants to merge 1 commit into
Conversation
actions/checkout v6+ refuses to check out fork heads in pull_request_target workflows unless allow-unsafe-pr-checkout is set. HYF assignment graders need that opt-in to run .hyf/test.sh on student forks and post the score comment. Pin the head repo explicitly and drop persisted credentials from the student tree. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
lassebenni
added a commit
to HackYourAssignment/c55-data-week-12
that referenced
this pull request
Jul 24, 2026
actions/checkout v6 refuses fork heads under pull_request_target. Pin the reusable grader to the fixed fork branch until HackYourFuture/github-actions#4 lands on main. Co-authored-by: Lasse Benninga <devops.pipeline@example.com> Co-authored-by: Cursor <cursoragent@cursor.com>
lassebenni
added a commit
to HackYourAssignment/c55-data-week-11
that referenced
this pull request
Aug 2, 2026
The grader pointed at fix/allow-unsafe-pr-checkout-for-autograde, a feature branch whose upstream PR (HackYourFuture/github-actions#4) was closed without merge. The pin is therefore permanent, but the name reads as disposable, and deleting it would silently break grading for weeks 11, 12 and 14 at once. stable/hyf-auto-grade points at the same commit (346f1ae8). No behaviour change; this is a rename plus a comment that tells the truth. Co-authored-by: Lasse Benninga <devops.pipeline@example.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 2, 2026
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.
Summary
actions/checkoutv6+ blocks fork checkouts inpull_request_targetunlessallow-unsafe-pr-checkout: trueis set (GitHub docs).HackYourAssignment/*fork PR (e.g. c55-data-week-12 run).head.repo.full_name@head.sha, and setpersist-credentials: false.Security note
This workflow intentionally runs the student's
.hyf/test.sh. Keep assignment repos free of high-value secrets; token stayscontents: read+ PR comment write.Test plan
pull_request_targetgrade job on a student fork PRMade with Cursor