also looking at this
feat(setup): make the preset you pick the preset you get
#1412
10 files
+507
-61
| @@ -280,7 +280,7 @@ Generates two workflows: | ||
| 280 | 280 | |
| 281 | 281 | #### 1. Unified Workflow (`buddy.yml`) |
| 282 | 282 | |
| 283 | - **Schedule**: dependency updates every 2 hours, dashboard 15 minutes later, cleanup daily at 4 AM UTC, health report Monday at 9 AM UTC | |
| 283 | - **Schedule**: set by the preset you chose — see [Preset Details](#preset-details). Branch cleanup (daily, 4 AM UTC) and the dependency-health report (Monday, 9 AM UTC) are fixed, because housekeeping is the same job at any cadence | |
| 284 | 284 | - **Events**: `pull_request`, `issues`, `issue_comment`, `pull_request_review_comment` and `workflow_run`, so a ticked rebase box or an `@buddy` comment is acted on immediately rather than waited for |
| 285 | 285 | - **Purpose**: One workflow covering checks, updates, the dashboard, reviews and comment commands |
| 286 | 286 | - **Features**: `workflow_dispatch` with a `job` input to run a single job by hand |
| @@ -430,7 +430,11 @@ buddy setup --non-interactive --token-setup new-pat | ||
| 430 | 430 | |
| 431 | 431 | ### Preset Options |
| 432 | 432 | |
| 433 | Every preset writes the same `buddy.yml`: dependency updates every 2 hours on the `patch` strategy, the dashboard 15 minutes behind them, and a manual trigger for running any single job. The preset records the cadence you intended — change the cadence itself in the workflow's `schedule:` block afterwards. | |
| 433 | The preset you choose decides the generated workflow's update and dashboard | |
| 434 | schedules, its default update strategy, and whether the generated config turns | |
| 435 | auto-merge on. Branch cleanup and the health report are the same in every | |
| 436 | preset. Nothing is locked in — the `schedule:` block is ordinary YAML you can | |
| 437 | edit afterwards. | |
| 434 | 438 | |
| 435 | 439 | #### Standard Preset |
| 436 | 440 | |
| @@ -741,7 +745,34 @@ Configure GitHub Actions permissions: | ||
| 741 | 745 | |
| 742 | 746 | ## Preset Details |
| 743 | 747 | |
| 744 | A preset is a statement of intent. Setup prints the one you chose and then writes the same `buddy.yml` for every preset: dependency updates every 2 hours (`0 */2 * * *`) on the `patch` strategy, the dashboard 15 minutes later, branch cleanup daily at 4 AM UTC and a dependency-health report on Monday at 9 AM UTC. Edit that `schedule:` block to change the cadence. | |
| 748 | A preset sets four things: when dependency updates run, when the dashboard | |
| 749 | refreshes, which update strategy scheduled runs use, and whether the generated | |
| 750 | `buddy.config.ts` enables auto-merge. | |
| 751 | ||
| 752 | Two schedules are the same in every preset, because housekeeping does not get | |
| 753 | cheaper or riskier with cadence: branch cleanup daily at 4 AM UTC, and a | |
| 754 | dependency-health report on Monday at 9 AM UTC. | |
| 755 | ||
| 756 | Where a preset gives updates and the dashboard the same expression — most of | |
| 757 | them do — one cron entry starts both jobs rather than one of them winning. | |
| 758 | A preset that says `manual` for a schedule gets no scheduled trigger for that | |
| 759 | job at all; run it from the Actions tab. | |
| 760 | ||
| 761 | | Preset | Updates | Dashboard | Strategy | Auto-merge | | |
| 762 | | --- | --- | --- | --- | --- | | |
| 763 | | Standard | `0 9 * * 1,3,5` | same tick | `all` | — | | |
| 764 | | High Frequency | `0 */6 * * *` | `0 9 * * *` | `all` | patch only | | |
| 765 | | Security Focused | `0 */4 * * *` | `0 9 * * *` | `all` | patch only | | |
| 766 | | Minimal | `0 9 * * 1` | same tick | `all` | — | | |
| 767 | | Docker | `0 9 * * 1` | same tick | `all` | — | | |
| 768 | | Monorepo | `0 9 * * *` | same tick | `all` | — | | |
| 769 | | Development/Testing | `*/15 * * * *` | manual | `patch` | — | | |
| 770 | | Custom | manual | manual | `all` | — | | |
| 771 | ||
| 772 | Auto-merge is scoped to patch updates wherever a preset enables it. The preset | |
| 773 | carries a bare on/off, and generating an unconditional auto-merge from that | |
| 774 | would hand a new repository something more dangerous than the preset | |
| 775 | describes — widen it deliberately in `buddy.config.ts` if you want more. | |
| 745 | 776 | |
| 746 | 777 | ### Standard Setup (Recommended) |
| 747 | 778 | |