Skip to content

Commit bc69edd

Browse files
Copilotpelikhan
andauthored
Fix MAX_OPEN_PRS gate failing with exit code 4 when no matching PRs exist
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent a638fdd commit bc69edd

9 files changed

Lines changed: 1117 additions & 2555 deletions

.github/workflows/daily-repo-goals.lock.yml

Lines changed: 299 additions & 663 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/import-workflow.lock.yml

Lines changed: 255 additions & 601 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/link-checker.lock.yml

Lines changed: 268 additions & 628 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/maintainer.lock.yml

Lines changed: 290 additions & 658 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workflows/adhoc-qa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
run: |
1616
MAX_OPEN_PRS=8
1717
if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
18-
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[adhoc-qa]"' --json number --jq 'length')
18+
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[adhoc-qa]"' --json number --jq 'length' 2>/dev/null || echo 0)
1919
[[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
2020
# exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
2121

workflows/efficiency-improver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
run: |
1919
MAX_OPEN_PRS=8
2020
if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
21-
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[efficiency-improver]"' --json number --jq 'length')
21+
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[efficiency-improver]"' --json number --jq 'length' 2>/dev/null || echo 0)
2222
[[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
2323
# exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
2424

workflows/glossary-maintainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
run: |
1212
MAX_OPEN_PRS=8
1313
if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
14-
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[docs]"' --json number --jq 'length')
14+
COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[docs]"' --json number --jq 'length' 2>/dev/null || echo 0)
1515
[[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
1616
# exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
1717

workflows/perf-improver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
run: |
2424
MAX_OPEN_PRS=8
2525
if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
26-
COUNT=$(gh pr list --repo ${{ github.repository }} --state open --search 'in:title "[perf-improver]"' --json number --jq 'length')
26+
COUNT=$(gh pr list --repo ${{ github.repository }} --state open --search 'in:title "[perf-improver]"' --json number --jq 'length' 2>/dev/null || echo 0)
2727
[[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
2828
# exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
2929

workflows/test-improver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
run: |
2424
MAX_OPEN_PRS=8
2525
if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
26-
COUNT=$(gh pr list --repo ${{ github.repository }} --state open --search 'in:title "[test-improver]"' --json number --jq 'length')
26+
COUNT=$(gh pr list --repo ${{ github.repository }} --state open --search 'in:title "[test-improver]"' --json number --jq 'length' 2>/dev/null || echo 0)
2727
[[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
2828
# exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
2929

0 commit comments

Comments
 (0)