-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add source: labels to all auto-created issues for provenance tracking #4955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -543,6 +543,16 @@ | |||||
| candidate_file=$(mktemp) | ||||||
| printf '%s\n' "$clusters_json" | jq --argjson min_count "$systemic_threshold" '[.[] | select(.count >= $min_count)]' >"$candidate_file" | ||||||
|
|
||||||
| # Ensure source label exists on repos that will receive issues | ||||||
| if [[ "$dry_run" != "true" ]]; then | ||||||
| local seen_repos="" | ||||||
|
Check warning on line 548 in .agents/scripts/gh-failure-miner-helper.sh
|
||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| local repo_entry | ||||||
| for repo_entry in $(printf '%s\n' "$clusters_json" | jq -r '.[].repo' | sort -u); do | ||||||
| gh label create "source:ci-failure-miner" --repo "$repo_entry" \ | ||||||
| --description "Auto-created by gh-failure-miner-helper.sh" --color "C2E0C6" --force 2>/dev/null || true | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
References
|
||||||
| done | ||||||
| fi | ||||||
|
|
||||||
| local candidate_count | ||||||
| candidate_count=$(jq 'length' "$candidate_file") | ||||||
| if [[ "$candidate_count" -eq 0 ]]; then | ||||||
|
|
@@ -585,7 +595,7 @@ | |||||
| if [[ "$dry_run" == "true" ]]; then | ||||||
| echo "DRY RUN: would create issue: ${title}" | ||||||
| else | ||||||
| local create_cmd=(gh issue create --repo "$repo_slug" --title "$title" --body "$body" --label bug) | ||||||
| local create_cmd=(gh issue create --repo "$repo_slug" --title "$title" --body "$body" --label bug --label "source:ci-failure-miner") | ||||||
| local label | ||||||
| for label in "${extra_labels[@]}"; do | ||||||
| if [[ -n "$label" ]]; then | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -726,7 +726,7 @@ Gap lifecycle: detected → todo_created → resolved" | |
| --repo-path "$repo_path" \ | ||
| --title "Self-evolution: ${description}" \ | ||
| --description "$issue_body" \ | ||
| --labels "self-evolution,auto-dispatch" 2>&1) || { | ||
| --labels "self-evolution,auto-dispatch,source:self-evolution" 2>&1) || { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The gh label create "source:self-evolution" --repo "$repo_slug" \
--description "Auto-created by self-evolution-helper.sh" \
--color "C2E0C6" --force || trueYou'll need to ensure a variable like |
||
| log_warn "claim-task-id.sh failed — recording gap without TODO" | ||
| log_warn "Output: $claim_output" | ||
| # Still update the gap status to avoid re-processing | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
source:findings-to-taskslabel is added here, but the script is missing the correspondinggh label createcommand to ensure the label exists. This is inconsistent with other scripts in this PR and may result in issues being created without the intended source label. Please add the label creation logic before the issue is created. It should look something like this:You'll need to ensure a variable like
$repo_slugis available in the scope where you add this.