Skip to main content

Getting Started

Installation

GrillMyCode is a GitHub Action — there is nothing to install. Add a workflow file to the student or assessment repository to get started.

Minimal workflow

name: Code Assessment
on:
pull_request:
types: [opened, synchronize]

jobs:
generate-questions:
runs-on: ubuntu-latest
permissions:
contents: read
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 }}

Copy this file to .github/workflows/grill-my-code.yml in the student repository. No secrets need to be created — GitHub Models (the default AI provider) authenticates with the built-in GITHUB_TOKEN.

Choosing a trigger event

TriggerWhen to use
pull_requestStudents submit work via pull requests (recommended)
pushStudents work directly on a branch without opening a PR
issue_commentRe-trigger from a PR comment

See Example Workflows for ready-to-use files for each scenario.

Customising the questions

Use additional_context to give the AI assignment-specific instructions:

- uses: NSCC-ITC-Assessment/GrillMyCode@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
num_questions: '8'
additional_context: 'Assignment 3 — Python list comprehensions. Focus on when list comprehensions are appropriate versus when a regular loop should be preferred.'

Choosing an AI provider

The default provider is GitHub Models — no setup required. To use OpenAI, OpenRouter, or Azure OpenAI, see the AI Providers page.

Next steps