-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
152 lines (149 loc) · 6.08 KB
/
Copy pathaction.yml
File metadata and controls
152 lines (149 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: "Nominal Code Review"
description: "AI-powered code review for pull requests using Claude"
author: "gauthierdmn"
branding:
icon: "code"
color: "purple"
inputs:
anthropic_api_key:
description: "Anthropic API key (required when provider is 'anthropic')"
required: false
default: ""
openai_api_key:
description: "OpenAI-compatible API key (required when provider is 'openai', 'deepseek', 'groq', 'together', or 'fireworks')"
required: false
default: ""
google_api_key:
description: "Google API key (required when provider is 'google')"
required: false
default: ""
github_token:
description: "GitHub token for posting review comments (defaults to github.token)"
required: true
provider:
description: "LLM provider for the reviewer (anthropic, openai, google, deepseek, groq, together, fireworks). Also the default for the explorer."
required: false
default: "anthropic"
image:
description: "Docker image to use. The default all-in-one image works with any provider; provider-specific variants are available for smaller footprint."
required: false
default: "ghcr.io/gauthierdmn/nominal-code:latest"
model:
description: "Reviewer model (e.g. claude-sonnet-4-20250514, gpt-4.1). Empty uses the provider's default."
required: false
default: ""
max_turns:
description: "Maximum agentic turns for the reviewer. Empty uses the bundled default (8), 0 means unlimited."
required: false
default: ""
explorer_provider:
description: "Explorer sub-agent provider. Empty inherits from `provider`."
required: false
default: ""
explorer_model:
description: "Explorer sub-agent model. Empty inherits from `model`. Useful for pairing a strong reviewer with a cheaper explorer."
required: false
default: ""
explorer_max_turns:
description: "Maximum turns for explorer sub-agents. Empty uses the bundled default (32), 0 means unlimited."
required: false
default: ""
prompt:
description: "Custom review instructions appended to the default reviewer prompt."
required: false
default: ""
coding_guidelines:
description: "Inline coding guidelines content. Appended to the reviewer system prompt."
required: false
default: ""
coding_guidelines_file:
description: "Path to a coding guidelines file (relative to repo root). Appended to the reviewer system prompt. Wins over `coding_guidelines` if both are set."
required: false
default: ""
reviewer_system_prompt:
description: "Inline reviewer system prompt that fully REPLACES the bundled prompt."
required: false
default: ""
reviewer_system_prompt_file:
description: "Path to a file whose contents fully REPLACE the bundled reviewer system prompt."
required: false
default: ""
explorer_system_prompt:
description: "Inline explorer sub-agent system prompt that fully REPLACES the bundled prompt."
required: false
default: ""
explorer_system_prompt_file:
description: "Path to a file whose contents fully REPLACE the bundled explorer system prompt."
required: false
default: ""
language_guidelines_dir:
description: "Directory containing per-language guideline files (e.g. python.md). Overrides the bundled language guidelines."
required: false
default: ""
inline_suggestions:
description: "Whether to render findings as inline code suggestions. Defaults to true; set 'false' to disable."
required: false
default: ""
ignore_existing_comments:
description: "When 'true', skip fetching prior PR comments so they don't bias the review (useful for re-runs)."
required: false
default: ""
dry_run:
description: "When 'true', run the full review pipeline but skip posting comments to the PR."
required: false
default: ""
runs:
using: "composite"
steps:
- shell: bash
env:
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
GOOGLE_API_KEY: ${{ inputs.google_api_key }}
GITHUB_TOKEN: ${{ inputs.github_token }}
AGENT_PROVIDER: ${{ inputs.provider }}
AGENT_MODEL: ${{ inputs.model }}
AGENT_MAX_TURNS: ${{ inputs.max_turns }}
AGENT_EXPLORER_PROVIDER: ${{ inputs.explorer_provider }}
AGENT_EXPLORER_MODEL: ${{ inputs.explorer_model }}
AGENT_EXPLORER_MAX_TURNS: ${{ inputs.explorer_max_turns }}
INPUT_PROMPT: ${{ inputs.prompt }}
CODING_GUIDELINES: ${{ inputs.coding_guidelines }}
CODING_GUIDELINES_FILE: ${{ inputs.coding_guidelines_file }}
REVIEWER_SYSTEM_PROMPT: ${{ inputs.reviewer_system_prompt }}
REVIEWER_SYSTEM_PROMPT_FILE: ${{ inputs.reviewer_system_prompt_file }}
EXPLORER_SYSTEM_PROMPT: ${{ inputs.explorer_system_prompt }}
EXPLORER_SYSTEM_PROMPT_FILE: ${{ inputs.explorer_system_prompt_file }}
LANGUAGE_GUIDELINES_DIR: ${{ inputs.language_guidelines_dir }}
INLINE_SUGGESTIONS: ${{ inputs.inline_suggestions }}
IGNORE_EXISTING_COMMENTS: ${{ inputs.ignore_existing_comments }}
DRY_RUN_REVIEW: ${{ inputs.dry_run }}
run: |
docker run --rm \
-e GITHUB_ACTIONS=true \
-e GITHUB_EVENT_PATH=/github/event.json \
-e GITHUB_WORKSPACE=/github/workspace \
-e ANTHROPIC_API_KEY \
-e OPENAI_API_KEY \
-e GOOGLE_API_KEY \
-e GITHUB_TOKEN \
-e AGENT_PROVIDER \
-e AGENT_MODEL \
-e AGENT_MAX_TURNS \
-e AGENT_EXPLORER_PROVIDER \
-e AGENT_EXPLORER_MODEL \
-e AGENT_EXPLORER_MAX_TURNS \
-e INPUT_PROMPT \
-e CODING_GUIDELINES \
-e CODING_GUIDELINES_FILE \
-e REVIEWER_SYSTEM_PROMPT \
-e REVIEWER_SYSTEM_PROMPT_FILE \
-e EXPLORER_SYSTEM_PROMPT \
-e EXPLORER_SYSTEM_PROMPT_FILE \
-e LANGUAGE_GUIDELINES_DIR \
-e INLINE_SUGGESTIONS \
-e IGNORE_EXISTING_COMMENTS \
-e DRY_RUN_REVIEW \
-v "${GITHUB_EVENT_PATH}:/github/event.json:ro" \
-v "${GITHUB_WORKSPACE}:/github/workspace" \
"${{ inputs.image }}"