Skip to content

Commit a0f4d48

Browse files
ascerracursoragent
andcommitted
fix(harness): exit gracefully when all repos are disabled
When every repo in config.yaml has enabled: false, the repo-maintenance workflow now emits a notice and exits 0 instead of failing with an error. Downstream steps are guarded with an if condition so they are skipped when there are no enabled repos to reconcile. The yq query is also updated to filter by enabled status so that disabled repos are excluded from the reconciliation list. Fixes #1735 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 972ce7f commit a0f4d48

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

internal/scaffold/fullsend-repo/.github/workflows/repo-maintenance.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ jobs:
2525
- name: Extract enrolled repo names from config
2626
id: repo-list
2727
run: |
28-
REPOS=$(yq '.repos | keys | join(",")' config.yaml)
28+
REPOS=$(yq '[.repos | to_entries[] | select(.value.enabled == true) | .key] | join(",")' config.yaml)
2929
if [[ -z "$REPOS" ]]; then
30-
echo "::error::No repos found in config.yaml"
31-
exit 1
30+
echo "::notice::No enabled repos found in config.yaml — nothing to do"
31+
echo "skip=true" >> "$GITHUB_OUTPUT"
32+
exit 0
3233
fi
3334
echo "names=$REPOS" >> "$GITHUB_OUTPUT"
3435
3536
- name: Checkout upstream scripts
37+
if: steps.repo-list.outputs.skip != 'true'
3638
uses: actions/checkout@v6
3739
with:
3840
repository: fullsend-ai/fullsend
@@ -42,6 +44,7 @@ jobs:
4244
internal/scaffold/fullsend-repo/scripts/
4345
4446
- name: Prepare scripts
47+
if: steps.repo-list.outputs.skip != 'true'
4548
run: |
4649
set -euo pipefail
4750
mkdir -p scripts
@@ -57,6 +60,7 @@ jobs:
5760
rm -rf .defaults
5861
5962
- name: Mint fullsend token
63+
if: steps.repo-list.outputs.skip != 'true'
6064
id: app-token
6165
uses: fullsend-ai/fullsend/.github/actions/mint-token@v0
6266
with:
@@ -65,6 +69,7 @@ jobs:
6569
mint_url: ${{ vars.FULLSEND_MINT_URL }}
6670

6771
- name: Reconcile target repos
72+
if: steps.repo-list.outputs.skip != 'true'
6873
env:
6974
GH_TOKEN: ${{ steps.app-token.outputs.token }}
7075
WORKSPACE: ${{ github.workspace }}

0 commit comments

Comments
 (0)