Instructor Repository Delivery
Automatically stores a private, instructor-only copy of every assessment — including both questions and answers — in a dedicated repository. Students only ever see their student-facing report; the instructor copy is written separately using a PAT that students cannot access.
How it works
When instructor_repo_token is provided the action:
- Resolves the assignment name from the student repo's
template_repositoryfield (set automatically by GitHub Classroom). For non-Classroom repos it falls back to the source repository name. - Derives the instructor repository name as
{assignment-name}-grillmycodein the same organisation. - Creates the repository as private on first run if it does not already exist.
- Creates a folder named
{student-login}/in the instructor repository and writes the full assessment (questions and answers) to{student-login}/questions.md, overwriting any previous run for the same student. The folder is created automatically if it does not already exist.
The student-facing report is unaffected — whether it includes answers is still controlled by the existing include_answers input.
Prerequisites
See the Instructor Setup guide for full step-by-step instructions, including how to create the PAT and add it as an org-level secret so all student repositories inherit it automatically.
In short:
- Create a PAT with
reposcope (classic) or Administration + Contents write permissions (fine-grained). - Add it as an org-level Actions secret named
INSTRUCTOR_REPO_TOKEN— this makes it available to all student repos without any per-repo configuration.
Example workflow
Copy this file to .github/workflows/grill-my-code.yml in the student repository.
name: Code Assessment
on:
pull_request:
types: [opened, synchronize]
jobs:
generate-questions:
runs-on: ubuntu-latest
permissions:
contents: write # required to commit the output file back to the repo
pull-requests: write # required to post the PR comment
models: read # required to call GitHub Models API
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history required for diff resolution
- uses: NSCC-ITC-Assessment/GrillMyCode@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
num_questions: "5"
# Store a full Q+A copy in the private instructor repository.
# The repository is created automatically if it does not exist.
instructor_repo_token: ${{ secrets.INSTRUCTOR_REPO_TOKEN }}
GitHub Classroom setup
For a Classroom assignment named assignment-1:
- Student repos:
your-org/assignment-1-student-login - Instructor repo (auto-created):
your-org/assignment-1-grillmycode - File written per student:
student-login/questions.md
The assignment name is resolved automatically from the template_repository that GitHub Classroom sets on every student repo — no configuration is needed beyond the token.
Non-Classroom setup
For a generic repository named my-project:
- Instructor repo (auto-created):
your-org/my-project-grillmycode - File written per student:
student-login/questions.md(resolved from the most recent non-bot git commit author)
Instructor report contents
The instructor copy always contains:
- Questions and answers (regardless of the
include_answerssetting) - Student GitHub login and source repository name
- Commit range reviewed (base → head SHA)
- Full list of all files changed since the starter template (pre-filter)
- Assignment context files used (if any)
- AI provider and model