code-foundry 1.6.1 → 1.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.
@@ -16,8 +16,8 @@ release_type: node
16
16
  npm_publish: true
17
17
  license: agpl-3.0-or-later
18
18
  git_workflow: direct
19
- merge_strategy: rebase
20
- release_merge_strategy: rebase
19
+ merge_strategy: squash
20
+ release_merge_strategy: squash
21
21
  runner: ubuntu-latest
22
22
  unit_runner: ubuntu-slim
23
23
  performance_runner: ubuntu-latest
@@ -257,7 +257,7 @@ jobs:
257
257
  --method POST
258
258
  --field base=main
259
259
  --field head="$PROMOTION_BRANCH"
260
- --field title="Promote staging -> main ($DATE)"
260
+ --field title="chore(main): promote staging to main ($DATE)"
261
261
  --field body=@"$BODY_FILE"
262
262
  )
263
263
  if [ "$HAS_AUTOMATION_TOKEN" != true ]; then
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.6.1...v1.7.0) (2026-09-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * **release:** standardize generated PR titles ([#497](https://github.com/0xPlayerOne/code-foundry/issues/497)) ([44de0c4](https://github.com/0xPlayerOne/code-foundry/commit/44de0c4f1261a017a0395ddae268c203cccc71b4))
9
+
3
10
  ## [1.6.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.6.0...v1.6.1) (2026-09-08)
4
11
 
5
12
 
@@ -98,8 +98,8 @@ present.
98
98
  - `direct` (default): feature branches open pull requests directly into
99
99
  `main`. Validation and security scans run on every PR. No `staging` branch
100
100
  exists, no promotion caller is generated, and `merge_strategy` is not
101
- enforced. Release Please version PRs use `release_merge_strategy` (rebase by
102
- default; squash is also allowed). Dependabot updates target `main`. This is
101
+ enforced. Release Please version PRs squash into `main`
102
+ (`release_merge_strategy: squash`). Dependabot updates target `main`. This is
103
103
  the right choice when a repository has no preview or staging environment.
104
104
  - `staging-release` (opt-in): feature branches squash into `staging`, a
105
105
  promotion PR rebases validated changes into `main` (`merge_strategy:
package/docs/RELEASES.md CHANGED
@@ -24,9 +24,8 @@ topology, feature and fix branches land on `staging` with **squash** merges,
24
24
  the `staging` → `main` promotion PR merges with **rebase** (`merge_strategy:
25
25
  rebase`), and Release Please version PRs merge with **rebase**
26
26
  (`release_merge_strategy: rebase`). In the `direct` topology, feature and fix
27
- branches squash straight into `main` and Release Please version PRs use the
28
- configured `release_merge_strategy` (**rebase** by default, or **squash** when
29
- opted in). `merge_strategy` is not enforced. Release automation never defaults
27
+ branches squash straight into `main` and Release Please version PRs squash into
28
+ `main` (`release_merge_strategy: squash`). `merge_strategy` is not enforced. Release automation never defaults
30
29
  to a merge method and never merges with `--admin`: `staging-release` accepts
31
30
  only rebase for release PRs, while `direct` accepts rebase or squash.
32
31
 
@@ -46,7 +45,7 @@ release_type: auto # auto, node, python, rust, simple, or none
46
45
  npm_publish: false # true only for an npm package
47
46
  git_workflow: direct # direct (default) or staging-release
48
47
  merge_strategy: rebase # staging-release only: staging -> main promotion PRs rebase
49
- release_merge_strategy: rebase # required; direct also allows squash
48
+ release_merge_strategy: squash # direct default; staging-release requires rebase
50
49
  ```
51
50
 
52
51
  `git_workflow: staging-release` is opt-in; without it, repositories use the
@@ -136,6 +135,6 @@ already passed).
136
135
 
137
136
  1. Merge tested changes into `main` (direct: feature PRs; staging-release: promote `staging` into `main`).
138
137
  2. Review the generated Release Please PR and changelog.
139
- 3. Merge the release PR with the repository's configured `release_merge_strategy` (**rebase** by default; **squash** is also valid for direct topology).
138
+ 3. Merge the release PR with squash in the direct topology (`release_merge_strategy: squash`).
140
139
  4. Confirm the GitHub Release and any package publication.
141
140
  5. staging-release only: synchronize `staging` with the new `main` release commit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
5
5
  "homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
6
6
  "bugs": {
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
3
  "bump-minor-pre-major": true,
4
+ "pull-request-title-pattern": "chore(main): release ${version}",
5
+ "group-pull-request-title-pattern": "chore(main): release ${version}",
4
6
  "changelog-sections": [
5
7
  { "type": "feat", "section": "Features" },
6
8
  { "type": "fix", "section": "Bug Fixes" },
@@ -108,7 +108,7 @@ export function syncRepository(options) {
108
108
  const existingConfig = readConfig(configPath)
109
109
  if (!Object.keys(existingConfig).length && !options.init)
110
110
  throw new Error('Missing .github/code-foundry.yml; run init first.')
111
- const defaults = createDefaultConfig(target, source)
111
+ const defaults = createDefaultConfig(target, source, existingConfig.git_workflow)
112
112
  let config = { ...defaults, ...existingConfig }
113
113
  // Resolve and validate the license policy before any sync writes occur
114
114
  // (including config/default additions) so an unsupported policy fails
@@ -658,7 +658,7 @@ const DIRECT_DOC_REPLACEMENTS = {
658
658
  ],
659
659
  [
660
660
  'This repository uses the `staging-release` workflow: topic branches **squash** into `staging`, a promotion PR **rebases** validated changes into `main` (`merge_strategy: rebase`), and the Release Please version PR **rebases** into `main` (`release_merge_strategy: rebase`). Feature PRs land on `staging` with squash merges; promotion and release PRs land on `main` with rebase merges. Re-align `staging` with `main` after a release when needed.',
661
- 'This repository uses the `direct` workflow: topic branches **squash** directly into `main`, and the Release Please version PR lands on `main` with the configured `release_merge_strategy` (rebase by default, or squash when opted in). Feature PRs land on `main` with squash merges. No integration branch exists; all pull requests target `main`.',
661
+ 'This repository uses the `direct` workflow: topic branches **squash** directly into `main`, and the Release Please version PR **squashes** into `main` (`release_merge_strategy: squash`). Feature and release PRs land on `main` with squash merges. No integration branch exists; all pull requests target `main`.',
662
662
  ],
663
663
  ],
664
664
  '.github/CONTRIBUTING.md': [
@@ -676,7 +676,7 @@ const DIRECT_DOC_REPLACEMENTS = {
676
676
  ],
677
677
  [
678
678
  'The Git workflow is `staging-release`: topic branches **squash** into `staging`, a promotion PR **rebases** validated changes into `main` (`merge_strategy: rebase`), and the Release Please version PR **rebases** into `main` (`release_merge_strategy: rebase`). Release automation never defaults to a merge method and never merges with `--admin`; `code-foundry doctor` and `code-foundry sync` fail closed on any other merge strategy. Re-align `staging` with `main` after a release when needed.',
679
- 'The Git workflow is `direct`: topic branches **squash** directly into `main`, and the Release Please version PR lands on `main` with the configured `release_merge_strategy` (rebase by default, or squash when opted in). Release automation never defaults to a merge method and never merges with `--admin`; `code-foundry doctor` and `code-foundry sync` fail closed on any other release merge strategy. Feature branches never touch `staging`; repositories with a preview/staging environment opt into `git_workflow: staging-release` explicitly.',
679
+ 'The Git workflow is `direct`: topic branches **squash** directly into `main`, and the Release Please version PR **squashes** into `main` (`release_merge_strategy: squash`). Release automation never defaults to a merge method and never merges with `--admin`; `code-foundry doctor` and `code-foundry sync` fail closed on any other release merge strategy. Feature branches never touch `staging`; repositories with a preview/staging environment opt into `git_workflow: staging-release` explicitly.',
680
680
  ],
681
681
  [
682
682
  'git switch staging\ngit pull --ff-only origin staging',
@@ -702,7 +702,7 @@ const DIRECT_DOC_REPLACEMENTS = {
702
702
  ],
703
703
  [
704
704
  '| Change | Target | Merge method | Merge gate |\n| ---------------------------- | --------- | ----------------------------------------------- | --------------------------------------------------------- |\n| Working branch | `staging` | Squash | All applicable required checks pass |\n| `staging` → `main` promotion | `main` | Rebase (`merge_strategy`) | Current staging checks, release review, and rollout notes |\n| Release Please version PR | `main` | Rebase (`release_merge_strategy`, fails closed) | Validation gate and release policy pass |\n',
705
- '| Change | Target | Merge method | Merge gate |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Working branch | `main` | Squash | All applicable required checks pass |\n| Release Please version PR | `main` | Configured `release_merge_strategy` (rebase default, or squash in the direct topology) | Validation gate and release policy pass |',
705
+ '| Change | Target | Merge method | Merge gate |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Working branch | `main` | Squash | All applicable required checks pass |\n| Release Please version PR | `main` | Squash (`release_merge_strategy`) | Validation gate and release policy pass |',
706
706
  ],
707
707
  ['1. Create a focused branch from `staging`.', '1. Create a focused branch from `main`.'],
708
708
  ],
@@ -1068,11 +1068,12 @@ function buffersEqual(a, b) {
1068
1068
  return a.equals(b)
1069
1069
  }
1070
1070
 
1071
- /** @param {string} root @param {string} source @returns {Record<string,string>} */
1072
- function createDefaultConfig(root, source) {
1071
+ /** @param {string} root @param {string} source @param {string|undefined} configuredWorkflow @returns {Record<string,string>} */
1072
+ function createDefaultConfig(root, source, configuredWorkflow) {
1073
1073
  const languages = detectLanguages(root).join(',')
1074
1074
  const packageManager = detectPackageManager(root)
1075
1075
  const runners = recommendRunners(root)
1076
+ const stagingRelease = configuredWorkflow === 'staging-release'
1076
1077
  return {
1077
1078
  version: '1',
1078
1079
  profile: detectProfile(root),
@@ -1107,8 +1108,8 @@ function createDefaultConfig(root, source) {
1107
1108
  custom_workflows: 'preserve',
1108
1109
  license: existsSync(join(root, 'LICENSE')) ? 'preserve' : 'gpl-3.0-or-later',
1109
1110
  git_workflow: 'direct',
1110
- merge_strategy: 'rebase',
1111
- release_merge_strategy: 'rebase',
1111
+ merge_strategy: stagingRelease ? 'rebase' : 'squash',
1112
+ release_merge_strategy: stagingRelease ? 'rebase' : 'squash',
1112
1113
  }
1113
1114
  }
1114
1115