@theholocron/cli 2.0.0-alpha.15 → 2.0.0-alpha.17

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/cli.mjs +25 -6
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1112,11 +1112,24 @@ jobs:
1112
1112
  name: Checkout repository
1113
1113
  with:
1114
1114
  fetch-depth: 0
1115
- token: \${{ github.token }}
1115
+ # Use SYNC_TOKEN when available — git push (tags, release commits)
1116
+ # uses the checkout credential, not GITHUB_TOKEN env var. The
1117
+ # built-in github.token cannot push through branch protection rulesets.
1118
+ token: \${{ secrets.SYNC_TOKEN || github.token }}
1116
1119
 
1117
1120
  - uses: theholocron/.github/.github/actions/setup@main
1118
1121
  name: Setup
1119
1122
 
1123
+ - name: Configure git identity
1124
+ run: |
1125
+ GIT_NAME=$(gh api user --jq .name 2>/dev/null || echo "github-actions[bot]")
1126
+ GIT_EMAIL=$(gh api user --jq '"\\(.id)+\\(.login)@users.noreply.github.com"' 2>/dev/null || echo "41898282+github-actions[bot]@users.noreply.github.com")
1127
+ git config --global user.name "$GIT_NAME"
1128
+ git config --global user.email "$GIT_EMAIL"
1129
+ git config --global format.signoff true
1130
+ env:
1131
+ GH_TOKEN: \${{ secrets.SYNC_TOKEN || github.token }}
1132
+
1120
1133
  - run: npm install -g npm@11 sigstore
1121
1134
  name: Upgrade npm for OIDC support
1122
1135
  # sigstore is required by libnpmpublish/provenance.js at module parse
@@ -1432,13 +1445,19 @@ jobs:
1432
1445
  PRIMARY_REPO: \${{ inputs.primary-repo }}
1433
1446
 
1434
1447
  - name: Sync primary repo (PR)
1435
- run: >
1436
- node packages/cli/dist/cli.mjs sync-github
1437
- --repo "$PRIMARY_REPO"
1438
- --branch "$SYNC_BRANCH"
1439
- --pr
1448
+ run: |
1449
+ GIT_NAME=$(gh api user --jq .name 2>/dev/null || echo "github-actions[bot]")
1450
+ GIT_EMAIL=$(gh api user --jq '"\\(.id)+\\(.login)@users.noreply.github.com"' 2>/dev/null || echo "41898282+github-actions[bot]@users.noreply.github.com")
1451
+ node packages/cli/dist/cli.mjs sync-github \\
1452
+ --repo "$PRIMARY_REPO" \\
1453
+ --branch "$SYNC_BRANCH" \\
1454
+ --pr \\
1455
+ --message "chore: sync from theholocron/holocron
1456
+
1457
+ Signed-off-by: $GIT_NAME <$GIT_EMAIL>"
1440
1458
  env:
1441
1459
  GITHUB_TOKEN: \${{ secrets.SYNC_TOKEN }}
1460
+ GH_TOKEN: \${{ secrets.SYNC_TOKEN }}
1442
1461
  PRIMARY_REPO: \${{ inputs.primary-repo }}
1443
1462
  SYNC_BRANCH: \${{ inputs.sync-branch }}
1444
1463
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.0.0-alpha.15",
3
+ "version": "2.0.0-alpha.17",
4
4
  "description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",