Skip to content

Commit 206ff48

Browse files
committed
refactor issue-solve/pr-fix skills and remove github-controller
1 parent 6282fb0 commit 206ff48

File tree

7 files changed

+277
-621
lines changed

7 files changed

+277
-621
lines changed

skills/ghx/scripts/collect.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -157,65 +157,65 @@ SUCCESS=false
157157
if [[ "$REF_TYPE" == "pr" ]]; then
158158
if ! fetch_pr_metadata "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/pr.json"; then
159159
log_error "Failed to fetch PR metadata"
160-
record_artifact "pr_metadata" "github/pr.json" "error" "json" "Pull request metadata and head/base refs." "review"
160+
record_artifact "pr_metadata" "github/pr.json" "error" "json" "Pull request metadata and head/base refs." "review,pr_fix"
161161
append_manifest_note "Failed to fetch PR metadata."
162162
write_manifest "$GITHUB_CONTEXT_DIR" "$OWNER" "$REPO" "$NUMBER" "$REF_TYPE" "false" "$ARTIFACTS_JSON" "$MANIFEST_NOTES_JSON"
163163
exit 1
164164
fi
165-
record_artifact "pr_metadata" "github/pr.json" "present" "json" "Pull request metadata and head/base refs." "review"
165+
record_artifact "pr_metadata" "github/pr.json" "present" "json" "Pull request metadata and head/base refs." "review,pr_fix"
166166

167167
if [[ "$INCLUDE_FILES" == "true" ]]; then
168168
if fetch_pr_files "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/files.json" "$MAX_FILES"; then
169-
record_artifact "files" "github/files.json" "present" "json" "Changed files list with per-file stats." "review"
169+
record_artifact "files" "github/files.json" "present" "json" "Changed files list with per-file stats." "review,pr_fix"
170170
else
171171
log_warn "Failed to fetch PR files (continuing...)"
172-
record_artifact "files" "github/files.json" "error" "json" "Changed files list with per-file stats." "review"
172+
record_artifact "files" "github/files.json" "error" "json" "Changed files list with per-file stats." "review,pr_fix"
173173
append_manifest_note "Failed to fetch PR files."
174174
fi
175175
else
176-
record_artifact "files" "github/files.json" "missing" "json" "Changed files list with per-file stats." "review"
176+
record_artifact "files" "github/files.json" "missing" "json" "Changed files list with per-file stats." "review,pr_fix"
177177
append_manifest_note "Skipped files collection because INCLUDE_FILES=false."
178178
fi
179179

180180
if [[ "$INCLUDE_THREADS" == "true" ]]; then
181181
if fetch_pr_review_threads "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/review_threads.json" "$UNRESOLVED_ONLY" "$TRIGGER_COMMENT_ID"; then
182-
record_artifact "review_threads" "github/review_threads.json" "present" "json" "Existing review threads for deduplication." "review"
182+
record_artifact "review_threads" "github/review_threads.json" "present" "json" "Existing review threads for deduplication." "review,pr_fix"
183183
else
184184
log_warn "Failed to fetch review threads (continuing...)"
185-
record_artifact "review_threads" "github/review_threads.json" "error" "json" "Existing review threads for deduplication." "review"
185+
record_artifact "review_threads" "github/review_threads.json" "error" "json" "Existing review threads for deduplication." "review,pr_fix"
186186
append_manifest_note "Failed to fetch review threads."
187187
fi
188188
else
189-
record_artifact "review_threads" "github/review_threads.json" "missing" "json" "Existing review threads for deduplication." "review"
189+
record_artifact "review_threads" "github/review_threads.json" "missing" "json" "Existing review threads for deduplication." "review,pr_fix"
190190
append_manifest_note "Skipped review thread collection because INCLUDE_THREADS=false."
191191
fi
192192

193193
if fetch_pr_comments "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/comments.json" "$TRIGGER_COMMENT_ID"; then
194-
record_artifact "comments" "github/comments.json" "present" "json" "Issue-style PR comments from the discussion timeline." "review"
194+
record_artifact "comments" "github/comments.json" "present" "json" "Issue-style PR comments from the discussion timeline." "review,pr_fix"
195195
else
196196
log_warn "Failed to fetch PR comments (continuing...)"
197-
record_artifact "comments" "github/comments.json" "error" "json" "Issue-style PR comments from the discussion timeline." "review"
197+
record_artifact "comments" "github/comments.json" "error" "json" "Issue-style PR comments from the discussion timeline." "review,pr_fix"
198198
append_manifest_note "Failed to fetch PR comments."
199199
fi
200200

201201
if [[ "$INCLUDE_DIFF" == "true" ]]; then
202202
if fetch_pr_diff "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/pr.diff"; then
203-
record_artifact "diff" "github/pr.diff" "present" "text" "Unified diff for the pull request." "review"
203+
record_artifact "diff" "github/pr.diff" "present" "text" "Unified diff for the pull request." "review,pr_fix"
204204
else
205205
log_warn "Failed to fetch PR diff (continuing...)"
206-
record_artifact "diff" "github/pr.diff" "error" "text" "Unified diff for the pull request." "review"
206+
record_artifact "diff" "github/pr.diff" "error" "text" "Unified diff for the pull request." "review,pr_fix"
207207
append_manifest_note "Failed to fetch PR diff."
208208
fi
209209
else
210-
record_artifact "diff" "github/pr.diff" "missing" "text" "Unified diff for the pull request." "review"
210+
record_artifact "diff" "github/pr.diff" "missing" "text" "Unified diff for the pull request." "review,pr_fix"
211211
append_manifest_note "Skipped diff collection because INCLUDE_DIFF=false."
212212
fi
213213

214214
if [[ "$INCLUDE_CHECKS" == "true" ]]; then
215215
HEAD_SHA=$(jq -r '.headRefOid' "$GITHUB_CONTEXT_DIR/github/pr.json")
216216
if [[ -n "$HEAD_SHA" && "$HEAD_SHA" != "null" ]]; then
217217
if fetch_pr_check_runs "$OWNER" "$REPO" "$HEAD_SHA" "$GITHUB_CONTEXT_DIR/github/check_runs.json"; then
218-
record_artifact "check_runs" "github/check_runs.json" "present" "json" "Check runs on the PR head SHA." "review"
218+
record_artifact "check_runs" "github/check_runs.json" "present" "json" "Check runs on the PR head SHA." "review,pr_fix"
219219
if [[ -f "$GITHUB_CONTEXT_DIR/github/check_runs.json" ]]; then
220220
fetch_workflow_logs "$GITHUB_CONTEXT_DIR/github" "$GITHUB_CONTEXT_DIR/github/check_runs.json" || {
221221
log_warn "Failed to fetch workflow logs (continuing...)"
@@ -224,29 +224,29 @@ if [[ "$REF_TYPE" == "pr" ]]; then
224224
fi
225225
else
226226
log_warn "Failed to fetch check runs (continuing...)"
227-
record_artifact "check_runs" "github/check_runs.json" "error" "json" "Check runs on the PR head SHA." "review"
227+
record_artifact "check_runs" "github/check_runs.json" "error" "json" "Check runs on the PR head SHA." "review,pr_fix"
228228
append_manifest_note "Failed to fetch check runs."
229229
fi
230230
else
231231
log_warn "Could not get head SHA from PR metadata, skipping check runs"
232-
record_artifact "check_runs" "github/check_runs.json" "missing" "json" "Check runs on the PR head SHA." "review"
232+
record_artifact "check_runs" "github/check_runs.json" "missing" "json" "Check runs on the PR head SHA." "review,pr_fix"
233233
append_manifest_note "Skipped check runs because headRefOid was not available."
234234
fi
235235
else
236-
record_artifact "check_runs" "github/check_runs.json" "missing" "json" "Check runs on the PR head SHA." "review"
236+
record_artifact "check_runs" "github/check_runs.json" "missing" "json" "Check runs on the PR head SHA." "review,pr_fix"
237237
append_manifest_note "Skipped check run collection because INCLUDE_CHECKS=false."
238238
fi
239239

240240
if [[ "$INCLUDE_COMMITS" == "true" ]]; then
241241
if fetch_pr_commits "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/commits.json"; then
242-
record_artifact "commits" "github/commits.json" "present" "json" "Commit list and metadata for the pull request." "review"
242+
record_artifact "commits" "github/commits.json" "present" "json" "Commit list and metadata for the pull request." "review,pr_fix"
243243
else
244244
log_warn "Failed to fetch commits (continuing...)"
245-
record_artifact "commits" "github/commits.json" "error" "json" "Commit list and metadata for the pull request." "review"
245+
record_artifact "commits" "github/commits.json" "error" "json" "Commit list and metadata for the pull request." "review,pr_fix"
246246
append_manifest_note "Failed to fetch PR commits."
247247
fi
248248
else
249-
record_artifact "commits" "github/commits.json" "missing" "json" "Commit list and metadata for the pull request." "review"
249+
record_artifact "commits" "github/commits.json" "missing" "json" "Commit list and metadata for the pull request." "review,pr_fix"
250250
append_manifest_note "Skipped commit collection because INCLUDE_COMMITS=false."
251251
fi
252252

@@ -255,18 +255,18 @@ if [[ "$REF_TYPE" == "pr" ]]; then
255255
elif [[ "$REF_TYPE" == "issue" ]]; then
256256
if ! fetch_issue_metadata "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/issue.json"; then
257257
log_error "Failed to fetch issue metadata"
258-
record_artifact "issue_metadata" "github/issue.json" "error" "json" "Issue metadata including title/body/state." ""
258+
record_artifact "issue_metadata" "github/issue.json" "error" "json" "Issue metadata including title/body/state." "issue_solve"
259259
append_manifest_note "Failed to fetch issue metadata."
260260
write_manifest "$GITHUB_CONTEXT_DIR" "$OWNER" "$REPO" "$NUMBER" "$REF_TYPE" "false" "$ARTIFACTS_JSON" "$MANIFEST_NOTES_JSON"
261261
exit 1
262262
fi
263-
record_artifact "issue_metadata" "github/issue.json" "present" "json" "Issue metadata including title/body/state." ""
263+
record_artifact "issue_metadata" "github/issue.json" "present" "json" "Issue metadata including title/body/state." "issue_solve"
264264

265265
if fetch_issue_comments "$OWNER" "$REPO" "$NUMBER" "$GITHUB_CONTEXT_DIR/github/comments.json" "$TRIGGER_COMMENT_ID"; then
266-
record_artifact "comments" "github/comments.json" "present" "json" "Issue comments in chronological order." ""
266+
record_artifact "comments" "github/comments.json" "present" "json" "Issue comments in chronological order." "issue_solve"
267267
else
268268
log_warn "Failed to fetch issue comments (continuing...)"
269-
record_artifact "comments" "github/comments.json" "error" "json" "Issue comments in chronological order." ""
269+
record_artifact "comments" "github/comments.json" "error" "json" "Issue comments in chronological order." "issue_solve"
270270
append_manifest_note "Failed to fetch issue comments."
271271
fi
272272

skills/github-controller/SKILL.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)