Skip to content

This hook project is part of a 2 articles tutorial about git hooks. In this tutorial we learn how to use git hooks to prevent commit duplicates and to analyze commit messages using data from Jira API.

Notifications You must be signed in to change notification settings

ManolloGuedes/Git-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Git Hooks

This project was made as part of two articles about Git Hooks. With this tutorial, two Git Hooks was created: post-rewrite and commit-msg.

The post-rewrite hook gives us the capabillity to discover duplicate commits.

The commit-message hook creates an acreates a commit message analysis flow that uses Jira's API data as input.

Articles

Getting Started

The step-by-step installation instructions of each hook are inside of its folder on README.md files.

You basically needs:

  • download both commit/src/commit-msg, commit/src/commit-verify.py, install.sh, and requirements.txt files to use commit-msg hook.
    • execute the install.sh file to install all requirentements present inside requirements.txt file
  • download rebase/src/post-rewrite file to use post-rewrite hook.
  • put these files inside the .git/hooks folder present in your project folder.
  • grant execution permission to both post-rewrite, commit-msg and commit-verify.py files.

Built With

  • Git Hooks - Git Hooks terminology
  • Shell Script - programming language used to create both hooks
  • Python 3 - programming language used to create the validation commit message program called by the commit-msg hook
  • Jira API - Atlassian API to access Jira's information
  • requests - HTTP library for Python

About

This hook project is part of a 2 articles tutorial about git hooks. In this tutorial we learn how to use git hooks to prevent commit duplicates and to analyze commit messages using data from Jira API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published