chaffbroom 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/chaffbroom.js +12 -12
  2. package/package.json +1 -1
@@ -7389,8 +7389,8 @@ var BRAND = {
7389
7389
  sourceActionRef: "chaffbroom/chaffbroom/tollbook@v0",
7390
7390
  /** Default config file name, at the repository root. */
7391
7391
  configFile: ".tollbook.yml",
7392
- version: "0.3.2",
7393
- userAgent: "chaffbroom-tollbook/0.3.2 (+https://github.com/chaffbroom/chaffbroom/tree/main/tollbook#readme)",
7392
+ version: "0.3.4",
7393
+ userAgent: "chaffbroom-tollbook/0.3.4 (+https://github.com/chaffbroom/chaffbroom/tree/main/tollbook#readme)",
7394
7394
  /**
7395
7395
  * Hidden HTML comment that starts the sticky PR comment. The comment is ours only when it
7396
7396
  * starts with this AND was written by the identity we post as. Changing it orphans old comments.
@@ -8378,8 +8378,8 @@ var BRAND2 = {
8378
8378
  sourceActionRef: "chaffbroom/chaffbroom/winnow@v0",
8379
8379
  /** Default config file name, at the repository root. */
8380
8380
  configFile: ".winnow.yml",
8381
- version: "0.3.2",
8382
- userAgent: "chaffbroom-winnow/0.3.2 (+https://github.com/chaffbroom/chaffbroom/tree/main/winnow#readme)"
8381
+ version: "0.3.4",
8382
+ userAgent: "chaffbroom-winnow/0.3.4 (+https://github.com/chaffbroom/chaffbroom/tree/main/winnow#readme)"
8383
8383
  };
8384
8384
 
8385
8385
  // ../winnow/src/config.ts
@@ -9442,7 +9442,7 @@ var BRAND3 = {
9442
9442
  /** The command (the npm bin) and the npm package name. */
9443
9443
  bin: "chaffbroom",
9444
9444
  npmName: "chaffbroom",
9445
- version: "0.3.2",
9445
+ version: "0.3.4",
9446
9446
  repoUrl: "https://github.com/chaffbroom/chaffbroom",
9447
9447
  winnow: {
9448
9448
  displayName: "Chaffbroom Winnow",
@@ -9451,8 +9451,8 @@ var BRAND3 = {
9451
9451
  actionRef: "chaffbroom/winnow@v0",
9452
9452
  sourceActionRef: "chaffbroom/chaffbroom/winnow@v0",
9453
9453
  /** What init writes: the commit of the Action repo's v<pinnedVersion> tag. */
9454
- pinnedRef: "chaffbroom/winnow@76ac2825f14cc3083bd99a73e1a92abdaf2eff84",
9455
- pinnedVersion: "0.3.2",
9454
+ pinnedRef: "chaffbroom/winnow@e832fa88259b3d5b59af8cf8a32cf64ceae3b3fe",
9455
+ pinnedVersion: "0.3.4",
9456
9456
  configFile: ".winnow.yml",
9457
9457
  docsUrl: "https://github.com/chaffbroom/chaffbroom/tree/main/winnow#readme"
9458
9458
  },
@@ -9463,8 +9463,8 @@ var BRAND3 = {
9463
9463
  actionRef: "chaffbroom/tollbook@v0",
9464
9464
  sourceActionRef: "chaffbroom/chaffbroom/tollbook@v0",
9465
9465
  /** What init writes: the commit of the Action repo's v<pinnedVersion> tag. */
9466
- pinnedRef: "chaffbroom/tollbook@b4c3a0abdcffb03fdf6777365f9b4e9ca6ca9924",
9467
- pinnedVersion: "0.3.2",
9466
+ pinnedRef: "chaffbroom/tollbook@a3cf8436609d74268d43f2ed186f4de5bb225988",
9467
+ pinnedVersion: "0.3.4",
9468
9468
  configFile: ".tollbook.yml",
9469
9469
  docsUrl: "https://github.com/chaffbroom/chaffbroom/tree/main/tollbook#readme"
9470
9470
  }
@@ -9549,13 +9549,13 @@ import { parseArgs as parseArgs3 } from "node:util";
9549
9549
  var winnow_default = "# Example config. Copy to the repo root as .winnow.yml and keep only the providers you use.\nversion: 1\ngithub:\n repo: your-org/your-repo # defaults to $GITHUB_REPOSITORY in Actions\n\ndefaults:\n ttl: 7d # delete previews older than this (\"never\" to disable) -- but see reap_open\n grace_after_close: 1h # wait this long after a PR closes/merges before reaping\n reap_unmapped: false # resources with no PR mapping are listed, not deleted\n reap_open: false # TTL never deletes a preview whose PR is still open (or whose PR state\n # is unknown); true lets it. Merged/closed/missing-PR rules ignore this.\n\nprotect: # names or git branches that are never touched\n - main\n - staging\n\nproviders:\n neon:\n project_id: your-neon-project-id\n ttl: 3d\n branch_pattern: '^preview/(.+)$' # Neon's Vercel integration names branches preview/<git-branch>\n\n supabase:\n project_ref: yourprojectref # PR number comes from the branch's pr_number / git_branch\n\n vercel:\n project_id: prj_yourproject\n team_id: team_yourteam\n ttl: 14d # PR number from meta.githubPrId\n\n fly:\n mode: apps # one app per PR\n org_slug: your-org\n app_pattern: '^yourapp-pr-\\d+$' # required: only names matching this are in scope\n\n railway:\n project_id: your-railway-project-id # only ephemeral (PR) environments are listed; PR number is\n # read from the environment NAME (pr_pattern) -- Railway's PR\n # naming is unverified, check `winnow plan` before `apply`\n token_kind: account # or \"project\" (uses the Project-Access-Token header)\n\n cloudflare_pages:\n account_id: your-account-id\n project_name: your-pages-project\n\n cloudflare_workers: # report-only: Cloudflare has no version delete API, never deleted\n account_id: your-account-id\n script_name: your-worker\n ttl: 30d\n";
9550
9550
 
9551
9551
  // templates/tollbook-pr.yml
9552
- var tollbook_pr_default = "# Written by `npx chaffbroom init`. Chaffbroom Tollbook posts what GitHub Actions cost on each\n# pull request (reruns and cancelled runs included) as one sticky comment, updated after each\n# workflow below finishes. It uses GITHUB_TOKEN only.\n#\n# For a budget gate that shows as a check on the PR, add the `cost` job to your PR workflow\n# instead: see examples/workflows/tollbook-pr.yml in the Chaffbroom repository.\nname: Chaffbroom Tollbook PR\n\non:\n workflow_run:\n workflows: [\"CI\"] # the workflows that run on your pull requests\n types: [completed]\n\npermissions:\n actions: read\n contents: read\n pull-requests: write\n\nconcurrency:\n group: pr-cost-${{ github.event.workflow_run.head_branch }}\n cancel-in-progress: false # the newest run reports; nothing is cancelled\n\njobs:\n cost:\n # Only runs made for a PR in this repository (fork PRs are not listed on the run).\n if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0] != null\n runs-on: ubuntu-slim\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/tollbook@b4c3a0abdcffb03fdf6777365f9b4e9ca6ca9924 # v0.3.2\n with:\n mode: pr\n";
9552
+ var tollbook_pr_default = "# Written by `npx chaffbroom init`. Chaffbroom Tollbook posts what GitHub Actions cost on each\n# pull request (reruns and cancelled runs included) as one sticky comment, updated after each\n# workflow below finishes. It uses GITHUB_TOKEN only.\n#\n# For a budget gate that shows as a check on the PR, add the `cost` job to your PR workflow\n# instead: see examples/workflows/tollbook-pr.yml in the Chaffbroom repository.\nname: Chaffbroom Tollbook PR\n\non:\n workflow_run:\n workflows: [\"CI\"] # the workflows that run on your pull requests\n types: [completed]\n\npermissions:\n actions: read\n contents: read\n pull-requests: write\n\nconcurrency:\n group: pr-cost-${{ github.event.workflow_run.head_branch }}\n cancel-in-progress: false # the newest run reports; nothing is cancelled\n\njobs:\n cost:\n # Only runs made for a PR in this repository (fork PRs are not listed on the run).\n if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests[0] != null\n runs-on: ubuntu-slim\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/tollbook@a3cf8436609d74268d43f2ed186f4de5bb225988 # v0.3.4\n with:\n mode: pr\n";
9553
9553
 
9554
9554
  // templates/tollbook-weekly.yml
9555
- var tollbook_weekly_default = '# Written by `npx chaffbroom init`. Chaffbroom Tollbook\'s weekly summary: the most expensive\n# workflows and the rerun waste of the last 7 days, in the job summary and as an issue.\nname: Chaffbroom Tollbook weekly\n\non:\n schedule:\n - cron: "0 7 * * 1" # Mondays 07:00 UTC\n workflow_dispatch:\n\npermissions:\n actions: read\n contents: read\n issues: write\n pull-requests: read # to name the PRs of merged branches\n\njobs:\n summary:\n runs-on: ubuntu-slim\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/tollbook@b4c3a0abdcffb03fdf6777365f9b4e9ca6ca9924 # v0.3.2\n with:\n mode: weekly\n days: "7"\n top: "5"\n issue: "true" # also opens an issue; the job summary always has it\n';
9555
+ var tollbook_weekly_default = '# Written by `npx chaffbroom init`. Chaffbroom Tollbook\'s weekly summary: the most expensive\n# workflows and the rerun waste of the last 7 days, in the job summary and as an issue.\nname: Chaffbroom Tollbook weekly\n\non:\n schedule:\n - cron: "0 7 * * 1" # Mondays 07:00 UTC\n workflow_dispatch:\n\npermissions:\n actions: read\n contents: read\n issues: write\n pull-requests: read # to name the PRs of merged branches\n\njobs:\n summary:\n runs-on: ubuntu-slim\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/tollbook@a3cf8436609d74268d43f2ed186f4de5bb225988 # v0.3.4\n with:\n mode: weekly\n days: "7"\n top: "5"\n issue: "true" # also opens an issue; the job summary always has it\n';
9556
9556
 
9557
9557
  // templates/winnow.yml
9558
- var winnow_default2 = "# Written by `npx chaffbroom init`. Chaffbroom Winnow deletes preview environments whose pull\n# request is merged, closed or missing, or that are past their TTL (rules in .winnow.yml).\n#\n# It starts in plan mode: each run lists what it would delete in the job summary and deletes\n# nothing. When the plan looks right, set WINNOW_MODE below to apply. A manual run can pick\n# the mode either way (Actions > Chaffbroom Winnow > Run workflow).\nname: Chaffbroom Winnow\n\non:\n schedule:\n - cron: \"17 3 * * *\" # nightly: everything past its TTL or orphaned\n pull_request:\n types: [closed] # as soon as a PR closes or merges: only that PR's previews\n workflow_dispatch:\n inputs:\n mode:\n description: plan or apply\n default: plan\n\nenv:\n WINNOW_MODE: plan # plan lists, apply deletes\n\npermissions:\n contents: read\n pull-requests: read\n\nconcurrency:\n group: preview-cleanup\n cancel-in-progress: false\n\njobs:\n winnow:\n # Fork PRs get no secrets, so there is nothing to clean up with.\n if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/winnow@76ac2825f14cc3083bd99a73e1a92abdaf2eff84 # v0.3.2\n with:\n mode: ${{ inputs.mode || env.WINNOW_MODE }}\n yes: ${{ (inputs.mode || env.WINNOW_MODE) == 'apply' }}\n pr: ${{ github.event.pull_request.number }}\n max-deletes: \"50\"\n neon-api-key: ${{ secrets.NEON_API_KEY }}\n supabase-access-token: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n vercel-token: ${{ secrets.VERCEL_TOKEN }}\n fly-api-token: ${{ secrets.FLY_API_TOKEN }}\n railway-token: ${{ secrets.RAILWAY_TOKEN }}\n cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}\n";
9558
+ var winnow_default2 = "# Written by `npx chaffbroom init`. Chaffbroom Winnow deletes preview environments whose pull\n# request is merged, closed or missing, or that are past their TTL (rules in .winnow.yml).\n#\n# It starts in plan mode: each run lists what it would delete in the job summary and deletes\n# nothing. When the plan looks right, set WINNOW_MODE below to apply. A manual run can pick\n# the mode either way (Actions > Chaffbroom Winnow > Run workflow).\nname: Chaffbroom Winnow\n\non:\n schedule:\n - cron: \"17 3 * * *\" # nightly: everything past its TTL or orphaned\n pull_request:\n types: [closed] # as soon as a PR closes or merges: only that PR's previews\n workflow_dispatch:\n inputs:\n mode:\n description: plan or apply\n default: plan\n\nenv:\n WINNOW_MODE: plan # plan lists, apply deletes\n\npermissions:\n contents: read\n pull-requests: read\n\nconcurrency:\n group: preview-cleanup\n cancel-in-progress: false\n\njobs:\n winnow:\n # Fork PRs get no secrets, so there is nothing to clean up with.\n if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n # Pinned to the commit of a release, so a moved tag cannot change what runs. @v0\n # instead takes every 0.x release as it comes out.\n - uses: chaffbroom/winnow@e832fa88259b3d5b59af8cf8a32cf64ceae3b3fe # v0.3.4\n with:\n mode: ${{ inputs.mode || env.WINNOW_MODE }}\n yes: ${{ (inputs.mode || env.WINNOW_MODE) == 'apply' }}\n pr: ${{ github.event.pull_request.number }}\n max-deletes: \"50\"\n neon-api-key: ${{ secrets.NEON_API_KEY }}\n supabase-access-token: ${{ secrets.SUPABASE_ACCESS_TOKEN }}\n vercel-token: ${{ secrets.VERCEL_TOKEN }}\n fly-api-token: ${{ secrets.FLY_API_TOKEN }}\n railway-token: ${{ secrets.RAILWAY_TOKEN }}\n cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}\n";
9559
9559
 
9560
9560
  // src/init.ts
9561
9561
  var PROVIDER_SECRETS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chaffbroom",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Delete orphaned preview environments (Chaffbroom Winnow) and see what GitHub Actions costs per pull request (Chaffbroom Tollbook). init writes the GitHub workflows.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "author": "Chaffbroom authors",