Skip to content

Conversation

@cbullinger
Copy link
Collaborator

  • Fix bug that caused PRs to trigger on non-main branch
  • Fix bug that caused copier to not respect defaults set in workflow config

Previously, when a workflow had ANY commit_strategy fields, it would
completely ignore all defaults. This meant workflows with partial
commit_strategy (e.g., only pr_title and pr_body) wouldn't inherit
commit_message or use_pr_template from defaults.

Changes:
- Modified YAMLConfig.SetDefaults() to merge individual fields
- Modified WorkflowConfig.SetDefaults() to merge individual fields
- Fields now inherited: Type, CommitMessage, PRTitle, PRBody, UsePRTemplate
- AutoMerge intentionally NOT inherited for safety when workflow has
  its own commit_strategy

Tests:
- Added comprehensive tests in types/config_test.go
- Updated existing test in services/main_config_loader_test.go
- All tests pass
Copy link
Collaborator

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

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

Seems plausible 🤷‍♀️

Let's give it a try!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checking - did we mean to add a new README in this PR, or was this just Claude being overly helpful again?

@cbullinger cbullinger merged commit 873685a into main Dec 4, 2025
1 check passed
@cbullinger cbullinger deleted the copier-workflow-enh branch December 4, 2025 19:55
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.

3 participants