Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Enforce the JIRA issue id in a GIT commit message

Enforce the JIRA issue id in a GIT commit message

This can be done by using git hooks file location at .git/hooks/commit-msg. Following are the 2 way in whcih each Developers can set the Hooks in their developement envioronment.

Method – 1

[code]# commit-msg.sh
#!/bin/sh
# This hook will make sure that the commit message contains a JIRA issue.
#
# To enable this hook, rename this file to “.git/hooks/commit-msg”.
# Make sure to add execution permissions to the file.

export MESSAGE=$(<$1)
export JIRA_ISSUE_TAG=’ISSUETAG-([0-9]*)’

if [[ $MESSAGE =~ $JIRA_ISSUE_TAG ]]; then
echo -e “\e[32mGreat, your commit message contains a JIRA issue!\e[0m”
exit 0;
fi

echo -e “\e[31mOh hamburgers … You forgot to add a JIRA issue number!\e[0m”;
exit 1;

[/code]

Method 2 – This is another very good example to implement to force jira id in each commit message. http://nsbogan.com/tools/2015/06/04/jira-id-in-git-commit-messages

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Install Atlassian Jira with Docker: Quick Start, Persistent Volumes, and Deployment Checks

This guide shows how to run Jira in Docker using the original one-line command, then improve it with persistent storage and repeatable deployment steps. It also includes a workflow diagram, command examples, and practical validation checks.

Read More

Jira on Linux: Installation and Configuration with Safer Service and Firewall Setup

Learn how to install Jira on Linux using Atlassian’s installer, manage it as a service, and expose port 8080 safely. This revision keeps the original references but updates the process for clearer, production-minded operations.

Read More

Top Jira interview questions and answers

What is the full form of Jira? JIRA is a tool developed by Australian Company Atlassian. … The JIRA’s full form is actually inherited from the Japanese word…

Read More

Jira Interview Questions and Answers – Part 4

Who is considered the father of Kanban in software? Xavier Morera David J. Anderson (Ans) Taichi Ohno Michael Vizdos Regarding new items to be worked on immediately,…

Read More

Jira Interview Questions and Answers – Part 3

How would you share a query with another JIRA user? Send the JIRA query in as text in an email Create a dashboard with the query and…

Read More

Jira Interview Questions and Answers – Part 2

What type of project should we create in Jira for the purpose of this training? Agile Scrum (Ans) Kanban Jira classic Gantt-chart project The following is only…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x