ReviewOS

also looking at this

stacks/buddy

feat(touch): post the checkboxes the finishing-touch flow waits on

#1424
Merged glennmichael123 wants to merge fix/touch-offer into main
7 files +149 -5
src/setup.tsmodified+12-1
Changes to src/setup.ts
@@ -1823,7 +1823,10 @@ ${generateComposerSetupSteps()}
18231823 runs-on: ubuntu-latest
18241824 timeout-minutes: 30
18251825 needs: [determine-jobs, setup]
1826 if: \${{ github.event_name == 'pull_request' && github.event.action == 'edited' }}
1826 # Two moments, not one: the offer has to be posted before there is a box to
1827 # tick, and \`edited\` is when a tick arrives. Offering only on \`edited\`
1828 # would mean the checkboxes never appeared at all.
1829 if: \${{ github.event_name == 'pull_request' && (github.event.action == 'edited' || github.event.action == 'opened' || github.event.action == 'ready_for_review') }}
18271830
18281831 steps:
18291832 - name: Checkout repository
@@ -1838,7 +1841,15 @@ ${generateComposerSetupSteps()}
18381841 - name: Install dependencies
18391842 run: bun install
18401843
1844 # Idempotent: a body that already carries the offer is left alone, so a
1845 # pull request opened as a draft and later marked ready is not offered
1846 # a second set of boxes that tick independently of the first.
1847 - name: Offer finishing touches
1848 if: \${{ github.event.action != 'edited' }}
1849 run: bunx @buddysh/buddy touch \${{ github.event.pull_request.number }} --offer --verbose
1850
18411851 - name: Run finishing touches
1852 if: \${{ github.event.action == 'edited' }}
18421853 run: bunx @buddysh/buddy touch \${{ github.event.pull_request.number }} --verbose
18431854
18441855 # Post-merge actions. Guarded on the merged flag, because the closed action