Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ritikesh/githooks
Leveraging Git hooks to follow templated commit messages and notifying users on certain kind of file changes
https://github.com/ritikesh/githooks
Last synced: 15 days ago
JSON representation
Leveraging Git hooks to follow templated commit messages and notifying users on certain kind of file changes
- Host: GitHub
- URL: https://github.com/ritikesh/githooks
- Owner: ritikesh
- Created: 2016-04-28T07:02:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T13:29:43.000Z (over 7 years ago)
- Last Synced: 2024-10-21T20:37:07.432Z (27 days ago)
- Language: Ruby
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GitHooks
### Setup information:
1. Move the files to .git/hooks/* - remove the .rb extensions to make the files executable. template file can remain as a .txt file.
2. Run the following commands:
```
git config commit.template .git/hooks/commit_template.txt
git config user.name ""
chmod +x .git/hooks/*
```### The Hooks:
1. commit-msg - validates commit messages, fetches ticket information, allowing devs to only commit code for tickets which are in a certain status(ids) and are assigned to the dev who's committing the code.
2. pre-push - notify certain leads/managers when a commit contains certain kind of files, add a note on the ticket for which code is being pushed. (update - restrict note addition based on the local git branch)