@cldmv/gh-broker 0.7.0 → 0.9.0

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 (107) hide show
  1. package/README.md +165 -41
  2. package/config.example.json +38 -9
  3. package/config.sample.json +45 -0
  4. package/deploy/README.md +76 -17
  5. package/deploy/install.mjs +171 -104
  6. package/deploy/install.sh +0 -0
  7. package/deploy/lib/config-merge.mjs +174 -16
  8. package/deploy/lib/credentials.mjs +143 -0
  9. package/deploy/lib/install-args.mjs +144 -0
  10. package/deploy/lib/npm-setup.mjs +164 -0
  11. package/deploy/lib/secret-store.mjs +20 -2
  12. package/deploy/lib/system.mjs +26 -2
  13. package/dist/index.mjs +5864 -1809
  14. package/dist/index.mjs.map +4 -4
  15. package/package.json +18 -8
  16. package/.configs/fix-headers.json +0 -3
  17. package/.configs/vitest.config.mjs +0 -44
  18. package/.github/dependabot.yml +0 -111
  19. package/.github/workflows/branch-retention.yml +0 -44
  20. package/.github/workflows/bundle-size.yml +0 -52
  21. package/.github/workflows/ci.yml +0 -389
  22. package/.github/workflows/cla.yml +0 -66
  23. package/.github/workflows/codeql.yml +0 -87
  24. package/.github/workflows/dependabot-auto-merge.yml +0 -62
  25. package/.github/workflows/dependabot-recreate.yml +0 -67
  26. package/.github/workflows/dependency-review.yml +0 -46
  27. package/.github/workflows/feature-pr.yml +0 -75
  28. package/.github/workflows/hotfix-redirector.yml +0 -67
  29. package/.github/workflows/hotfixes-release.yml +0 -70
  30. package/.github/workflows/labeler.yml +0 -48
  31. package/.github/workflows/master-commit-audit.yml +0 -56
  32. package/.github/workflows/member-auto-merge.yml +0 -75
  33. package/.github/workflows/next-release.yml +0 -76
  34. package/.github/workflows/next-reset.yml +0 -50
  35. package/.github/workflows/pr-notify.yml +0 -44
  36. package/.github/workflows/pr-title-normalizer.yml +0 -52
  37. package/.github/workflows/provenance.yml +0 -51
  38. package/.github/workflows/publish.yml +0 -146
  39. package/.github/workflows/release-merge.yml +0 -104
  40. package/.github/workflows/release-notify.yml +0 -41
  41. package/.github/workflows/scorecard.yml +0 -64
  42. package/.github/workflows/stale.yml +0 -50
  43. package/.github/workflows/tag-health.yml +0 -70
  44. package/.github/workflows/update-major-version-tags.yml +0 -94
  45. package/.github/workflows/v4-bootstrap.yml +0 -115
  46. package/.github/workflows/welcome.yml +0 -42
  47. package/docs/TOOLS.md +0 -347
  48. package/docs/agent-user-model.md +0 -89
  49. package/docs/changelog/v0/v0.2.0.md +0 -26
  50. package/docs/changelog/v0/v0.2.1.md +0 -23
  51. package/docs/changelog/v0/v0.2.2.md +0 -23
  52. package/docs/changelog/v0/v0.2.3.md +0 -33
  53. package/docs/changelog/v0/v0.2.4.md +0 -25
  54. package/docs/changelog/v0/v0.2.5.md +0 -29
  55. package/docs/changelog/v0/v0.3.0.md +0 -84
  56. package/docs/changelog/v0/v0.3.1.md +0 -30
  57. package/docs/changelog/v0/v0.3.2.md +0 -24
  58. package/docs/changelog/v0/v0.3.3.md +0 -28
  59. package/docs/changelog/v0/v0.4.0.md +0 -58
  60. package/docs/changelog/v0/v0.4.1.md +0 -33
  61. package/docs/changelog/v0/v0.4.2.md +0 -45
  62. package/docs/changelog/v0/v0.5.0.md +0 -39
  63. package/docs/changelog/v0/v0.5.1.md +0 -28
  64. package/docs/changelog/v0/v0.6.0.md +0 -52
  65. package/docs/changelog/v0/v0.6.1.md +0 -48
  66. package/docs/changelog/v0/v0.7.0.md +0 -71
  67. package/docs/deploy-architecture.md +0 -82
  68. package/src/appauth.ts +0 -56
  69. package/src/audit.ts +0 -34
  70. package/src/catalog.ts +0 -165
  71. package/src/config.ts +0 -130
  72. package/src/index.ts +0 -107
  73. package/src/paths.ts +0 -60
  74. package/src/router.ts +0 -258
  75. package/src/secrets.ts +0 -137
  76. package/src/server.ts +0 -91
  77. package/src/types.ts +0 -104
  78. package/src/upstream.ts +0 -85
  79. package/src/verbs/issue_labels.ts +0 -329
  80. package/src/verbs/link_issue.ts +0 -84
  81. package/src/verbs/release-analysis.ts +0 -210
  82. package/src/verbs/repo-tier.ts +0 -90
  83. package/src/verbs/report_ci_status.ts +0 -358
  84. package/src/verbs/report_release_prs.ts +0 -238
  85. package/src/verbs/report_security_alerts.ts +0 -442
  86. package/src/verbs/report_unlabeled.ts +0 -194
  87. package/src/verbs/rest-client.ts +0 -181
  88. package/src/verbs/review_thread.ts +0 -138
  89. package/tests/appauth.test.vitest.mts +0 -76
  90. package/tests/audit.test.vitest.mts +0 -48
  91. package/tests/catalog.test.vitest.mts +0 -180
  92. package/tests/config-merge.test.vitest.mts +0 -58
  93. package/tests/config.test.vitest.mts +0 -314
  94. package/tests/issue-labels.test.vitest.mts +0 -347
  95. package/tests/paths.test.vitest.mts +0 -52
  96. package/tests/release-prs.test.vitest.mts +0 -237
  97. package/tests/rest-client.test.vitest.mts +0 -115
  98. package/tests/router.test.vitest.mts +0 -399
  99. package/tests/run-vitest.mjs +0 -51
  100. package/tests/secret-store.test.vitest.mts +0 -106
  101. package/tests/secrets.test.vitest.mts +0 -155
  102. package/tests/security-alerts.test.vitest.mts +0 -328
  103. package/tests/server.test.vitest.mts +0 -20
  104. package/tests/upstream.test.vitest.mts +0 -91
  105. package/tests/verb-helpers.test.vitest.mts +0 -331
  106. package/tests/verbs.test.vitest.mts +0 -624
  107. package/tsconfig.json +0 -21
@@ -1,67 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/dependabot-recreate.yml
4
- # @Date: 2026-07-31T00:00:00-07:00 (1785481200)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/dependabot-recreate.yml
15
- #
16
- # Auto-fires `@dependabot recreate` when a Dependabot PR gets stuck in the
17
- # "edited by someone other than Dependabot" state. That state breaks
18
- # `@dependabot rebase` and — under a required-signed-commits ruleset — blocks
19
- # the PR with an unsigned commit. `recreate` rebuilds it as a fresh, signed
20
- # Dependabot commit that dependabot-auto-merge.yml then merges. See
21
- # reusable-dependabot-recreate.yml for the mechanics + the command-actor caveat.
22
- #
23
- # Default in v4: ON. Delete this file to opt out entirely; add a `no-recreate`
24
- # label to a specific PR to exempt just that one (e.g. one you've hand-edited
25
- # on purpose and don't want overwritten).
26
- #
27
- # Triggers:
28
- # - issue_comment: catches Dependabot's own "can't rebase, use recreate" reply
29
- # (Dependabot only comments back when a rebase FAILS — success is a silent
30
- # 👍 + force-push).
31
- # - pull_request_target: proactive net for a Dependabot PR whose head commit
32
- # is unverified. pull_request_target (not pull_request) is required so the
33
- # job can read the bot-App secrets — Dependabot-triggered `pull_request`
34
- # runs get a read-only token and no secrets. It is SAFE here: Dependabot PRs
35
- # are same-repo branches (not forks), and this workflow never checks out or
36
- # runs PR code — it only reads the PR and posts a comment via the API.
37
- name: 🔁 Dependabot Auto-Recreate
38
-
39
- on:
40
- issue_comment:
41
- types: [created]
42
- pull_request_target:
43
- types: [opened, synchronize, reopened]
44
-
45
- permissions:
46
- contents: read
47
- pull-requests: write
48
- issues: write
49
-
50
- jobs:
51
- recreate:
52
- # A) Dependabot replied that it can't rebase (the PR was edited), or
53
- # B) a Dependabot PR opened/updated — the reusable then checks whether
54
- # its head commit is actually unverified before doing anything.
55
- if: >-
56
- (github.event_name == 'issue_comment'
57
- && github.event.issue.pull_request
58
- && github.event.comment.user.login == 'dependabot[bot]'
59
- && contains(github.event.comment.body, 'edited by someone other than Dependabot'))
60
- || (github.event_name == 'pull_request_target'
61
- && github.event.pull_request.user.login == 'dependabot[bot]')
62
- uses: CLDMV/.github/.github/workflows/reusable-dependabot-recreate.yml@v4
63
- with:
64
- skip_label: "no-recreate"
65
- secrets:
66
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
67
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -1,46 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/dependency-review.yml
4
- # @Date: 2026-05-20T00:00:00-07:00 (1779260400)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/dependency-review.yml
15
- #
16
- # PRIVATE REPOS are skipped by DEFAULT (the dependency-review API needs
17
- # GitHub Advanced Security there): the bootstrap's `variables` phase sets
18
- # CLDMV_SKIP_DEPENDENCY_REVIEW on every private repo not opted into the
19
- # `scan` list in data/code-scanning-skips.json in CLDMV/.github. To run the
20
- # review on a private repo, pay for Code Security and add it to that list.
21
- # Consumers outside CLDMV can pass `skip_dependency_review: true` below
22
- # instead.
23
- name: 🔒 Dependency Review
24
-
25
- on:
26
- pull_request:
27
- types: [opened, synchronize, reopened, ready_for_review]
28
- branches: [master, main]
29
-
30
- permissions:
31
- contents: read
32
- pull-requests: write
33
-
34
- jobs:
35
- review:
36
- uses: CLDMV/.github/.github/workflows/reusable-dependency-review.yml@v4
37
- with:
38
- fail_on_severity: "moderate"
39
- # Per-repo license policy override:
40
- # deny_licenses: "AGPL-3.0,LGPL-3.0" # block copyleft for an Apache-2.0 repo
41
- # Bot App credentials. When set, the dependency-review PR comment is
42
- # posted by the consumer's bot App instead of github-actions[bot].
43
- # Both lines are optional; remove them to fall back to GITHUB_TOKEN.
44
- secrets:
45
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
46
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -1,75 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/feature-pr.yml
4
- # @Date: 2026-08-02T16:55:52-07:00 (1785714952)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/feature-pr.yml
15
- #
16
- # v4 ergonomics: auto-opens (and refreshes) a PR from a code-side branch to the
17
- # right integration branch on every push.
18
- #
19
- # Mapping (matches CLDMV/.github docs/conventions/branch-naming.md):
20
- # feat/*, feature/*, fix/*, release/*, chore/*, deps/*, refactor/*,
21
- # docs/*, ci/*, perf/*, test/*, style/* → next
22
- # hotfix/* → hotfixes
23
- #
24
- # Reserved branches NOT auto-PR'd: dependabot/* and copilot/* (they manage their
25
- # own PRs); badges, gh-pages (bot-only); master/main (the target).
26
- #
27
- # Thin caller: all job logic (target detection, changelog body, PR create/
28
- # refresh) lives in the reusable, pinned at @v4. Bumping the pin carries fixes
29
- # without editing this file. The `push` trigger and its branch-prefix list stay
30
- # here (GitHub requires the trigger local, and the list is per-repo config).
31
- name: 🔀 Feature PR (v4)
32
-
33
- on:
34
- push:
35
- branches:
36
- # CUSTOMIZE: prune this list to whichever branch prefixes your
37
- # repo uses. Must align with the `case` statement in the reusable.
38
- - 'feat/**'
39
- - 'feature/**'
40
- - 'fix/**'
41
- - 'release/**'
42
- - 'chore/**'
43
- - 'deps/**'
44
- - 'refactor/**'
45
- - 'docs/**'
46
- - 'ci/**'
47
- - 'perf/**'
48
- - 'test/**'
49
- - 'style/**'
50
- - 'hotfix/**'
51
-
52
- concurrency:
53
- group: feature-pr-${{ github.repository }}-${{ github.ref }}
54
- cancel-in-progress: false
55
-
56
- permissions:
57
- contents: read
58
-
59
- jobs:
60
- open-pr:
61
- permissions:
62
- contents: read
63
- pull-requests: write
64
- uses: CLDMV/.github/.github/workflows/workflow-feature-pr.yml@v4
65
- secrets:
66
- # Map your repo/org secrets to the expected names.
67
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
68
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
69
- # Optional: only needed if you also use reusable-lint-format.yml /
70
- # reusable-coverage-badge.yml (or otherwise sign a commit locally as
71
- # this identity). Passed through so this PR's changelog body
72
- # recognizes that identity as a bot instead of listing it as a
73
- # contributor.
74
- BOT_NAME: ${{ secrets.CLDMV_BOT_NAME }}
75
- BOT_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
@@ -1,67 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/hotfix-redirector.yml
4
- # @Date: 2026-05-22T00:00:00-07:00 (1779433200)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/hotfix-redirector.yml
15
- #
16
- # v4 hotfix lane: retarget hotfix/security PRs to the `hotfixes` branch.
17
- #
18
- # Two paths trigger a redirect (CLDMV/.github docs/conventions/release-flow-v4.md §5.2, §6.5):
19
- # 1. Head branch matches `hotfix/*` or `security/*` (human-driven hotfix flow).
20
- # 2. Author is `dependabot[bot]` AND its base isn't Dependabot's routine
21
- # target-branch (default "next") — GitHub always overrides dependabot.yml's
22
- # target-branch for security updates, so a base landing on the default
23
- # branch instead of "next" is itself the signal. Routine version bumps stay
24
- # on "next".
25
- #
26
- # Thin caller: all job logic (token, checkout, git identity, redirect action)
27
- # lives in the reusable, pinned at @v4. Bumping the pin carries new requirements
28
- # (e.g. the checkout + git identity the cherry-pick path needs) without editing
29
- # this file.
30
- name: 🔀 Hotfix PR Redirector (v4)
31
-
32
- # SECURITY NOTE: pull_request_target runs in the BASE repo's context with WRITE
33
- # permissions + secrets. The reusable checks out `hotfixes` (a trusted base-repo
34
- # branch, NOT the PR head/fork) and only cherry-picks/pushes against it.
35
- #
36
- # `opened` only (NOT `edited`): if a maintainer manually re-targets the PR, we
37
- # must not fight them by redirecting again.
38
- on:
39
- pull_request_target:
40
- types: [opened]
41
-
42
- concurrency:
43
- group: hotfix-redirector-${{ github.event.pull_request.number }}
44
- cancel-in-progress: true
45
-
46
- permissions:
47
- contents: read
48
-
49
- jobs:
50
- redirect:
51
- permissions:
52
- contents: write
53
- pull-requests: write
54
- uses: CLDMV/.github/.github/workflows/workflow-hotfix-redirector.yml@v4
55
- secrets:
56
- # Map your repo/org secrets to the expected names.
57
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
58
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
59
- # GPG signing identity — REQUIRED if this repo redirects Dependabot
60
- # SECURITY PRs: that path cherry-picks a commit onto `hotfixes`, and
61
- # an unsigned commit is silently blocked by required-signatures (no
62
- # failing check names the cause). The commit is signed and authored as
63
- # this real-user bot account (the GPG key's owner), not the App bot.
64
- BOT_NAME: ${{ secrets.CLDMV_BOT_NAME }}
65
- BOT_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
66
- BOT_GPG_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_GPG_PRIVATE_KEY }}
67
- BOT_GPG_PASSPHRASE: ${{ secrets.CLDMV_BOT_GPG_PASSPHRASE }}
@@ -1,70 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/hotfixes-release.yml
4
- # @Date: 2026-05-22T00:00:00-07:00 (1779433200)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/hotfixes-release.yml
15
- #
16
- # v4 hotfix lane: maintain the ONE persistent `hotfixes → master` release PR.
17
- #
18
- # Mirror of next-release.yml but for the `hotfixes` integration branch
19
- # (CLDMV/.github docs/conventions/release-flow-v4.md §5.4, §6.2). Fires on every
20
- # push to `hotfixes` (hotfix/security PR squash-merges land here), and
21
- # resolves-or-creates the persistent `hotfixes → master` release PR.
22
- #
23
- # Thin caller: all job logic (plan / create / refresh) lives in the reusable,
24
- # pinned at @v4. Bumping the pin carries fixes without editing this file.
25
- # CUSTOMIZE `package_name` / `build_command` to match your package (same values
26
- # as your next-release.yml).
27
- name: 🚑 Hotfixes Release (v4)
28
-
29
- on:
30
- push:
31
- branches: [hotfixes]
32
- workflow_dispatch: # manual kick — e.g. to open/refresh the PR for content already on `hotfixes`
33
-
34
- concurrency:
35
- group: hotfixes-release-${{ github.repository }}
36
- cancel-in-progress: false
37
-
38
- permissions:
39
- contents: read
40
-
41
- jobs:
42
- release:
43
- permissions:
44
- contents: write
45
- pull-requests: write
46
- uses: CLDMV/.github/.github/workflows/workflow-hotfixes-release.yml@v4
47
- with:
48
- package_name: "@cldmv/gh-broker"
49
- build_command: "npm run build:ci"
50
- secrets:
51
- # Map your repo/org secrets to the expected names.
52
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
53
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
54
- # Optional: only needed if you also use reusable-lint-format.yml /
55
- # reusable-coverage-badge.yml (or otherwise sign a commit locally as
56
- # this identity). Passed through so the release-PR changelog
57
- # recognizes that identity as a bot instead of listing it as a
58
- # contributor — see CLDMV_BOT_NAME/CLDMV_BOT_EMAIL in your other
59
- # workflows for the same values.
60
- BOT_NAME: ${{ secrets.CLDMV_BOT_NAME }}
61
- BOT_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
62
- # Optional release-PR notifier webhooks — each is independently
63
- # opt-in: leave one unset and that channel is silently skipped.
64
- # Delete the lines you don't use.
65
- DISCORD_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PR_PUBLIC_WEBHOOK }}
66
- DISCORD_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PR_PRIVATE_WEBHOOK }}
67
- SLACK_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.SLACK_RELEASE_PR_PUBLIC_WEBHOOK }}
68
- SLACK_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.SLACK_RELEASE_PR_PRIVATE_WEBHOOK }}
69
- GENERIC_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.GENERIC_RELEASE_PR_PUBLIC_WEBHOOK }}
70
- GENERIC_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.GENERIC_RELEASE_PR_PRIVATE_WEBHOOK }}
@@ -1,48 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/labeler.yml
4
- # @Date: 2026-05-20T00:00:00-07:00 (1779260400)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/labeler.yml
15
- #
16
- # Path-based PR auto-labeler. Uses CLDMV's org-default labeler.default.yml;
17
- # override per-repo by adding .github/labeler.yml in this repo (same shape).
18
- #
19
- # Labels applied additively — never removes labels added by humans or other
20
- # automation.
21
- #
22
- # Batch 5.2 from tmp/plan-future-workflows.md.
23
- name: 🏷️ PR Labeler
24
-
25
- # SECURITY NOTE: This workflow uses pull_request_target so it can apply labels
26
- # to fork PRs. pull_request_target runs in the BASE repo's context with WRITE
27
- # permissions and access to secrets. This is SAFE for THIS workflow because:
28
- # - We never checkout the PR head ref
29
- # - We never run code from the PR (no `run:` step uses PR data)
30
- # - We only call REST APIs to read the file list and post labels
31
- # DO NOT add a checkout step or any step that executes PR-supplied content
32
- # (build commands, scripts, test runs, etc.) to this workflow.
33
- on:
34
- pull_request_target:
35
- types: [opened, synchronize, reopened, ready_for_review]
36
-
37
- permissions:
38
- contents: read
39
- pull-requests: write
40
-
41
- jobs:
42
- label:
43
- uses: CLDMV/.github/.github/workflows/reusable-pr-labeler.yml@v4
44
- # Optional. Without these, labels are attributed to github-actions[bot].
45
- # With these, they're attributed to your CLDMV bot App.
46
- secrets:
47
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
48
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -1,56 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/master-commit-audit.yml
4
- # @Date: 2026-05-20T00:00:00-07:00 (1779260400)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/master-commit-audit.yml
15
- #
16
- # Post-merge safety net: when any commit lands on the default branch, verify
17
- # its subject matches the expected release-flow patterns. On miss, auto-file a
18
- # GitHub Issue (deduped by SHA) so the alert is persistent and assignable —
19
- # not just a red ❌ that dies in inbox.
20
- #
21
- # Catches: release-workflow title-generation regressions, branch-protection
22
- # bypasses, unexpected bot commits, direct emergency pushes.
23
- #
24
- # Thin caller: steps, the action ref, and the canonical commit-subject pattern
25
- # set all live in reusable-master-commit-audit.yml@v4 (the patterns come from
26
- # the audit-commit-subject action's default). Nothing here can drift.
27
- name: 🧾 Master Commit Audit
28
-
29
- on:
30
- push:
31
- branches: [master, main]
32
-
33
- permissions:
34
- contents: read
35
- issues: write
36
-
37
- jobs:
38
- audit:
39
- uses: CLDMV/.github/.github/workflows/reusable-master-commit-audit.yml@v4
40
- with:
41
- # allowed_patterns omitted → inherit the canonical default
42
- # (release + chore + merge). Uncomment ONLY if this repo lands other
43
- # commit shapes directly on the default branch:
44
- # allowed_patterns: |
45
- # ^release: v\d+\.\d+\.\d+( - .+?)?( \(#\d+\))?$
46
- # ^chore(\([^)]+\))?: .+
47
- # ^Merge pull request #\d+ from .+
48
- # ^feat(\([^)]+\))?: .+
49
- issue_labels: "type: ci,priority: high"
50
- # issue_assignee: "shinrai" # uncomment to auto-assign
51
- # Optional bot App credentials — when set, the audit issue is filed by
52
- # the consumer's bot App instead of github-actions[bot]. Remove both
53
- # lines to fall back to GITHUB_TOKEN.
54
- secrets:
55
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
56
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -1,75 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/member-auto-merge.yml
4
- # @Date: 2026-05-28T00:00:00-07:00 (1779951600)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/member-auto-merge.yml
15
- #
16
- # Auto-enables GitHub's "auto-merge" flag on PRs opened by org members
17
- # against `next` or `hotfixes`, scoped to the standard branch-prefix
18
- # conventions (feat/, fix/, hotfix/, chore/, …). Removes the per-PR
19
- # friction of clicking "Enable auto-merge" — the merge still waits for
20
- # the ruleset's prerequisites (required approvals + CI green).
21
- #
22
- # This does NOT approve the PR. The human-review gate stays intact —
23
- # unlike `dependabot-auto-merge.yml` which bot-approves Dependabot bumps.
24
- #
25
- # Default in v4: ON. To opt out, delete this file — member PRs still
26
- # require a manual "Enable auto-merge" click but otherwise work normally.
27
- #
28
- # Required setup (one-time per repo, both done by `v4-bootstrap.yml`):
29
- # 1. Settings → Pull Requests → "Allow auto-merge" → ON
30
- # 2. A ruleset on next/hotfixes with required status checks AND a
31
- # required-approving-review count ≥ 1 (the default v4 rulesets do
32
- # both). The action refuses to enable auto-merge on a branch
33
- # without required checks; the ruleset's approval requirement is
34
- # what keeps a human in the loop after auto-merge is enabled.
35
- name: 🚀 Member Auto-Enable Auto-Merge
36
-
37
- on:
38
- pull_request_target:
39
- types: [opened, reopened, synchronize, ready_for_review]
40
-
41
- permissions:
42
- contents: read
43
- pull-requests: write
44
-
45
- # Collapse a burst of pushes to one run per PR; the latest state always wins.
46
- concurrency:
47
- group: member-auto-merge-${{ github.event.pull_request.number }}
48
- cancel-in-progress: true
49
-
50
- jobs:
51
- enable:
52
- # Pre-filter at workflow level so this doesn't spin up for every PR.
53
- # The action repeats these checks for defense in depth (and clearer
54
- # skip-reason logging), so trimming this `if` is fine; widening it
55
- # is fine too — the action will skip anything that doesn't match.
56
- if: |
57
- github.event.pull_request.draft == false &&
58
- (
59
- github.event.pull_request.author_association == 'MEMBER' ||
60
- github.event.pull_request.author_association == 'OWNER' ||
61
- github.event.pull_request.author_association == 'COLLABORATOR'
62
- ) &&
63
- (
64
- github.event.pull_request.base.ref == 'next' ||
65
- github.event.pull_request.base.ref == 'hotfixes'
66
- )
67
- uses: CLDMV/.github/.github/workflows/reusable-member-auto-merge.yml@v4
68
- with:
69
- merge_method: "MERGE"
70
- # CUSTOMIZE: tighten or widen as your repo requires.
71
- # allowed_associations: "MEMBER,OWNER,COLLABORATOR"
72
- # branch_prefixes: "feat,feature,fix,hotfix,chore,refactor,docs,ci,perf,test,style"
73
- secrets:
74
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
75
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -1,76 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/next-release.yml
4
- # @Date: 2026-05-22T00:00:00-07:00 (1779433200)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/next-release.yml
15
- #
16
- # v4 core: maintain the ONE persistent `next → master` release PR for this repo.
17
- #
18
- # Fires on every push to `next` (contributor PR squash-merges land here).
19
- # Resolves the existing release PR and refreshes it, or creates it the first
20
- # time `next` diverges from master. The release PR batches all accumulated
21
- # feature commits into a single release — that batching is v4's whole point
22
- # (see CLDMV/.github docs/conventions/release-flow-v4.md §5.3, §6.1).
23
- #
24
- # Thin caller: all job logic (plan / create / refresh) lives in the reusable,
25
- # pinned at @v4. Bumping the pin carries fixes without editing this file.
26
- # CUSTOMIZE:
27
- # - `package_name` → your npm package (or any unique identifier)
28
- # - `build_command` → your build script, or a stub like
29
- # `echo '✓ no build step'` for a meta package (optional;
30
- # defaults to `npm run build:ci`)
31
- name: 🚀 Next Release (v4)
32
-
33
- on:
34
- push:
35
- branches: [next]
36
- workflow_dispatch: # manual kick — e.g. to open/refresh the PR for content already on `next`
37
-
38
- # Serialize: each run re-resolves the current PR state, so queueing (not
39
- # cancelling) avoids a create/refresh race when pushes land back-to-back.
40
- concurrency:
41
- group: next-release-${{ github.repository }}
42
- cancel-in-progress: false
43
-
44
- permissions:
45
- contents: read
46
-
47
- jobs:
48
- release:
49
- permissions:
50
- contents: write
51
- pull-requests: write
52
- uses: CLDMV/.github/.github/workflows/workflow-next-release.yml@v4
53
- with:
54
- package_name: "@cldmv/gh-broker"
55
- build_command: "npm run build:ci"
56
- secrets:
57
- # Map your repo/org secrets to the expected names.
58
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
59
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
60
- # Optional: only needed if you also use reusable-lint-format.yml /
61
- # reusable-coverage-badge.yml (or otherwise sign a commit locally as
62
- # this identity). Passed through so the release-PR changelog
63
- # recognizes that identity as a bot instead of listing it as a
64
- # contributor — see CLDMV_BOT_NAME/CLDMV_BOT_EMAIL in your other
65
- # workflows for the same values.
66
- BOT_NAME: ${{ secrets.CLDMV_BOT_NAME }}
67
- BOT_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
68
- # Optional release-PR notifier webhooks — each is independently
69
- # opt-in: leave one unset and that channel is silently skipped.
70
- # Delete the lines you don't use.
71
- DISCORD_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PR_PUBLIC_WEBHOOK }}
72
- DISCORD_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_PR_PRIVATE_WEBHOOK }}
73
- SLACK_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.SLACK_RELEASE_PR_PUBLIC_WEBHOOK }}
74
- SLACK_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.SLACK_RELEASE_PR_PRIVATE_WEBHOOK }}
75
- GENERIC_RELEASE_PR_PUBLIC_WEBHOOK: ${{ secrets.GENERIC_RELEASE_PR_PUBLIC_WEBHOOK }}
76
- GENERIC_RELEASE_PR_PRIVATE_WEBHOOK: ${{ secrets.GENERIC_RELEASE_PR_PRIVATE_WEBHOOK }}
@@ -1,50 +0,0 @@
1
- #
2
- # @Project: @cldmv/gh-broker
3
- # @Filename: /.github/workflows/next-reset.yml
4
- # @Date: 2026-05-22T00:00:00-07:00 (1779433200)
5
- # @Author: Nate Corcoran <CLDMV>
6
- # @Email: <Shinrai@users.noreply.github.com>
7
- # -----
8
- # @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
9
- # @Last modified time: 2026-10-02T11:30:57-07:00 (1790965857)
10
- # -----
11
- # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
- #
13
-
14
- # Individual repo: .github/workflows/next-reset.yml
15
- #
16
- # v4 core: after a release lands on master, re-sync the integration branches
17
- # (CLDMV/.github docs/conventions/release-flow-v4.md §6.3, §7).
18
- #
19
- # - `hotfixes` is ALWAYS force-reset to master HEAD after any release.
20
- # - `next` depends on which lane released:
21
- # * normal release (next → master, or a v3-style feat → master):
22
- # force-reset `next` to master HEAD (§7.1).
23
- # * hotfix release (hotfixes → master): MERGE master into `next` instead,
24
- # so next's accumulated feature work is preserved (§7.2, option B).
25
- #
26
- # Thin caller: all job logic (the wait-for-tags gate + the branch sync) lives in
27
- # the reusable, pinned at @v4. Bumping the pin carries fixes without editing
28
- # this file.
29
- name: ♻️ Next/Hotfixes Reset (v4)
30
-
31
- on:
32
- push:
33
- branches: [master, main]
34
-
35
- concurrency:
36
- group: next-reset-${{ github.repository }}
37
- cancel-in-progress: false
38
-
39
- permissions:
40
- contents: read
41
-
42
- jobs:
43
- sync:
44
- permissions:
45
- contents: write
46
- uses: CLDMV/.github/.github/workflows/workflow-next-reset.yml@v4
47
- secrets:
48
- # Map your repo/org secrets to the expected names.
49
- BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
50
- BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}