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

chore: add Git Hook to validate commit messages #118

Merged
merged 4 commits into from
Jul 5, 2017

Conversation

rgommezz
Copy link

@rgommezz rgommezz commented Jul 4, 2017

No description provided.

@@ -0,0 +1,58 @@
const fs = require('fs');
Copy link
Member

@satya164 satya164 Jul 4, 2017

Choose a reason for hiding this comment

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

Use Flow if it doesn't need annotations

Copy link
Author

@rgommezz rgommezz Jul 5, 2017

Choose a reason for hiding this comment

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

Should I? There are only 2 functions to annotate, one with string type and buffer type, which is a node object. I don't see that much value

Copy link
Member

Choose a reason for hiding this comment

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

@rauliyohmc flow provides autocomplete

Copy link
Author

Choose a reason for hiding this comment

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

Cool, added

perf: true,
test: true,
chore: true,
revert: true,
Copy link
Member

Choose a reason for hiding this comment

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

breaking too

Copy link
Author

Choose a reason for hiding this comment

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

Added


const commitMsgFile = process.argv[2];

fs.readFile(commitMsgFile, function(err, buffer) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe fs.readFileSync is better since it's a script

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, changed

@satya164 satya164 changed the title Git Hook for validating commit message according to Angular standards chore: add Git Hook to validate commit messages Jul 5, 2017
@satya164 satya164 merged commit 2017024 into master Jul 5, 2017
@satya164 satya164 deleted the validate-commit-msg branch July 5, 2017 17:11
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.

None yet

2 participants