Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .agents/scripts/gh-failure-miner-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,10 @@

# Ensure source label exists on repos that will receive issues
if [[ "$dry_run" != "true" ]]; then
local seen_repos=""
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
--description "Auto-created by gh-failure-miner-helper.sh" --color "C2E0C6" --force || true
done
fi

Expand Down Expand Up @@ -580,7 +579,7 @@
local signal_tag="gh-failure-miner:${pattern_id}"

local existing_count
existing_count=$(gh issue list --repo "$repo_slug" --state open --search "\"${signal_tag}\" in:body" --json number --limit 1 2>/dev/null | jq 'length') || existing_count=0

Check warning on line 582 in .agents/scripts/gh-failure-miner-helper.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of using the literal 'length' 4 times.

See more on https://sonarcloud.io/project/issues?id=marcusquinn_aidevops&issues=AZzz2ZshWT_PiSiGBQSV&open=AZzz2ZshWT_PiSiGBQSV&pullRequest=4968
if [[ "$existing_count" -gt 0 ]]; then
echo "Skipping cluster for ${check_name} - existing open issue with ${signal_tag}"
idx=$((idx + 1))
Expand Down
Loading