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

Fix Git hooks #1911

Merged
merged 1 commit into from
Jul 14, 2020
Merged

Fix Git hooks #1911

merged 1 commit into from
Jul 14, 2020

Conversation

danielamorse
Copy link
Collaborator

Jira

https://pegadigitalit.atlassian.net/browse/DS-131

Summary

Fix pre-commit, pre-push, Git hooks.

Details

Git hooks appeared to stop working. Actually, they are working when you commit from command line, but are skipped if you use Source Tree, as I do.

Looks like there are issues with both Husky (which we use for hooks) and Source Tree that contribute to this issue (see issue), but it can be fixed by simply downgrading Husky.

How to test

  • On master, edit packages/components/bolt-popover/src/popover.scss (L40-41) and switch the order of the display and position rules, so that position comes first. This should produce a stylint error.
  • Stage and commit the file from command line, verify pre-commit hook throws an error.
  • Repeat in SourceTree, verify it successfully commits.
  • Checkout this feature branch and repeat above steps, verify SourceTree now throws an error on commit. Note: be sure to run yarn after switching branches.

Copy link
Collaborator

@mikemai2awesome mikemai2awesome left a comment

Choose a reason for hiding this comment

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

I checked both Github desktop app and SourceTree, both cannot commit and gets an error. Working as expected.

@danielamorse danielamorse merged commit cfdd0aa into master Jul 14, 2020
@danielamorse danielamorse deleted the bugfix/DS-131 branch July 14, 2020 16:55
@remydenton remydenton added type: bugfix List this PR in the 'Bug Fixes' section of the release notes. type: docs List this PR in the 'Docs' section of the release notes. and removed type: bugfix List this PR in the 'Bug Fixes' section of the release notes. bug type: docs List this PR in the 'Docs' section of the release notes. labels Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bugfix List this PR in the 'Bug Fixes' section of the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants