Skip to content

feat: Add noMerge config option with auto-detection for GitHub Actions#739

Merged
BYK merged 1 commit intomasterfrom
feat/no-merge-config-option
Feb 4, 2026
Merged

feat: Add noMerge config option with auto-detection for GitHub Actions#739
BYK merged 1 commit intomasterfrom
feat/no-merge-config-option

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 4, 2026

Summary

Add noMerge as a config option in .craft.yml that mirrors the --no-merge CLI flag. When enabled, the release branch is not merged back into main/master after publishing.

Key features:

  • New noMerge: true/false option in .craft.yml
  • Auto-detects compiled GitHub Actions (Node.js actions with dist/ folder) and defaults to noMerge: true
  • Clear logging indicates why merging was skipped (CLI, config, or auto-detected)
  • Warns if --merge-target is specified but ignored due to noMerge

Why?

Compiled GitHub Actions (built with @vercel/ncc or esbuild) need the dist/ folder in release branches but typically gitignore it on main. Merging the release branch back would overwrite the clean main with compiled artifacts.

Example

# .craft.yml
minVersion: '2.21.0'
noMerge: true  # Optional - auto-detected for compiled GitHub Actions
targets:
  - name: github

Changes

  • src/schemas/project_config.ts - Added noMerge to config schema
  • src/utils/detection.ts - New file with isCompiledGitHubAction() detection
  • src/config.ts - Added getNoMergeConfig() accessor function
  • src/commands/publish.ts - Modified merge logic to respect config
  • Added tests for config parsing and detection
Cursor Bugbot reviewed your changes and found no issues for commit 8f2ab72

@BYK BYK marked this pull request as ready for review February 4, 2026 22:14
@BYK BYK requested a review from dcramer February 4, 2026 22:14
@BYK
Copy link
Member Author

BYK commented Feb 4, 2026

@cursor review

@cursor
Copy link
Contributor

cursor bot commented Feb 4, 2026

Skipping Bugbot: Bugbot is disabled for this repository

@BYK
Copy link
Member Author

BYK commented Feb 4, 2026

@sentry review

@BYK BYK force-pushed the feat/no-merge-config-option branch from d6196e9 to a8b5757 Compare February 4, 2026 22:20
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Add `noMerge` as a config option in `.craft.yml` that mirrors the
`--no-merge` CLI flag. When enabled, the release branch is not merged
back into main/master after publishing.

Auto-detects compiled GitHub Actions (Node.js actions with dist/ folder)
and defaults to `noMerge: true` for them, since these projects typically
have dist/ gitignored on main but need it in release branches.

Resolution order:
1. CLI `--no-merge` flag (highest priority)
2. Explicit `noMerge` in .craft.yml
3. Auto-detected compiled GitHub Action
4. Default: merge the branch
@BYK BYK force-pushed the feat/no-merge-config-option branch from a8b5757 to 8f2ab72 Compare February 4, 2026 22:37
@BYK BYK merged commit 6230649 into master Feb 4, 2026
18 checks passed
@BYK BYK deleted the feat/no-merge-config-option branch February 4, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants