Gitlab hooks to enforce a developer to use JIRA issue in their commit message





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







-1















I want to implement Gitlab custom hooks for only one repository using Linux Bash scripts for the following:




  1. I want to enforce the developers to mention the JIRA issue number with that issue status (ex: fixed, In progress) in their commit message, if the commit message doesn't have the issue number, the push should be rejected automatically.

  2. If the commit message has the JIRA issue ID with the status, the developers should be allowed to push the change.


I am confused between what is the best Gitlab hook I should pick and how do I use JIRA issue in the commit message.










share|improve this question

























  • @osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

    – Veeresh Reddy
    Jan 8 at 10:32


















-1















I want to implement Gitlab custom hooks for only one repository using Linux Bash scripts for the following:




  1. I want to enforce the developers to mention the JIRA issue number with that issue status (ex: fixed, In progress) in their commit message, if the commit message doesn't have the issue number, the push should be rejected automatically.

  2. If the commit message has the JIRA issue ID with the status, the developers should be allowed to push the change.


I am confused between what is the best Gitlab hook I should pick and how do I use JIRA issue in the commit message.










share|improve this question

























  • @osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

    – Veeresh Reddy
    Jan 8 at 10:32














-1












-1








-1








I want to implement Gitlab custom hooks for only one repository using Linux Bash scripts for the following:




  1. I want to enforce the developers to mention the JIRA issue number with that issue status (ex: fixed, In progress) in their commit message, if the commit message doesn't have the issue number, the push should be rejected automatically.

  2. If the commit message has the JIRA issue ID with the status, the developers should be allowed to push the change.


I am confused between what is the best Gitlab hook I should pick and how do I use JIRA issue in the commit message.










share|improve this question
















I want to implement Gitlab custom hooks for only one repository using Linux Bash scripts for the following:




  1. I want to enforce the developers to mention the JIRA issue number with that issue status (ex: fixed, In progress) in their commit message, if the commit message doesn't have the issue number, the push should be rejected automatically.

  2. If the commit message has the JIRA issue ID with the status, the developers should be allowed to push the change.


I am confused between what is the best Gitlab hook I should pick and how do I use JIRA issue in the commit message.







bash gitlab hook






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 6:03









osowskit

2,46511832




2,46511832










asked Nov 25 '18 at 7:04









Veeresh ReddyVeeresh Reddy

145




145













  • @osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

    – Veeresh Reddy
    Jan 8 at 10:32



















  • @osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

    – Veeresh Reddy
    Jan 8 at 10:32

















@osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

– Veeresh Reddy
Jan 8 at 10:32





@osowskit, have you implemented this hook. I am looking for same but for GIT Issues.

– Veeresh Reddy
Jan 8 at 10:32












1 Answer
1






active

oldest

votes


















1














As it happens I have a script that does just that. Mine also checks for compliance with a few other commit style issues but you can customise it to your requirements.



#!/bin/bash
#
# pre-receive hook for Commit Check
#
# Adapted from
# http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

REGEX='^((([A-Z]+-[0-9]+|maint|docs)) [A-Z]|Version [0-9]+).*[^.]$'

check_single_commit()
{
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 1p)
SECOND_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 2p)

# Warn if line 1 > 50 chars
WIDTH=$(echo $FIRST_LINE | wc -c)
[ $WIDTH -gt 50 ] && [ $WIDTH -le 70 ] && printf "Warning: first line of commit exceeds 50 charactersnn"

# Fail if there is no Jira, docs or maint ref.
echo $FIRST_LINE | egrep -q "$REGEX"
COMMIT_CHECK_STATUS=$?
if [ $COMMIT_CHECK_STATUS -gt 0 ]; then
echo "Fail: No Jira ref found in commit message"
echo "Expected: $REGEX"
echo "Actual:"
echo "$COMMIT_MESSAGE" |sed -e 's/^/ /'
echo ""
fi

# Fail if second line is not blank.
if [ ! -z "$SECOND_LINE" ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ -z "$SECOND_LINE" ] ; COMMIT_CHECK_STATUS=$?
echo "Second line of commit is not blank, but is '$SECOND_LINE'"
echo ""
fi

# Fail if line 1 > 70 chars
if [ $WIDTH -gt 70 ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ $WIDTH -le 70 ] ; COMMIT_CHECK_STATUS=$?
echo "Fail: first line of commit exceeds 70 characters, please use the commit body"
echo ""
fi
}

check_all_commits()
{
REVISIONS=$(git rev-list master..$NEW_VALUE)
IFS='n' read -ra LIST_OF_REVISIONS <<< "$REVISIONS"

for rid in "${!LIST_OF_REVISIONS[@]}"; do
REVISION=${LIST_OF_REVISIONS[rid]}
COMMIT_MESSAGE=$(git cat-file commit $REVISION | sed '1,/^$/d')
check_single_commit

if [ $COMMIT_CHECK_STATUS -ne 0 ]; then
echo "Commit validation failed for commit $REVISION" >&2
echo ""
echo "Please read: https://chris.beams.io/posts/git-commit/"
echo ""
exit 1
fi
done
}

# Get custom commit message format

# After a push occurs and before any refs are updated on the remote repository,
# the git-receive-pack process invokes the pre-receive hook script with the
# standard input of one line per ref to be updated:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# This string represents these arguments:
#
# <old-value> Old object name stored in the ref. When you create a new ref,
# this equals 40 zeroes.
# <new-value> New object name to be stored in the ref. When you delete a ref,
# this equals 40 zeroes.
# <ref-name> The full name of the ref.

while read OLD_VALUE NEW_VALUE REFNAME ; do
[ $NEW_VALUE == 0000000000000000000000000000000000000000 ] && exit 0
check_all_commits
done

exit 0

# vim:set ft=sh





share|improve this answer
























  • thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

    – Veeresh Reddy
    Nov 26 '18 at 3:32











  • Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

    – Alex Harvey
    Nov 26 '18 at 5:47












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465388%2fgitlab-hooks-to-enforce-a-developer-to-use-jira-issue-in-their-commit-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














As it happens I have a script that does just that. Mine also checks for compliance with a few other commit style issues but you can customise it to your requirements.



#!/bin/bash
#
# pre-receive hook for Commit Check
#
# Adapted from
# http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

REGEX='^((([A-Z]+-[0-9]+|maint|docs)) [A-Z]|Version [0-9]+).*[^.]$'

check_single_commit()
{
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 1p)
SECOND_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 2p)

# Warn if line 1 > 50 chars
WIDTH=$(echo $FIRST_LINE | wc -c)
[ $WIDTH -gt 50 ] && [ $WIDTH -le 70 ] && printf "Warning: first line of commit exceeds 50 charactersnn"

# Fail if there is no Jira, docs or maint ref.
echo $FIRST_LINE | egrep -q "$REGEX"
COMMIT_CHECK_STATUS=$?
if [ $COMMIT_CHECK_STATUS -gt 0 ]; then
echo "Fail: No Jira ref found in commit message"
echo "Expected: $REGEX"
echo "Actual:"
echo "$COMMIT_MESSAGE" |sed -e 's/^/ /'
echo ""
fi

# Fail if second line is not blank.
if [ ! -z "$SECOND_LINE" ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ -z "$SECOND_LINE" ] ; COMMIT_CHECK_STATUS=$?
echo "Second line of commit is not blank, but is '$SECOND_LINE'"
echo ""
fi

# Fail if line 1 > 70 chars
if [ $WIDTH -gt 70 ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ $WIDTH -le 70 ] ; COMMIT_CHECK_STATUS=$?
echo "Fail: first line of commit exceeds 70 characters, please use the commit body"
echo ""
fi
}

check_all_commits()
{
REVISIONS=$(git rev-list master..$NEW_VALUE)
IFS='n' read -ra LIST_OF_REVISIONS <<< "$REVISIONS"

for rid in "${!LIST_OF_REVISIONS[@]}"; do
REVISION=${LIST_OF_REVISIONS[rid]}
COMMIT_MESSAGE=$(git cat-file commit $REVISION | sed '1,/^$/d')
check_single_commit

if [ $COMMIT_CHECK_STATUS -ne 0 ]; then
echo "Commit validation failed for commit $REVISION" >&2
echo ""
echo "Please read: https://chris.beams.io/posts/git-commit/"
echo ""
exit 1
fi
done
}

# Get custom commit message format

# After a push occurs and before any refs are updated on the remote repository,
# the git-receive-pack process invokes the pre-receive hook script with the
# standard input of one line per ref to be updated:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# This string represents these arguments:
#
# <old-value> Old object name stored in the ref. When you create a new ref,
# this equals 40 zeroes.
# <new-value> New object name to be stored in the ref. When you delete a ref,
# this equals 40 zeroes.
# <ref-name> The full name of the ref.

while read OLD_VALUE NEW_VALUE REFNAME ; do
[ $NEW_VALUE == 0000000000000000000000000000000000000000 ] && exit 0
check_all_commits
done

exit 0

# vim:set ft=sh





share|improve this answer
























  • thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

    – Veeresh Reddy
    Nov 26 '18 at 3:32











  • Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

    – Alex Harvey
    Nov 26 '18 at 5:47
















1














As it happens I have a script that does just that. Mine also checks for compliance with a few other commit style issues but you can customise it to your requirements.



#!/bin/bash
#
# pre-receive hook for Commit Check
#
# Adapted from
# http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

REGEX='^((([A-Z]+-[0-9]+|maint|docs)) [A-Z]|Version [0-9]+).*[^.]$'

check_single_commit()
{
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 1p)
SECOND_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 2p)

# Warn if line 1 > 50 chars
WIDTH=$(echo $FIRST_LINE | wc -c)
[ $WIDTH -gt 50 ] && [ $WIDTH -le 70 ] && printf "Warning: first line of commit exceeds 50 charactersnn"

# Fail if there is no Jira, docs or maint ref.
echo $FIRST_LINE | egrep -q "$REGEX"
COMMIT_CHECK_STATUS=$?
if [ $COMMIT_CHECK_STATUS -gt 0 ]; then
echo "Fail: No Jira ref found in commit message"
echo "Expected: $REGEX"
echo "Actual:"
echo "$COMMIT_MESSAGE" |sed -e 's/^/ /'
echo ""
fi

# Fail if second line is not blank.
if [ ! -z "$SECOND_LINE" ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ -z "$SECOND_LINE" ] ; COMMIT_CHECK_STATUS=$?
echo "Second line of commit is not blank, but is '$SECOND_LINE'"
echo ""
fi

# Fail if line 1 > 70 chars
if [ $WIDTH -gt 70 ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ $WIDTH -le 70 ] ; COMMIT_CHECK_STATUS=$?
echo "Fail: first line of commit exceeds 70 characters, please use the commit body"
echo ""
fi
}

check_all_commits()
{
REVISIONS=$(git rev-list master..$NEW_VALUE)
IFS='n' read -ra LIST_OF_REVISIONS <<< "$REVISIONS"

for rid in "${!LIST_OF_REVISIONS[@]}"; do
REVISION=${LIST_OF_REVISIONS[rid]}
COMMIT_MESSAGE=$(git cat-file commit $REVISION | sed '1,/^$/d')
check_single_commit

if [ $COMMIT_CHECK_STATUS -ne 0 ]; then
echo "Commit validation failed for commit $REVISION" >&2
echo ""
echo "Please read: https://chris.beams.io/posts/git-commit/"
echo ""
exit 1
fi
done
}

# Get custom commit message format

# After a push occurs and before any refs are updated on the remote repository,
# the git-receive-pack process invokes the pre-receive hook script with the
# standard input of one line per ref to be updated:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# This string represents these arguments:
#
# <old-value> Old object name stored in the ref. When you create a new ref,
# this equals 40 zeroes.
# <new-value> New object name to be stored in the ref. When you delete a ref,
# this equals 40 zeroes.
# <ref-name> The full name of the ref.

while read OLD_VALUE NEW_VALUE REFNAME ; do
[ $NEW_VALUE == 0000000000000000000000000000000000000000 ] && exit 0
check_all_commits
done

exit 0

# vim:set ft=sh





share|improve this answer
























  • thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

    – Veeresh Reddy
    Nov 26 '18 at 3:32











  • Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

    – Alex Harvey
    Nov 26 '18 at 5:47














1












1








1







As it happens I have a script that does just that. Mine also checks for compliance with a few other commit style issues but you can customise it to your requirements.



#!/bin/bash
#
# pre-receive hook for Commit Check
#
# Adapted from
# http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

REGEX='^((([A-Z]+-[0-9]+|maint|docs)) [A-Z]|Version [0-9]+).*[^.]$'

check_single_commit()
{
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 1p)
SECOND_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 2p)

# Warn if line 1 > 50 chars
WIDTH=$(echo $FIRST_LINE | wc -c)
[ $WIDTH -gt 50 ] && [ $WIDTH -le 70 ] && printf "Warning: first line of commit exceeds 50 charactersnn"

# Fail if there is no Jira, docs or maint ref.
echo $FIRST_LINE | egrep -q "$REGEX"
COMMIT_CHECK_STATUS=$?
if [ $COMMIT_CHECK_STATUS -gt 0 ]; then
echo "Fail: No Jira ref found in commit message"
echo "Expected: $REGEX"
echo "Actual:"
echo "$COMMIT_MESSAGE" |sed -e 's/^/ /'
echo ""
fi

# Fail if second line is not blank.
if [ ! -z "$SECOND_LINE" ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ -z "$SECOND_LINE" ] ; COMMIT_CHECK_STATUS=$?
echo "Second line of commit is not blank, but is '$SECOND_LINE'"
echo ""
fi

# Fail if line 1 > 70 chars
if [ $WIDTH -gt 70 ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ $WIDTH -le 70 ] ; COMMIT_CHECK_STATUS=$?
echo "Fail: first line of commit exceeds 70 characters, please use the commit body"
echo ""
fi
}

check_all_commits()
{
REVISIONS=$(git rev-list master..$NEW_VALUE)
IFS='n' read -ra LIST_OF_REVISIONS <<< "$REVISIONS"

for rid in "${!LIST_OF_REVISIONS[@]}"; do
REVISION=${LIST_OF_REVISIONS[rid]}
COMMIT_MESSAGE=$(git cat-file commit $REVISION | sed '1,/^$/d')
check_single_commit

if [ $COMMIT_CHECK_STATUS -ne 0 ]; then
echo "Commit validation failed for commit $REVISION" >&2
echo ""
echo "Please read: https://chris.beams.io/posts/git-commit/"
echo ""
exit 1
fi
done
}

# Get custom commit message format

# After a push occurs and before any refs are updated on the remote repository,
# the git-receive-pack process invokes the pre-receive hook script with the
# standard input of one line per ref to be updated:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# This string represents these arguments:
#
# <old-value> Old object name stored in the ref. When you create a new ref,
# this equals 40 zeroes.
# <new-value> New object name to be stored in the ref. When you delete a ref,
# this equals 40 zeroes.
# <ref-name> The full name of the ref.

while read OLD_VALUE NEW_VALUE REFNAME ; do
[ $NEW_VALUE == 0000000000000000000000000000000000000000 ] && exit 0
check_all_commits
done

exit 0

# vim:set ft=sh





share|improve this answer













As it happens I have a script that does just that. Mine also checks for compliance with a few other commit style issues but you can customise it to your requirements.



#!/bin/bash
#
# pre-receive hook for Commit Check
#
# Adapted from
# http://blog.hgomez.net/2015/03/02/Gitlab-custom-hooks-Bash-Way.html

REGEX='^((([A-Z]+-[0-9]+|maint|docs)) [A-Z]|Version [0-9]+).*[^.]$'

check_single_commit()
{
FIRST_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 1p)
SECOND_LINE=$(echo "$COMMIT_MESSAGE" | sed -n 2p)

# Warn if line 1 > 50 chars
WIDTH=$(echo $FIRST_LINE | wc -c)
[ $WIDTH -gt 50 ] && [ $WIDTH -le 70 ] && printf "Warning: first line of commit exceeds 50 charactersnn"

# Fail if there is no Jira, docs or maint ref.
echo $FIRST_LINE | egrep -q "$REGEX"
COMMIT_CHECK_STATUS=$?
if [ $COMMIT_CHECK_STATUS -gt 0 ]; then
echo "Fail: No Jira ref found in commit message"
echo "Expected: $REGEX"
echo "Actual:"
echo "$COMMIT_MESSAGE" |sed -e 's/^/ /'
echo ""
fi

# Fail if second line is not blank.
if [ ! -z "$SECOND_LINE" ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ -z "$SECOND_LINE" ] ; COMMIT_CHECK_STATUS=$?
echo "Second line of commit is not blank, but is '$SECOND_LINE'"
echo ""
fi

# Fail if line 1 > 70 chars
if [ $WIDTH -gt 70 ] && [ $COMMIT_CHECK_STATUS -eq 0 ]; then
[ $WIDTH -le 70 ] ; COMMIT_CHECK_STATUS=$?
echo "Fail: first line of commit exceeds 70 characters, please use the commit body"
echo ""
fi
}

check_all_commits()
{
REVISIONS=$(git rev-list master..$NEW_VALUE)
IFS='n' read -ra LIST_OF_REVISIONS <<< "$REVISIONS"

for rid in "${!LIST_OF_REVISIONS[@]}"; do
REVISION=${LIST_OF_REVISIONS[rid]}
COMMIT_MESSAGE=$(git cat-file commit $REVISION | sed '1,/^$/d')
check_single_commit

if [ $COMMIT_CHECK_STATUS -ne 0 ]; then
echo "Commit validation failed for commit $REVISION" >&2
echo ""
echo "Please read: https://chris.beams.io/posts/git-commit/"
echo ""
exit 1
fi
done
}

# Get custom commit message format

# After a push occurs and before any refs are updated on the remote repository,
# the git-receive-pack process invokes the pre-receive hook script with the
# standard input of one line per ref to be updated:
#
# <old-value> SP <new-value> SP <ref-name> LF
#
# This string represents these arguments:
#
# <old-value> Old object name stored in the ref. When you create a new ref,
# this equals 40 zeroes.
# <new-value> New object name to be stored in the ref. When you delete a ref,
# this equals 40 zeroes.
# <ref-name> The full name of the ref.

while read OLD_VALUE NEW_VALUE REFNAME ; do
[ $NEW_VALUE == 0000000000000000000000000000000000000000 ] && exit 0
check_all_commits
done

exit 0

# vim:set ft=sh






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 7:09









Alex HarveyAlex Harvey

6,08111230




6,08111230













  • thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

    – Veeresh Reddy
    Nov 26 '18 at 3:32











  • Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

    – Alex Harvey
    Nov 26 '18 at 5:47



















  • thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

    – Veeresh Reddy
    Nov 26 '18 at 3:32











  • Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

    – Alex Harvey
    Nov 26 '18 at 5:47

















thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

– Veeresh Reddy
Nov 26 '18 at 3:32





thanks! would you explain this script to me . Give me your gmail ID so that i will contact you.

– Veeresh Reddy
Nov 26 '18 at 3:32













Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

– Alex Harvey
Nov 26 '18 at 5:47





Did you read the comments in the code and also read the blog post it mentions? I probably can't explain it any more than that.

– Alex Harvey
Nov 26 '18 at 5:47




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465388%2fgitlab-hooks-to-enforce-a-developer-to-use-jira-issue-in-their-commit-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Hercules Kyvelos

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud