summaryrefslogtreecommitdiffstats
path: root/src/build/tools
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-05-21 15:49:51 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-07-11 12:48:51 -0400
commit1534c78f2989475cb96f542d6969b06f4c950fa4 (patch)
tree187723204b93892c0a740d7fa20f1d83fb13ed5c /src/build/tools
parente14387c19cc9fbc52ceaa5d116d13ba40f46bec6 (diff)
downloadtalos-hostboot-1534c78f2989475cb96f542d6969b06f4c950fa4.tar.gz
talos-hostboot-1534c78f2989475cb96f542d6969b06f4c950fa4.zip
Add Resolves option for tags
Allow a github issue to be used in addition to CQ or RTC tags. Change-Id: I0e7b317fe9f25b5edc864ca877b76b1ede30507f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59160 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/tools')
-rwxr-xr-xsrc/build/tools/verify-commit26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/build/tools/verify-commit b/src/build/tools/verify-commit
index 93a471784..780726b3f 100755
--- a/src/build/tools/verify-commit
+++ b/src/build/tools/verify-commit
@@ -6,7 +6,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2013,2017
+# Contributors Listed Below - COPYRIGHT 2013,2018
# [+] International Business Machines Corp.
#
#
@@ -239,6 +239,7 @@ sub verifyCommitMsg
my $lineCount = 0;
my $rtcTag = "";
my $cqTag = "";
+ my $githubTag = "";
my $changeId = "";
my $taggedLine = "";
my $untaggedLine = "";
@@ -277,6 +278,7 @@ sub verifyCommitMsg
$rtcTag = "";
$cqTag = "";
+ $githubTag = "";
$untaggedLine = "";
$taggedLine = "";
}
@@ -290,7 +292,7 @@ sub verifyCommitMsg
}
}
- # Verify format of RTC message.
+ # Verify format of RTC message. "RTC: 123456"
if ($line =~ m/^\s*RTC:\s*[0-9]+(.*)/)
{
$rtcTag = $line;
@@ -301,6 +303,7 @@ sub verifyCommitMsg
}
}
+ # Verify format of CQ message. "CQ: 123456"
if ($line =~ m/^\s*CQ:\s*[A-Z][A-Z][0-9]+(.*)/)
{
$cqTag = $line;
@@ -311,6 +314,18 @@ sub verifyCommitMsg
}
}
+ # Verify format of Github message. "Resolves somerepo/#12345"
+ # See https://help.github.com/articles/closing-issues-via-commit-messages
+ if ($line =~ m/^\s*Resolves \s*.*#[0-9]+(.*)/)
+ {
+ $githubTag = $line;
+ if ("" ne $1)
+ {
+ error("Commit Message",$line,$lineCount,
+ (sprintf "Github tag format incorrect (%s).", $1));
+ }
+ }
+
if ($line =~ m/^\s*Change-Id:\s*[I][\w]+(.*)/)
{
if ("" ne $changeId)
@@ -331,7 +346,8 @@ sub verifyCommitMsg
# away.
if ( (($line =~ m/^\s*[A-Za-z0-9\-_]+:[^:]/)
&& !($line =~ m/http/)) ||
- (($line =~ m/http/) && ($line =~ m/Reviewed-on:/)))
+ (($line =~ m/http/) && ($line =~ m/Reviewed-on:/)) ||
+ ($line =~ "Resolves") )
{
# We allow lines that look like tags in the topic like...
# "FOO: Adding support for BAR."
@@ -348,10 +364,10 @@ sub verifyCommitMsg
}
# Warn for missing RTC tag.
- if (("" eq $rtcTag) && ("" eq $cqTag))
+ if (("" eq $rtcTag) && ("" eq $cqTag) && ("" eq $githubTag))
{
warning("Commit Message","<end-of-file>",$lineCount,
- "Neither RTC nor CQ tag found.");
+ "Neither RTC nor CQ nor Github tag found.");
}
# Error for missing Change-Id.
OpenPOWER on IntegriCloud