github_token | Yes | ${{ github.token }} | GitHub token for API access and GitHub Models credential |
ai_provider | No | github-models | AI provider: github-models, openai, openrouter, or azure-openai |
ai_model | No | gpt-4o | Model identifier for the chosen provider |
ai_retry_max_attempts | No | 5 | Total number of attempts (initial + retries) when calling the AI provider. Retries are triggered by transient errors: 429 (rate limit), 500, 502, 503, 504, and network-level failures. Values below 1 are clamped to 1 |
ai_temperature | No | 0.5 | Controls the randomness of the AI's output (0.0 = fully deterministic, 1.0 = most random). Lower values produce more consistent questions; higher values produce more varied output |
api_key | No | | API key for the provider. For github-models, leave empty to use github_token, or supply an instructor PAT to override it |
azure_endpoint | No | | Azure OpenAI endpoint URL (required for azure-openai) |
num_questions | No | 5 | Number of questions to generate (minimum 1, maximum 50). Values above 50 are automatically capped |
include_answers | No | false | When true, each question is immediately followed by its answer labelled Answer: in the student-facing report. The instructor repository (when instructor_repo_token is configured) always includes answers regardless of this setting. Answers are written in plain, everyday language and avoid technical jargon |
include_patterns | No | | Comma-separated globs for files to include |
exclude_patterns | No | (common non-code files) | Comma-separated globs for files to exclude |
output_file | No | grill-my-code.md | Filename for the output Markdown file |
post_pr_comment | No | true | Post assessment as a PR comment |
post_issue | No | false | Create a GitHub Issue with the assessment. Automatically assigned to the student who authored the head commit |
post_discussion | No | false | Create a GitHub Discussion with the assessment. Discussions are enabled automatically if not already on |
discussion_category | No | Assessments | Discussion category name |
instructor_repo_token | No | | PAT with repo scope and permission to create repositories in the same organisation. When provided, the action writes a private instructor-only assessment file (questions and answers) to a repository named {assignment-name}-grillmycode in the same organisation. The repository is created automatically on first run. The assignment name is resolved from the student repo's template_repository (GitHub Classroom), falling back to the source repo name. Leave empty to disable instructor repository delivery |
additional_context | No | | Instructor-specific instructions for this assignment. Injected into the system prompt and takes precedence over default behaviour. Supports multi-line instructions |
assignment_context | No | | Comma-separated file glob(s) read from the repository and injected into the AI prompt before additional_context. Supported file types: plain text / source files (UTF-8), PDF (.pdf — text layer only), Microsoft Word (.doc/.docx — text only). If no files match, a workflow warning is emitted and the action continues without context. Example: "README.md, docs/brief.pdf, rubric.docx" |
assignment_context_max_chars | No | 20000 | Maximum total characters read from all assignment_context files combined. Prevents large files from flooding the prompt. Values below 1 are clamped to 1 |
exclude_workflow_files | No | true | Exclude .github/workflows/** files from the assessed diff. Set to "false" to include workflow files |
keep_comments | No | false | When false (default), inline and block comments are stripped before sending code to the AI. Set to "true" to preserve comments |
skip_initial_commit | No | true | When true (default), pins the diff base to the first commit so starter/template files are excluded. When false, uses the empty tree as the base |
skip_committers | No | github-classroom[bot],github-actions[bot] | Comma-separated list of commit author names or email substrings. Leading bot commits after the base SHA are excluded from the diff. Set to '' to disable |
base_sha | No | | Override the base commit SHA |
head_sha | No | | Override the head commit SHA |