@cldmv/gh-broker 0.7.0 → 0.8.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.
- package/README.md +134 -40
- package/config.example.json +21 -8
- package/config.sample.json +45 -0
- package/deploy/README.md +73 -15
- package/deploy/install.mjs +166 -101
- package/deploy/install.sh +0 -0
- package/deploy/lib/config-merge.mjs +174 -16
- package/deploy/lib/credentials.mjs +143 -0
- package/deploy/lib/install-args.mjs +144 -0
- package/deploy/lib/npm-setup.mjs +164 -0
- package/deploy/lib/secret-store.mjs +20 -2
- package/deploy/lib/system.mjs +26 -2
- package/dist/index.mjs +1638 -202
- package/dist/index.mjs.map +4 -4
- package/docs/TOOLS.md +192 -1
- package/docs/changelog/v0/v0.8.0.md +115 -0
- package/docs/deploy-architecture.md +13 -11
- package/package.json +7 -7
- package/src/availability.ts +42 -0
- package/src/catalog.ts +18 -1
- package/src/config.ts +29 -2
- package/src/router.ts +43 -2
- package/src/secrets.ts +34 -4
- package/src/types.ts +25 -1
- package/src/verbs/ghcr/archive.ts +314 -0
- package/src/verbs/ghcr/config.ts +142 -0
- package/src/verbs/ghcr/jobs.ts +141 -0
- package/src/verbs/ghcr/push.ts +192 -0
- package/src/verbs/ghcr/registry.ts +275 -0
- package/src/verbs/ghcr/tar.ts +203 -0
- package/src/verbs/ghcr_push.ts +264 -0
- package/src/verbs/npm-registry.ts +168 -0
- package/src/verbs/npm-tarball.ts +76 -0
- package/src/verbs/npm_scaffold.ts +325 -0
- package/src/verbs/release-analysis.ts +3 -1
- package/tests/catalog.test.vitest.mts +55 -1
- package/tests/config-merge.test.vitest.mts +275 -8
- package/tests/config.test.vitest.mts +75 -1
- package/tests/credentials.test.vitest.mts +127 -0
- package/tests/ghcr-archive.test.vitest.mts +439 -0
- package/tests/ghcr-config.test.vitest.mts +96 -0
- package/tests/ghcr-push.test.vitest.mts +526 -0
- package/tests/ghcr-registry.test.vitest.mts +206 -0
- package/tests/helpers/ghcr-fixtures.mts +373 -0
- package/tests/install-args.test.vitest.mts +152 -0
- package/tests/issue-labels.test.vitest.mts +15 -0
- package/tests/npm-scaffold.test.vitest.mts +479 -0
- package/tests/npm-setup.test.vitest.mts +196 -0
- package/tests/paths.test.vitest.mts +5 -0
- package/tests/prompt.test.vitest.mts +128 -0
- package/tests/release-prs.test.vitest.mts +10 -0
- package/tests/router.test.vitest.mts +108 -2
- package/tests/secret-store.test.vitest.mts +64 -3
- package/tests/secrets.test.vitest.mts +53 -0
- package/tests/security-alerts.test.vitest.mts +10 -0
- package/tests/server.test.vitest.mts +187 -7
- package/tests/smoke.test.vitest.mts +177 -0
- package/tests/system.test.vitest.mts +355 -0
- package/tests/verb-helpers.test.vitest.mts +46 -0
- package/.configs/fix-headers.json +0 -3
- package/.configs/vitest.config.mjs +0 -44
- package/.github/dependabot.yml +0 -111
- package/.github/workflows/branch-retention.yml +0 -44
- package/.github/workflows/bundle-size.yml +0 -52
- package/.github/workflows/ci.yml +0 -389
- package/.github/workflows/cla.yml +0 -66
- package/.github/workflows/codeql.yml +0 -87
- package/.github/workflows/dependabot-auto-merge.yml +0 -62
- package/.github/workflows/dependabot-recreate.yml +0 -67
- package/.github/workflows/dependency-review.yml +0 -46
- package/.github/workflows/feature-pr.yml +0 -75
- package/.github/workflows/hotfix-redirector.yml +0 -67
- package/.github/workflows/hotfixes-release.yml +0 -70
- package/.github/workflows/labeler.yml +0 -48
- package/.github/workflows/master-commit-audit.yml +0 -56
- package/.github/workflows/member-auto-merge.yml +0 -75
- package/.github/workflows/next-release.yml +0 -76
- package/.github/workflows/next-reset.yml +0 -50
- package/.github/workflows/pr-notify.yml +0 -44
- package/.github/workflows/pr-title-normalizer.yml +0 -52
- package/.github/workflows/provenance.yml +0 -51
- package/.github/workflows/publish.yml +0 -146
- package/.github/workflows/release-merge.yml +0 -104
- package/.github/workflows/release-notify.yml +0 -41
- package/.github/workflows/scorecard.yml +0 -64
- package/.github/workflows/stale.yml +0 -50
- package/.github/workflows/tag-health.yml +0 -70
- package/.github/workflows/update-major-version-tags.yml +0 -94
- package/.github/workflows/v4-bootstrap.yml +0 -115
- package/.github/workflows/welcome.yml +0 -42
|
@@ -1,94 +0,0 @@
|
|
|
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 }}
|
|
@@ -1,115 +0,0 @@
|
|
|
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 }}
|
|
@@ -1,42 +0,0 @@
|
|
|
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 }}
|