You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The target repository is `${{ env.TARGET_REPOSITORY }}`. All PR fetching and subagent dispatch use this value.
40
+
146
41
## Overview
147
42
148
-
You are an **orchestrator**. Your job is to dispatch PRs to the `contribution-checker` subagent for evaluation and compile the results into a single report issue.
43
+
You are an **orchestrator**. Your job is to dispatch PRs to the `contribution-checker` subagent for evaluation and compile the results into a single report issue in THIS repository (`${{ github.repository }}`).
149
44
150
45
You do NOT evaluate PRs yourself. You delegate each evaluation to `.github/agents/contribution-checker.agent.md`.
151
46
152
47
## Pre-filtered PR List
153
48
154
-
A `pre-agent` step has already queried and filtered PRs. The results are in `pr-filter-results.json` at the workspace root. Read this file first. It contains:
49
+
A `pre-agent` step has already queried and filtered PRs from `${{ env.TARGET_REPOSITORY }}`. The results are in `pr-filter-results.json` at the workspace root. Read this file first. It contains:
155
50
156
51
```json
157
52
{
@@ -165,16 +60,18 @@ If `pr_numbers` is empty, create a report stating no PRs matched the filters and
165
60
166
61
## Step 1: Dispatch to Subagent
167
62
168
-
For each PR number in the list, delegate evaluation to the **contribution-checker** subagent (`.github/agents/contribution-checker.agent.md`).
63
+
For each PR number in the comma-separated list, delegate evaluation to the **contribution-checker** subagent (`.github/agents/contribution-checker.agent.md`).
169
64
170
65
### How to dispatch
171
66
172
67
Call the contribution-checker subagent for each PR with this prompt:
173
68
174
69
```
175
-
Evaluate PR ${{ github.repository }}#<number> against the contribution guidelines.
70
+
Evaluate PR ${{ env.TARGET_REPOSITORY }}#<number> against the contribution guidelines.
176
71
```
177
72
73
+
The subagent accepts any `owner/repo#number` reference — the target repo is not hardcoded.
74
+
178
75
The subagent will return a single JSON object with the verdict and a comment for the contributor.
179
76
180
77
### Parallelism
@@ -188,13 +85,13 @@ Gather all returned JSON objects. If a subagent call fails, record the PR with v
188
85
189
86
### Posting comments
190
87
191
-
For each PR where the subagent returned a non-empty `comment` field and the quality is NOT `lgtm`, call the `add_comment` safe output tool to post the comment to the PR. Pass the PR number and the comment body from the subagent result.
88
+
For each PR where the subagent returned a non-empty `comment` field and the quality is NOT `lgtm`, call the `add_comment` safe output tool to post the comment to the PR in the target repository. Pass the PR number and the comment body from the subagent result. The `add_comment` tool is pre-configured with `target-repo` pointing to the target repository — you do NOT need to specify the repo yourself.
192
89
193
90
Do NOT post comments to PRs with `lgtm` quality — those are ready for maintainer review and don't need additional feedback.
194
91
195
92
## Step 2: Compile Report
196
93
197
-
Create a single issue in this repository. Use the `skipped_count` from `pr-filter-results.json`. Build the report tables from the JSON objects returned by the subagent (use `number`, `title`, `author`, `lines`, and `quality` fields).
94
+
Create a single issue in THIS repository. Use the `skipped_count` from `pr-filter-results.json`. Build the report tables from the JSON objects returned by the subagent (use `number`, `title`, `author`, `lines`, and `quality` fields).
198
95
199
96
Follow the **report layout rules** below — they apply to every report this workflow produces.
200
97
@@ -258,7 +155,7 @@ Evaluated: 4 · Skipped: 10
258
155
259
156
## Step 3: Label the Report Issue
260
157
261
-
After creating the report issue, call the `add_labels` safe output tool to apply labels based on the quality signals reported by the subagent. Collect the distinct `quality` values from all returned rows and add each as a label.
158
+
After creating the report issue, call the `add_labels` safe output tool to apply labels based on the quality signals reported by the subagent. Collect the distinct `quality` values from all returned rows and add each as a label. The `add_labels` tool is pre-configured with `target-repo` pointing to the target repository.
262
159
263
160
For example, if the batch contains rows with `lgtm`, `spam`, and `needs-work` quality values, apply all three labels: `lgtm`, `spam`, `needs-work`.
264
161
@@ -269,6 +166,8 @@ If any subagent call failed (❓), also apply `outdated`.
269
166
-**You are the orchestrator** — you dispatch and compile. You do NOT run the checklist yourself.
270
167
-**PR fetching and filtering is pre-computed** — a `pre-agent` step writes `pr-filter-results.json`. Read it at the start.
271
168
-**Subagent does the analysis** — `.github/agents/contribution-checker.agent.md` handles all per-PR evaluation logic.
272
-
-**Use safe output tools** — use `add-comment` and `add-labels` safe output tools to post comments and labels to PRs.
169
+
-**Read from `${{ env.TARGET_REPOSITORY }}`** — read-only access via GitHub MCP tools.
170
+
-**Write to `${{ github.repository }}`** — reports go here as issues.
171
+
-**Use safe output tools for target repository interactions** — use `add-comment` and `add-labels` safe output tools to post comments and labels to PRs in the target repository `${{ env.TARGET_REPOSITORY }}`. Never use `gh` CLI or direct API calls for writes.
273
172
- Close the previous report issue when creating a new one (`close-older-issues: true`).
274
173
- Be constructive in assessments — these reports help maintainers prioritize, not gatekeep.
0 commit comments