-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(pre-commit-hook & contribution guid) : Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. #94
feat(pre-commit-hook & contribution guid) : Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. #94
Conversation
@slayerjain @nehagup added the pre-commit hook pls go through it once whenever u r free. |
@khanjasir90 thanks for the PR! This doesn't seem to work on my machine. I think the reason is because you are not using the default hooks path ( Although there's an option for changing the git hooks path, I'm not if the default path is a problem. |
actually u need to configure it to the .githooks path by executing this command "git config core.hooksPath .githooks" and after that it will work |
Yes, but why not just use the default path? This way contributors don’t need to perform this additional step. |
actually @slayerjain the thing is that git doesn't track the .git folder so the changes made to .git folder will not be available to the contributors! |
@slayerjain does the above idea sounds good ? if not we can figure out something else. |
@khanjasir90 you have valid points. I'm looking into this. |
okay! @slayerjain |
@khanjasir90 I agree with your solution. 👍 we'll have to manually configure the client-side hooks. So I think we can mention this in the contributing guide. Please update the PR with the guide, then we can merge it :) |
ya sure i'll do the needfull in contributing.md i will cover all the steps of creating a PR from forking the repo to pushing the code is that okay with you! |
@khanjasir90 yep, sounds good |
… gofmt pre-commit hook & also updated contribution.md file with all the steps
@slayerjain please go through this in ur free time and let me know if all things are good or any change needs to be made. |
CONTRIBUTING.md
Outdated
|
||
``` | ||
git config core.hooksPath .githooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to give the scripts inside .githooks
permission for execution. So this line can become git config core.hooksPath .githooks && chmod +x .githooks/*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay will do the needfull!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the line to include permissions in the contributing guide
@nehagup What do you think about the changes to the contribution guide? |
updated contribution.md file with permission scripts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
Thanks for contributing @khanjasir90 ! 💫
Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. * added pre-commit hook * feat(pre-commit-hook & updated contribution guide): added support for gofmt pre-commit hook & also updated contribution.md file with all the steps * fix:updated permission for scripts Signed-off-by: iamskp99 <iamskp99@gmail.com>
Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. * added pre-commit hook * feat(pre-commit-hook & updated contribution guide): added support for gofmt pre-commit hook & also updated contribution.md file with all the steps * fix:updated permission for scripts Signed-off-by: iamskp99 <iamskp99@gmail.com>
Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. * added pre-commit hook * feat(pre-commit-hook & updated contribution guide): added support for gofmt pre-commit hook & also updated contribution.md file with all the steps * fix:updated permission for scripts
Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. * added pre-commit hook * feat(pre-commit-hook & updated contribution guide): added support for gofmt pre-commit hook & also updated contribution.md file with all the steps * fix:updated permission for scripts Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
Added support for gofmt pre-commit hook & updated contribution.md file with all the steps to make the contribution. * added pre-commit hook * feat(pre-commit-hook & updated contribution guide): added support for gofmt pre-commit hook & also updated contribution.md file with all the steps * fix:updated permission for scripts Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
Added pre-comit hook in .githook folder which would check for changes and accordingly format the gofiles with gofmt package.

also added the screen-shot of working githook in my local machine.