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

Allowing conform to be used in commit-msg git hooks #73

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

particledecay
Copy link
Contributor

feat: adding command line flag for commit msg

This allows someone to use conform enforce for commit-msg git hooks.

Copy link
Member

@andrewrynhard andrewrynhard left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit but... approved.

@@ -37,12 +38,21 @@ const TypeFix = "fix"
// Compliance implements the policy.Policy.Compliance function.
func (c *Conventional) Compliance(metadata *metadata.Metadata, options ...policy.Option) (report policy.Report) {
report = policy.Report{}
if !metadata.Git.IsClean {
return
// if !metadata.Git.IsClean {
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we remove the commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh snap I forgot I did that for testing

This allows someone to use `conform enforce` for commit-msg git hooks.

fix: removing commented code

fix: adding a check for ioutil reading the commit msg file
@codecov
Copy link

codecov bot commented Oct 8, 2018

Codecov Report

Merging #73 into master will decrease coverage by 5.12%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage    65.9%   60.78%   -5.13%     
==========================================
  Files           1        1              
  Lines          44       51       +7     
==========================================
+ Hits           29       31       +2     
- Misses         11       15       +4     
- Partials        4        5       +1
Impacted Files Coverage Δ
...kg/policy/conventionalcommit/conventionalcommit.go 60.78% <36.36%> (-5.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 088e0a7...81dd051. Read the comment docs.

@andrewrynhard andrewrynhard merged commit 4a6cc1c into siderolabs:master Oct 8, 2018
@andrewrynhard andrewrynhard added this to the v0.1.0 milestone Oct 8, 2018
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