code-foundry 0.19.0 → 0.20.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.
|
@@ -378,7 +378,7 @@ if [ -f "$template_root/.github/template.yml" ]; then
|
|
|
378
378
|
source_runtime_repository="$(awk -F': ' '/^runtime_repository:/ {print $2; exit}' "$template_root/.github/template.yml")"
|
|
379
379
|
fi
|
|
380
380
|
[ -n "$source_runtime_repository" ] || source_runtime_repository="0xPlayerOne/code-foundry"
|
|
381
|
-
for file in .github/workflows/ci.yml .github/workflows/test.yml .github/workflows/security.yml .github/workflows/codeql.yml; do
|
|
381
|
+
for file in .github/workflows/ci.yml .github/workflows/test.yml .github/workflows/security.yml .github/workflows/codeql.yml .github/workflows/draft-pr.yml .github/workflows/release-pr.yml; do
|
|
382
382
|
[ -f "$file" ] || continue
|
|
383
383
|
if grep -qF "$source_runtime_repository" "$file" && [ "$source_runtime_repository" != "$runtime_repository" ]; then
|
|
384
384
|
changed=$((changed + 1))
|
|
@@ -15,45 +15,8 @@ permissions:
|
|
|
15
15
|
contents: read
|
|
16
16
|
pull-requests: write
|
|
17
17
|
|
|
18
|
-
env:
|
|
19
|
-
GH_TOKEN: ${{ github.token }}
|
|
20
|
-
|
|
21
18
|
jobs:
|
|
22
|
-
|
|
23
|
-
name:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
concurrency:
|
|
27
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
28
|
-
cancel-in-progress: true
|
|
29
|
-
steps:
|
|
30
|
-
- name: Check
|
|
31
|
-
id: check-pr
|
|
32
|
-
run: |
|
|
33
|
-
BRANCH="${{ github.ref_name }}"
|
|
34
|
-
EXISTING=$(gh pr list --limit 1 --base staging --head "$BRANCH" --state open --json number,title 2>/dev/null | jq 'length')
|
|
35
|
-
echo "existing=$EXISTING" >> "$GITHUB_OUTPUT"
|
|
36
|
-
|
|
37
|
-
- name: Create
|
|
38
|
-
if: steps.check-pr.outputs.existing == '0'
|
|
39
|
-
run: |
|
|
40
|
-
BRANCH="${{ github.ref_name }}"
|
|
41
|
-
gh pr create \
|
|
42
|
-
--base staging \
|
|
43
|
-
--head "$BRANCH" \
|
|
44
|
-
--draft \
|
|
45
|
-
--title "[WIP] $BRANCH" \
|
|
46
|
-
--body "Draft PR created automatically by CI.
|
|
47
|
-
|
|
48
|
-
This PR is a draft and should not be merged until CI passes and a reviewer (or the Daily Review agent) marks it ready.
|
|
49
|
-
|
|
50
|
-
**CI Status:** Pending — this workflow triggered on push to \`$BRANCH\`."
|
|
51
|
-
|
|
52
|
-
- name: Mark ready
|
|
53
|
-
if: steps.check-pr.outputs.existing == '0'
|
|
54
|
-
run: |
|
|
55
|
-
BRANCH="${{ github.ref_name }}"
|
|
56
|
-
PR_NUMBER=$(gh pr list --limit 1 --base staging --head "$BRANCH" --state open --json number 2>/dev/null | jq '.[0].number')
|
|
57
|
-
if [ -n "$PR_NUMBER" ]; then
|
|
58
|
-
gh pr ready "$PR_NUMBER"
|
|
59
|
-
fi
|
|
19
|
+
draft-pr:
|
|
20
|
+
name: Draft PR
|
|
21
|
+
uses: 0xPlayerOne/code-foundry/.github/workflows/reusable-draft-pr.yml@v0.19.0
|
|
22
|
+
secrets: inherit
|
|
@@ -8,80 +8,8 @@ permissions:
|
|
|
8
8
|
contents: read
|
|
9
9
|
pull-requests: write
|
|
10
10
|
|
|
11
|
-
env:
|
|
12
|
-
GH_TOKEN: ${{ github.token }}
|
|
13
|
-
|
|
14
11
|
jobs:
|
|
15
|
-
|
|
16
|
-
name:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
concurrency:
|
|
20
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
21
|
-
cancel-in-progress: true
|
|
22
|
-
steps:
|
|
23
|
-
- name: Check
|
|
24
|
-
id: check-pr
|
|
25
|
-
run: |
|
|
26
|
-
set -euo pipefail
|
|
27
|
-
EXISTING=$(gh pr list \
|
|
28
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
29
|
-
--limit 1 \
|
|
30
|
-
--base main \
|
|
31
|
-
--head staging \
|
|
32
|
-
--state open \
|
|
33
|
-
--json number | jq 'length')
|
|
34
|
-
echo "existing=$EXISTING" >> "$GITHUB_OUTPUT"
|
|
35
|
-
|
|
36
|
-
- name: Create
|
|
37
|
-
if: steps.check-pr.outputs.existing == '0'
|
|
38
|
-
run: |
|
|
39
|
-
DATE=$(date +%Y-%m-%d)
|
|
40
|
-
BODY_FILE="$RUNNER_TEMP/release-pr.md"
|
|
41
|
-
COMPARE_URL="repos/${GITHUB_REPOSITORY}/compare/main...staging"
|
|
42
|
-
COMPARE_FILE="$RUNNER_TEMP/release-compare.json"
|
|
43
|
-
gh api "$COMPARE_URL?per_page=100" > "$COMPARE_FILE"
|
|
44
|
-
TOTAL_COMMITS=$(jq -r '.total_commits // 0' "$COMPARE_FILE")
|
|
45
|
-
if [ "$TOTAL_COMMITS" -gt 100 ]; then
|
|
46
|
-
LAST_PAGE=$(( (TOTAL_COMMITS + 99) / 100 ))
|
|
47
|
-
gh api "$COMPARE_URL?per_page=100&page=$LAST_PAGE" > "$COMPARE_FILE"
|
|
48
|
-
fi
|
|
49
|
-
COMMITS=$(jq -r '.commits[] | "- \(.commit.message | split("\\n")[0]) (\(.sha[0:7]))"' "$COMPARE_FILE")
|
|
50
|
-
if [ -z "$COMMITS" ]; then
|
|
51
|
-
COMMITS='- No commits found since main.'
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
if [ "$TOTAL_COMMITS" -eq 1 ]; then
|
|
55
|
-
CHANGE_LABEL=change
|
|
56
|
-
else
|
|
57
|
-
CHANGE_LABEL=changes
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
cat > "$BODY_FILE" <<EOF
|
|
61
|
-
## Environment promotion
|
|
62
|
-
|
|
63
|
-
Promote the validated \`staging\` environment into \`main\`.
|
|
64
|
-
This is a deployment-promotion PR, not the version-release PR.
|
|
65
|
-
|
|
66
|
-
- **Source:** \`staging\`
|
|
67
|
-
- **Target:** \`main\`
|
|
68
|
-
- **Changes:** $TOTAL_COMMITS $CHANGE_LABEL
|
|
69
|
-
- **Created:** $DATE
|
|
70
|
-
|
|
71
|
-
### Commit summary
|
|
72
|
-
|
|
73
|
-
$COMMITS
|
|
74
|
-
|
|
75
|
-
### Validation
|
|
76
|
-
|
|
77
|
-
- Required CI, test, security, and CodeQL checks must pass before merge.
|
|
78
|
-
- Merge with **rebase** to preserve the linear Conventional Commit history.
|
|
79
|
-
- After merge, Release Please opens a separate versioned release PR with the changelog.
|
|
80
|
-
EOF
|
|
81
|
-
|
|
82
|
-
gh pr create \
|
|
83
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
84
|
-
--base main \
|
|
85
|
-
--head staging \
|
|
86
|
-
--title "Promote staging -> main ($DATE)" \
|
|
87
|
-
--body-file "$BODY_FILE"
|
|
12
|
+
release-pr:
|
|
13
|
+
name: Release PR
|
|
14
|
+
uses: 0xPlayerOne/code-foundry/.github/workflows/reusable-release-pr.yml@v0.19.0
|
|
15
|
+
secrets: inherit
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.19.0...v0.20.0) (2026-07-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **workflows:** use reusable promotion callers ([8429b8f](https://github.com/0xPlayerOne/code-foundry/commit/8429b8f9dee4fa0eedce2d8342332603e88e3f38))
|
|
9
|
+
|
|
3
10
|
## [0.19.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.18.0...v0.19.0) (2026-07-28)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -41,7 +41,8 @@ example, initializing from `NiftyLeague/template-repo` selects that fork's
|
|
|
41
41
|
runtime without extra flags. Use `--runtime-repository OWNER/REPO` (or
|
|
42
42
|
`REPO_FOUNDRY_RUNTIME_REPOSITORY`) only when you want to override it. The
|
|
43
43
|
selected repository is saved in `.github/template.yml` and rendered into the
|
|
44
|
-
small CI, Test, Security, and
|
|
44
|
+
small CI, Test, Security, CodeQL, Draft PR, and Release PR wrappers
|
|
45
|
+
automatically.
|
|
45
46
|
|
|
46
47
|
Normal synchronization imports only the local hook, agent-facing command,
|
|
47
48
|
profile/release, initializer, doctor, ownership, and protection entrypoints.
|
|
@@ -62,9 +63,8 @@ release metadata, optional npm publication, provenance, and token/trusted
|
|
|
62
63
|
publishing fallback.
|
|
63
64
|
|
|
64
65
|
The promotion runtimes for Draft PR and Release PR are maintained in the same
|
|
65
|
-
versioned repository
|
|
66
|
-
to a
|
|
67
|
-
being published.
|
|
66
|
+
versioned repository and are released before their short consumer callers move
|
|
67
|
+
to a new tag, avoiding a bootstrap cycle.
|
|
68
68
|
|
|
69
69
|
Initialization defaults to AGPL for new repositories. Synchronization defaults
|
|
70
70
|
to `--license preserve`, so an existing repository's license is never replaced
|
package/package.json
CHANGED