Skip to content
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

Add commit_format option #24

Merged
merged 5 commits into from
Jun 28, 2020
Merged

Conversation

thislooksfun
Copy link
Contributor

@thislooksfun thislooksfun commented Jun 16, 2020

This adds the new option commit_format. It is either a string, in which case it resolves to one of the pre-defined patterns in SemanticReleaseHelper.format_patterns, or it can be passed a Regexp object, in which case that becomes the pattern through which the commit messages will be processed.

Examples:

lane :changelog_angular do
  analyze_commits(match: 'v*', commit_format: 'angular')
  notes = conventional_changelog
  puts(notes)
end

lane :changelog_custom do
  # will match commits of the form 'cl-<type>[.scope]= <subject>'
  analyze_commits(match: 'v*', commit_format: /^cl-(\w*)(?:\.(.*))?()= (.*)/)
  notes = conventional_changelog
  puts(notes)
end

Notes:

  • Since this change defaults to the previous value, it is backwards-compatible.
  • This adds two built-in options:

Closes #22

This adds the new option commit_format. It is either a string, in which case it resolves to one of the pre-defined
patterns in SemanticReleaseHelper.format_patterns, or it can be passed a Regexp object, in which case that becomes
the pattern through which the commit messages will be processed.
@thislooksfun thislooksfun changed the title Feature/add presets Add commit_format option Jun 16, 2020
@xotahal
Copy link
Owner

xotahal commented Jun 28, 2020

Thanks for this @thislooksfun 🙏 Could you please resolve the conflict?

@thislooksfun
Copy link
Contributor Author

@xotahal Conflict resolved!

@xotahal xotahal merged commit bc5ee67 into xotahal:master Jun 28, 2020
@thislooksfun thislooksfun deleted the feature/add-presets branch June 28, 2020 04:56
@thislooksfun thislooksfun mentioned this pull request Jun 28, 2020
aminerol added a commit to aminerol/fastlane-plugin-semantic_release that referenced this pull request Dec 2, 2020
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.

Option to override defaults
2 participants