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

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

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

khanjasir90
Copy link
Contributor

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.
image

@khanjasir90
Copy link
Contributor Author

@slayerjain @nehagup added the pre-commit hook pls go through it once whenever u r free.

@slayerjain
Copy link
Member

@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 ($GIT_DIR/hooks) as mentioned here - https://git-scm.com/docs/githooks#_description

Although there's an option for changing the git hooks path, I'm not if the default path is a problem.

@khanjasir90
Copy link
Contributor Author

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

@slayerjain
Copy link
Member

Yes, but why not just use the default path? This way contributors don’t need to perform this additional step.

@khanjasir90
Copy link
Contributor Author

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!
So what I have decided is to update/create a new contributing.md file where will cover all the things from cloning the repo to raising a PR all steps will be covered including the above one! So it will help the contributors and make their task easy

@khanjasir90
Copy link
Contributor Author

@slayerjain does the above idea sounds good ? if not we can figure out something else.

@slayerjain
Copy link
Member

@khanjasir90 you have valid points. I'm looking into this.

@khanjasir90
Copy link
Contributor Author

okay! @slayerjain

@slayerjain
Copy link
Member

slayerjain commented Jul 11, 2022

@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 :)

@khanjasir90
Copy link
Contributor Author

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!

@slayerjain
Copy link
Member

@khanjasir90 yep, sounds good

… gofmt pre-commit hook & also updated contribution.md file with all the steps
@khanjasir90 khanjasir90 changed the title added pre-commit hook 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. Jul 11, 2022
@khanjasir90
Copy link
Contributor Author

@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
Copy link
Member

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/*

Copy link
Contributor Author

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!

Copy link
Member

@slayerjain slayerjain left a 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

@slayerjain
Copy link
Member

@nehagup What do you think about the changes to the contribution guide?

@khanjasir90
Copy link
Contributor Author

updated contribution.md file with permission scripts.

Copy link
Member

@nehagup nehagup left a 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 ! 💫

@nehagup nehagup merged commit c2188f1 into keploy:main Jul 12, 2022
iamskp99 pushed a commit that referenced this pull request Aug 13, 2022
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>
iamskp99 pushed a commit that referenced this pull request Aug 13, 2022
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>
re-Tick pushed a commit that referenced this pull request Aug 18, 2022
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
re-Tick pushed a commit that referenced this pull request Aug 18, 2022
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>
re-Tick pushed a commit that referenced this pull request Aug 25, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants