@cldmv/gh-broker 0.0.0-stage → 0.7.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/.configs/fix-headers.json +3 -0
  2. package/.configs/vitest.config.mjs +44 -0
  3. package/.github/dependabot.yml +111 -0
  4. package/.github/workflows/branch-retention.yml +44 -0
  5. package/.github/workflows/bundle-size.yml +52 -0
  6. package/.github/workflows/ci.yml +389 -0
  7. package/.github/workflows/cla.yml +66 -0
  8. package/.github/workflows/codeql.yml +87 -0
  9. package/.github/workflows/dependabot-auto-merge.yml +62 -0
  10. package/.github/workflows/dependabot-recreate.yml +67 -0
  11. package/.github/workflows/dependency-review.yml +46 -0
  12. package/.github/workflows/feature-pr.yml +75 -0
  13. package/.github/workflows/hotfix-redirector.yml +67 -0
  14. package/.github/workflows/hotfixes-release.yml +70 -0
  15. package/.github/workflows/labeler.yml +48 -0
  16. package/.github/workflows/master-commit-audit.yml +56 -0
  17. package/.github/workflows/member-auto-merge.yml +75 -0
  18. package/.github/workflows/next-release.yml +76 -0
  19. package/.github/workflows/next-reset.yml +50 -0
  20. package/.github/workflows/pr-notify.yml +44 -0
  21. package/.github/workflows/pr-title-normalizer.yml +52 -0
  22. package/.github/workflows/provenance.yml +51 -0
  23. package/.github/workflows/publish.yml +146 -0
  24. package/.github/workflows/release-merge.yml +104 -0
  25. package/.github/workflows/release-notify.yml +41 -0
  26. package/.github/workflows/scorecard.yml +64 -0
  27. package/.github/workflows/stale.yml +50 -0
  28. package/.github/workflows/tag-health.yml +70 -0
  29. package/.github/workflows/update-major-version-tags.yml +94 -0
  30. package/.github/workflows/v4-bootstrap.yml +115 -0
  31. package/.github/workflows/welcome.yml +42 -0
  32. package/LICENSE +202 -0
  33. package/README.md +185 -2
  34. package/config.example.json +281 -0
  35. package/deploy/README.md +92 -0
  36. package/deploy/gh-broker.service +57 -0
  37. package/deploy/install.mjs +344 -0
  38. package/deploy/install.sh +29 -0
  39. package/deploy/lib/config-merge.mjs +56 -0
  40. package/deploy/lib/prompt.mjs +98 -0
  41. package/deploy/lib/secret-store.mjs +114 -0
  42. package/deploy/lib/smoke.mjs +137 -0
  43. package/deploy/lib/system.mjs +222 -0
  44. package/dist/index.mjs +22970 -0
  45. package/dist/index.mjs.map +7 -0
  46. package/docs/TOOLS.md +347 -0
  47. package/docs/agent-user-model.md +89 -0
  48. package/docs/changelog/v0/v0.2.0.md +26 -0
  49. package/docs/changelog/v0/v0.2.1.md +23 -0
  50. package/docs/changelog/v0/v0.2.2.md +23 -0
  51. package/docs/changelog/v0/v0.2.3.md +33 -0
  52. package/docs/changelog/v0/v0.2.4.md +25 -0
  53. package/docs/changelog/v0/v0.2.5.md +29 -0
  54. package/docs/changelog/v0/v0.3.0.md +84 -0
  55. package/docs/changelog/v0/v0.3.1.md +30 -0
  56. package/docs/changelog/v0/v0.3.2.md +24 -0
  57. package/docs/changelog/v0/v0.3.3.md +28 -0
  58. package/docs/changelog/v0/v0.4.0.md +58 -0
  59. package/docs/changelog/v0/v0.4.1.md +33 -0
  60. package/docs/changelog/v0/v0.4.2.md +45 -0
  61. package/docs/changelog/v0/v0.5.0.md +39 -0
  62. package/docs/changelog/v0/v0.5.1.md +28 -0
  63. package/docs/changelog/v0/v0.6.0.md +52 -0
  64. package/docs/changelog/v0/v0.6.1.md +48 -0
  65. package/docs/changelog/v0/v0.7.0.md +71 -0
  66. package/docs/deploy-architecture.md +82 -0
  67. package/package.json +71 -5
  68. package/src/appauth.ts +56 -0
  69. package/src/audit.ts +34 -0
  70. package/src/catalog.ts +165 -0
  71. package/src/config.ts +130 -0
  72. package/src/index.ts +107 -0
  73. package/src/paths.ts +60 -0
  74. package/src/router.ts +258 -0
  75. package/src/secrets.ts +137 -0
  76. package/src/server.ts +91 -0
  77. package/src/types.ts +104 -0
  78. package/src/upstream.ts +85 -0
  79. package/src/verbs/issue_labels.ts +329 -0
  80. package/src/verbs/link_issue.ts +84 -0
  81. package/src/verbs/release-analysis.ts +210 -0
  82. package/src/verbs/repo-tier.ts +90 -0
  83. package/src/verbs/report_ci_status.ts +358 -0
  84. package/src/verbs/report_release_prs.ts +238 -0
  85. package/src/verbs/report_security_alerts.ts +442 -0
  86. package/src/verbs/report_unlabeled.ts +194 -0
  87. package/src/verbs/rest-client.ts +181 -0
  88. package/src/verbs/review_thread.ts +138 -0
  89. package/tests/appauth.test.vitest.mts +76 -0
  90. package/tests/audit.test.vitest.mts +48 -0
  91. package/tests/catalog.test.vitest.mts +180 -0
  92. package/tests/config-merge.test.vitest.mts +58 -0
  93. package/tests/config.test.vitest.mts +314 -0
  94. package/tests/issue-labels.test.vitest.mts +347 -0
  95. package/tests/paths.test.vitest.mts +52 -0
  96. package/tests/release-prs.test.vitest.mts +237 -0
  97. package/tests/rest-client.test.vitest.mts +115 -0
  98. package/tests/router.test.vitest.mts +399 -0
  99. package/tests/run-vitest.mjs +51 -0
  100. package/tests/secret-store.test.vitest.mts +106 -0
  101. package/tests/secrets.test.vitest.mts +155 -0
  102. package/tests/security-alerts.test.vitest.mts +328 -0
  103. package/tests/server.test.vitest.mts +20 -0
  104. package/tests/upstream.test.vitest.mts +91 -0
  105. package/tests/verb-helpers.test.vitest.mts +331 -0
  106. package/tests/verbs.test.vitest.mts +624 -0
  107. package/tsconfig.json +21 -0
@@ -0,0 +1,64 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/scorecard.yml
4
+ # @Date: 2026-05-31T00:00:00-07:00 (1780210800)
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/scorecard.yml
15
+ #
16
+ # OpenSSF Scorecard — scans the repo against ~18 security best-practice checks
17
+ # and produces a 0-10 score. Thin caller: the steps and the SHA-pinned
18
+ # scorecard-action version live in reusable-scorecard.yml@v4, so the action
19
+ # version can't drift in this copy (it just calls the org reusable). Triggers
20
+ # stay here, per OpenSSF's recommended setup.
21
+ name: 🔬 OpenSSF Scorecard
22
+
23
+ on:
24
+ branch_protection_rule:
25
+ schedule:
26
+ - cron: "32 7 * * 1" # weekly Monday 07:32 UTC
27
+ push:
28
+ branches: [master, main]
29
+ workflow_dispatch:
30
+
31
+ # Caller must grant what the reusable needs — notably id-token: write for the
32
+ # OpenSSF transparency-log publish.
33
+ #
34
+ # Keep the workflow-level grant READ-ONLY (contents: read) and grant every
35
+ # WRITE on the `analyze` job instead. scorecard-action's publish step verifies that write permissions
36
+ # were granted JOB-scoped, not workflow-wide (matching OSSF's own example:
37
+ # https://github.com/ossf/scorecard-action#example-workflow). A workflow-level
38
+ # grant satisfies GitHub's own reusable-workflow permission rules fine, but
39
+ # still trips scorecard-action's own check — the rejection ("workflow
40
+ # verification failed: global perm is set to write: permission for X is set
41
+ # to write") means "granted globally," not "forbidden."
42
+ #
43
+ # Do NOT add security-events: write here while publish_results: true below.
44
+ # scorecard-action's publish step rejects submissions from a workflow whose
45
+ # token has security-events write access (it verifies the caller can't have
46
+ # tampered with results before they hit the public transparency log). That
47
+ # trade-off means the reusable's own SARIF-to-Security-tab upload step has no
48
+ # permission to run in this configuration; the public OpenSSF badge is the
49
+ # thing this default enables, so consumers take that trade-off by default.
50
+ # Only add security-events: write back (job-scoped) if publish_results is set
51
+ # to false instead (SARIF-to-Security-tab upload, no public badge).
52
+
53
+ permissions:
54
+ contents: read
55
+
56
+ jobs:
57
+ analyze:
58
+ permissions:
59
+ id-token: write
60
+ contents: read
61
+ actions: read
62
+ uses: CLDMV/.github/.github/workflows/reusable-scorecard.yml@v4
63
+ with:
64
+ publish_results: true # set false to skip the public badge in favor of SARIF-to-Security-tab. Private repos need not bother: every scorecard job auto-skips there (OpenSSF cannot publish private repos, so the run would only burn paid minutes).
@@ -0,0 +1,50 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/stale.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/stale.yml
15
+ #
16
+ # First-run guidance: on a repo with an existing backlog, the first
17
+ # scheduled run can mark a LOT of issues stale at once (notification storm).
18
+ # Recommended: enable with `dry_run: true` first, dispatch manually to
19
+ # preview, then flip to live. The dispatch input below makes this easy.
20
+ #
21
+ # Batch 2.3 from tmp/plan-future-workflows.md.
22
+ name: 🍂 Stale Issues & PRs
23
+
24
+ on:
25
+ schedule:
26
+ - cron: "13 5 * * *" # daily 05:13 UTC (off-the-hour to avoid GH cron stampede)
27
+ workflow_dispatch:
28
+ inputs:
29
+ dry_run:
30
+ description: "Preview only — no changes will be made"
31
+ type: boolean
32
+ default: false
33
+
34
+ permissions:
35
+ issues: write
36
+ pull-requests: write
37
+
38
+ jobs:
39
+ sweep:
40
+ uses: CLDMV/.github/.github/workflows/reusable-stale.yml@v4
41
+ with:
42
+ dry_run: ${{ github.event.inputs.dry_run == 'true' }}
43
+ # Override timers if needed:
44
+ # days_before_issue_stale: 60
45
+ # days_before_issue_close: 14
46
+ # days_before_pr_stale: 30
47
+ # days_before_pr_close: 7
48
+ secrets:
49
+ BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
50
+ BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -0,0 +1,70 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/tag-health.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/tag-health.yml
15
+ #
16
+ # Wakes the reusable-tag-health.yml workflow on a weekly schedule. The
17
+ # reusable already implements validation, bot-signature fixes, unsigned-tag
18
+ # fixes, orphaned-release recovery, orphaned-tag relocation, and rolling
19
+ # major/minor tag maintenance — but it's dormant by default. This template
20
+ # is what triggers it.
21
+ #
22
+ # Batch 3.1 from tmp/plan-future-workflows.md.
23
+ name: 🏥 Tag Health
24
+
25
+ on:
26
+ schedule:
27
+ # Weekly Sunday 04:04 UTC. Off-the-hour to dodge the GitHub :00-cron
28
+ # stampede; weekly cadence because tag drift accumulates slowly.
29
+ - cron: "4 4 * * 0"
30
+ workflow_dispatch:
31
+ inputs:
32
+ debug:
33
+ description: "Enable debug logging for troubleshooting"
34
+ type: boolean
35
+ required: false
36
+ default: false
37
+ create_documentation:
38
+ description: "Update VERSION_TAGS.md if rolling tags moved"
39
+ type: boolean
40
+ required: false
41
+ default: false
42
+ use_gpg:
43
+ description: "Enable GPG signing for any tags the sweep creates/recreates"
44
+ type: boolean
45
+ required: false
46
+ default: true
47
+
48
+ permissions:
49
+ contents: read
50
+
51
+ jobs:
52
+ health:
53
+ permissions:
54
+ contents: write
55
+ uses: CLDMV/.github/.github/workflows/reusable-tag-health.yml@v4
56
+ with:
57
+ debug: ${{ github.event.inputs.debug == 'true' }}
58
+ # Full unified sweep: validates, fixes bot signatures, fixes
59
+ # unsigned tags, recovers orphaned releases, relocates orphaned
60
+ # tags, and updates rolling major/minor refs.
61
+ run_unified_tag_health: true
62
+ create_documentation: ${{ github.event.inputs.create_documentation == 'true' }}
63
+ use_gpg: ${{ github.event.inputs.use_gpg != 'false' }}
64
+ secrets:
65
+ BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
66
+ BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
67
+ TAGGER_NAME: ${{ secrets.CLDMV_BOT_NAME }}
68
+ TAGGER_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
69
+ GPG_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_GPG_PRIVATE_KEY }}
70
+ GPG_PASSPHRASE: ${{ secrets.CLDMV_BOT_GPG_PASSPHRASE }}
@@ -0,0 +1,94 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/update-major-version-tags.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:58-07:00 (1790965858)
10
+ # -----
11
+ # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
+ #
13
+
14
+ # Individual repo: .github/workflows/update-major-version-tags.yml
15
+ name: 🏷️ Update Major Version Tags
16
+
17
+ on:
18
+ release:
19
+ types: [published]
20
+ workflow_dispatch:
21
+ inputs:
22
+ debug:
23
+ description: "Enable debug logging for troubleshooting"
24
+ type: boolean
25
+ required: false
26
+ default: false
27
+ create_documentation:
28
+ description: "Whether to create/update VERSION_TAGS.md documentation"
29
+ type: boolean
30
+ required: false
31
+ default: false
32
+ use_gpg:
33
+ description: "Enable GPG signing (if GPG secrets provided)"
34
+ type: boolean
35
+ required: false
36
+ default: true
37
+ # Tag health configuration
38
+ max_tags:
39
+ description: "Maximum number of tags to process (safety limit)"
40
+ required: false
41
+ default: "100"
42
+ max_major_versions:
43
+ description: "Maximum number of major versions to process"
44
+ required: false
45
+ default: "10"
46
+ max_minor_versions:
47
+ description: "Maximum number of minor versions per major to process"
48
+ required: false
49
+ default: "10"
50
+ bot_patterns:
51
+ description: "JSON array of bot name patterns to identify bot signatures"
52
+ required: false
53
+ default: '["CLDMV Bot", "cldmv-bot", "github-actions[bot]"]'
54
+ include_patterns:
55
+ description: "JSON array of tag patterns to include (e.g. ['v*', 'release-*'])"
56
+ required: false
57
+ default: '["v*"]'
58
+ exclude_patterns:
59
+ description: "JSON array of tag patterns to exclude"
60
+ required: false
61
+ default: "[]"
62
+
63
+ permissions:
64
+ contents: read
65
+
66
+ jobs:
67
+ update-tags:
68
+ # Skip release events fired without a tag_name (e.g. "untagged-<sha>" runs
69
+ # the bot or a prior code path can produce). The reusable workflow has its
70
+ # own tag-readiness polling for forward-facing prevention; this guard
71
+ # protects against legacy / external sources of untagged release events.
72
+ # Batch 1.2 from tmp/plan-future-workflows.md.
73
+ if: github.event_name != 'release' || github.event.release.tag_name != ''
74
+ uses: CLDMV/.github/.github/workflows/workflow-update-major-version-tags.yml@v4
75
+ permissions:
76
+ contents: write
77
+ with:
78
+ debug: ${{ github.event.inputs.debug == 'true' }}
79
+ create_documentation: ${{ github.event.inputs.create_documentation == 'true' }}
80
+ use_gpg: ${{ github.event.inputs.use_gpg != 'false' }}
81
+ max_tags: ${{ github.event.inputs.max_tags || '100' }}
82
+ max_major_versions: ${{ github.event.inputs.max_major_versions || '10' }}
83
+ max_minor_versions: ${{ github.event.inputs.max_minor_versions || '10' }}
84
+ bot_patterns: ${{ github.event.inputs.bot_patterns || '["CLDMV Bot", "cldmv-bot", "github-actions[bot]"]' }}
85
+ include_patterns: ${{ github.event.inputs.include_patterns || '["v*"]' }}
86
+ exclude_patterns: ${{ github.event.inputs.exclude_patterns || '[]' }}
87
+ secrets:
88
+ # Map your repo/org secrets to the expected names
89
+ TAGGER_NAME: ${{ secrets.CLDMV_BOT_NAME }}
90
+ TAGGER_EMAIL: ${{ secrets.CLDMV_BOT_EMAIL }}
91
+ GPG_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_GPG_PRIVATE_KEY }}
92
+ GPG_PASSPHRASE: ${{ secrets.CLDMV_BOT_GPG_PASSPHRASE }}
93
+ BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
94
+ BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
@@ -0,0 +1,115 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/v4-bootstrap.yml
4
+ # @Date: 2026-05-26T00:00:00-07:00 (1779778800)
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:58-07:00 (1790965858)
10
+ # -----
11
+ # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
+ #
13
+
14
+ # Individual repo: .github/workflows/v4-bootstrap.yml
15
+ #
16
+ # Per-repo v4 bootstrap — thin wrapper around the shared
17
+ # `org-bootstrap-repo@v4` action. Run once per repo from the Actions tab
18
+ # (or, for org-wide rollout, prefer `local-org-onboarding.yml` in
19
+ # CLDMV/.github which fans out across many repos in parallel).
20
+ #
21
+ # What gets applied (overwrite-with-warn — divergences are surfaced in the
22
+ # run summary):
23
+ # - `next` + `hotfixes` branches created from master HEAD if missing
24
+ # - repo settings: allow_auto_merge=true, delete_branch_on_merge=false,
25
+ # allow_squash_merge=true, allow_merge_commit=true,
26
+ # allow_rebase_merge=false, allow_update_branch=true; plus PR-merge
27
+ # dialog defaults (merge_commit_title / squash_merge_commit_title =
28
+ # PR_TITLE, merge_commit_message / squash_merge_commit_message =
29
+ # PR_BODY) so the resulting commit captures the PR title + body
30
+ # verbatim (release-PR body = the categorized changelog → lands on
31
+ # master). Per-branch ruleset allowed_merge_methods picks the method.
32
+ # - security toggles: dependabot alerts + security updates, secret
33
+ # scanning + push protection, private vulnerability reporting
34
+ # - rulesets: replaces the three rulesets (Protect Master/Next/Hotfixes)
35
+ # with the org canonical defaults
36
+ #
37
+ # What is NOT applied (GitHub doesn't expose it via REST / GraphQL / gh CLI
38
+ # — confirmed against community/community#188598; the bootstrap surfaces
39
+ # this as a 'Manual one-time toggles' line in the run summary):
40
+ # - Settings → General → Pull Requests → "Auto-close issues with merged
41
+ # linked pull requests" (recommended ON). Toggle in the repo UI once.
42
+ #
43
+ # Idempotent — re-running is safe. Default `dry_run: true` previews
44
+ # everything before applying.
45
+ #
46
+ # Full design: CLDMV/.github docs/conventions/release-flow-v4.md
47
+ # Migration checklist: CLDMV/.github docs/migration/v3-to-v4.md
48
+ name: 🚀 v4 Bootstrap
49
+
50
+ on:
51
+ workflow_dispatch:
52
+ inputs:
53
+ dry_run:
54
+ description: "Dry-run: preview every mutation without firing it. Default `true` — set to `false` to actually apply changes."
55
+ type: boolean
56
+ required: false
57
+ default: true
58
+ code_security:
59
+ description: "Code Security policy. off = disable. public-only = enable only if this repo is public (free). all = enable (paid on private)."
60
+ type: choice
61
+ required: false
62
+ default: "off"
63
+ options:
64
+ - "off"
65
+ - "public-only"
66
+ - "all"
67
+ secret_protection:
68
+ description: "Secret Protection (scanning + push protection) policy. Same shape as code_security."
69
+ type: choice
70
+ required: false
71
+ default: "off"
72
+ options:
73
+ - "off"
74
+ - "public-only"
75
+ - "all"
76
+ steps:
77
+ description: "Subset of phases to run, comma-separated."
78
+ required: false
79
+ default: "branches,settings,security,rulesets,variables"
80
+ code_scanning_config:
81
+ description: "Override for the variables-phase GHAS config (scan/skip lists): inline JSON or a workspace path. Empty = the data/code-scanning-skips.json bundled in CLDMV/.github — third-party orgs supply their own here."
82
+ required: false
83
+ default: ""
84
+
85
+ permissions:
86
+ contents: read
87
+
88
+ jobs:
89
+ bootstrap:
90
+ name: "🚀 Bootstrap v4 (this repo)"
91
+ runs-on: ubuntu-latest
92
+ steps:
93
+ - name: Create App token
94
+ id: app-token
95
+ # Full-permission App token — bootstrap needs administration:write
96
+ # for security toggles + ruleset import, plus contents:write for
97
+ # branch creation.
98
+ uses: CLDMV/.github/.github/actions/github/steps/create-app-token@v4
99
+ with:
100
+ client_id: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
101
+ private_key: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
102
+ env:
103
+ BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
104
+ BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
105
+
106
+ - name: Bootstrap
107
+ uses: CLDMV/.github/.github/actions/github/jobs/org-bootstrap-repo@v4
108
+ with:
109
+ # target_repo defaults to GITHUB_REPOSITORY (this repo).
110
+ github_token: ${{ steps.app-token.outputs.token }}
111
+ dry_run: ${{ github.event.inputs.dry_run }}
112
+ steps: ${{ github.event.inputs.steps }}
113
+ code_security: ${{ github.event.inputs.code_security }}
114
+ secret_protection: ${{ github.event.inputs.secret_protection }}
115
+ code_scanning_config: ${{ github.event.inputs.code_scanning_config }}
@@ -0,0 +1,42 @@
1
+ #
2
+ # @Project: @cldmv/gh-broker
3
+ # @Filename: /.github/workflows/welcome.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:58-07:00 (1790965858)
10
+ # -----
11
+ # @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
12
+ #
13
+
14
+ # Individual repo: .github/workflows/welcome.yml
15
+ #
16
+ # Batch 5.3 from tmp/plan-future-workflows.md.
17
+ name: 👋 Welcome Contributor
18
+
19
+ # SECURITY NOTE: pull_request_target runs in the BASE repo's context with
20
+ # WRITE permissions and access to secrets. SAFE for THIS workflow because:
21
+ # - We never checkout the PR head ref
22
+ # - We never run code from the PR (no `run:` step uses PR data)
23
+ # - We only call REST APIs to read prior interactions and post a comment
24
+ # DO NOT add a checkout step or any step that executes PR-supplied content.
25
+ on:
26
+ issues:
27
+ types: [opened]
28
+ pull_request_target:
29
+ types: [opened]
30
+
31
+ permissions:
32
+ issues: write
33
+ pull-requests: write
34
+
35
+ jobs:
36
+ welcome:
37
+ uses: CLDMV/.github/.github/workflows/reusable-welcome.yml@v4
38
+ # Optional. Without these, the welcome comment is posted by
39
+ # github-actions[bot]. With these, it's posted by your CLDMV bot App.
40
+ secrets:
41
+ BOT_APP_CLIENT_ID: ${{ secrets.CLDMV_BOT_APP_CLIENT_ID }}
42
+ BOT_APP_PRIVATE_KEY: ${{ secrets.CLDMV_BOT_APP_PRIVATE_KEY }}
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.