ReviewOS

also looking at this

stacks/buddy

fix(setup): let the generated workflow's jobs actually start

#1418
Merged glennmichael123 wants to merge fix/workflow-reachability into main
3 files +224 -3
src/setup.tsmodified+18-1
Changes to src/setup.ts
@@ -1619,6 +1619,7 @@ jobs:
16191619 run_review: \${{ steps.determine.outputs.run_review }}
16201620 run_fixci: \${{ steps.determine.outputs.run_fixci }}
16211621 run_report: \${{ steps.determine.outputs.run_report }}
1622 run_any: \${{ steps.determine.outputs.run_any }}
16221623 steps:
16231624 - name: Determine which jobs to run
16241625 id: determine
@@ -1641,6 +1642,7 @@ jobs:
16411642 echo "run_command=false" >> \$GITHUB_OUTPUT
16421643 echo "run_review=false" >> \$GITHUB_OUTPUT
16431644 echo "run_fixci=false" >> \$GITHUB_OUTPUT
1645 echo "run_report=false" >> \$GITHUB_OUTPUT
16441646
16451647 if [ "\$" = "pull_request" ] && [ "\$" != "edited" ]; then
16461648 # Opened, marked ready, or pushed to — review it. Draft handling and
@@ -1723,12 +1725,27 @@ jobs:
17231725${renderScheduleDispatch(plan)}
17241726 fi
17251727
1728 # Every job below needs \`setup\`, and a job whose \`needs\` was skipped
1729 # is skipped with it — so \`setup\` has to run whenever anything does.
1730 # Derived from what was just written rather than restated, because
1731 # restating it is how review, command and fix-ci came to be
1732 # unreachable: each was added with its own output and nobody added it
1733 # to setup's condition.
1734 if grep -q '=true\$' "\$GITHUB_OUTPUT"; then
1735 echo "run_any=true" >> \$GITHUB_OUTPUT
1736 else
1737 echo "run_any=false" >> \$GITHUB_OUTPUT
1738 fi
1739
17261740 # Shared setup job for common dependencies
17271741 setup:
17281742 runs-on: ubuntu-latest
17291743 timeout-minutes: 10
17301744 needs: determine-jobs
1731 if: \${{ needs.determine-jobs.outputs.run_check == 'true' || needs.determine-jobs.outputs.run_update == 'true' || needs.determine-jobs.outputs.run_dashboard == 'true' || needs.determine-jobs.outputs.run_report == 'true' }}
1745 # \`gate\`, \`touch\`, \`post-merge\` and \`issue-links\` gate on \`github.event_name\`
1746 # rather than on an output, so those two events are named here instead of
1747 # having their conditions restated a second time and left to drift.
1748 if: \${{ needs.determine-jobs.outputs.run_any == 'true' || github.event_name == 'pull_request' || github.event_name == 'issues' }}
17321749 steps:
17331750 - name: Checkout repository
17341751 uses: actions/checkout@v4