Skip to content

Implement semantic commit messages for environment merges #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsham042
Copy link

This PR updates the merge command to follow semantic commit conventions, improving git history consistency and enabling better automated tooling.

Changes

  • Added fmt package import to support string formatting
  • Updated merge commit message from "Merge environment <env>" to fmt.Sprintf("chore(merge): merge environment %s", env)
  • Maintained all existing functionality - stash handling, stdout/stderr wiring, and error handling remain unchanged

Before

cmd := exec.CommandContext(ctx, "git", "merge", "-m", "Merge environment "+env, "--", "container-use/"+env)

After

cmd := exec.CommandContext(ctx, "git", "merge", "-m", fmt.Sprintf("chore(merge): merge environment %s", env), "--", "container-use/"+env)

Benefits

  • Consistent git history - All merge commits now follow semantic commit conventions
  • Better tooling support - Enables automated changelog generation and version bumping
  • Improved readability - Clear type (chore) and scope (merge) for each merge operation
  • Searchable commits - Easier to filter and find merge-related commits

Example Output

Instead of: "Merge environment production"
Now produces: "chore(merge): merge environment production"

Still needs testing and validation

Fixes #100

Signed-off-by: Joe Shamon <[email protected]>
@cwlbraa
Copy link
Collaborator

cwlbraa commented Jun 20, 2025

i'm afraid that characterizing all merges as chore throws away quite a bit of semantics, and merge is not really a scope.

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.

Semantic Commit messages
2 participants