e3c68b
From 1f03327887645be2500cd29f69f7a77a4f5d0164 Mon Sep 17 00:00:00 2001
e3c68b
From: Rinku Kothiya <rkothiya@redhat.com>
e3c68b
Date: Mon, 18 Nov 2019 14:25:12 -0500
e3c68b
Subject: [PATCH 318/335] Update rfc.sh to rhgs-3.5.1
e3c68b
e3c68b
Removed the checks for updates and fixes from rfc.sh
e3c68b
e3c68b
Label: DOWNSTREAM ONLY
e3c68b
e3c68b
Change-Id: I436c959aa3b3366cd313b29f41c2466c4072efd7
e3c68b
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
e3c68b
---
e3c68b
 rfc.sh | 47 ++++++++---------------------------------------
e3c68b
 1 file changed, 8 insertions(+), 39 deletions(-)
e3c68b
e3c68b
diff --git a/rfc.sh b/rfc.sh
e3c68b
index 69ddd2b..918fb11 100755
e3c68b
--- a/rfc.sh
e3c68b
+++ b/rfc.sh
e3c68b
@@ -129,13 +129,8 @@ editor_mode()
e3c68b
 
e3c68b
     if [ $(basename "$1") = "COMMIT_EDITMSG" ]; then
e3c68b
         # see note above function warn_reference_missing for regex elaboration
e3c68b
-        # Lets first check for github issues
e3c68b
-        ref=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+(gluster\/glusterfs)?#[[:digit:]]+" | awk -F '#' '{print $2}');
e3c68b
-        if [ "x${ref}" = "x" ]; then
e3c68b
-            # if not found, check for bugs
e3c68b
-            ref=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+bz#[[:digit:]]+" | awk -F '#' '{print $2}');
e3c68b
-        fi
e3c68b
 
e3c68b
+        ref=$(git log -n1 --format='%b' | grep -ow -E "^[bB][uU][gG](:)[[:space:]]+[[:digit:]]+")
e3c68b
         if [ "x${ref}" != "x" ]; then
e3c68b
             return;
e3c68b
         fi
e3c68b
@@ -157,16 +152,6 @@ editor_mode()
e3c68b
                 bz_string=""
e3c68b
             fi
e3c68b
 
e3c68b
-            echo "Select yes '(y)' if this patch fixes the bug/feature completely,"
e3c68b
-            echo -n "or is the last of the patchset which brings feature (Y/n): "
e3c68b
-            read fixes
e3c68b
-            fixes_string="fixes"
e3c68b
-            if [ "${fixes}" = 'N' ] || [ "${fixes}" = 'n' ]; then
e3c68b
-                fixes_string="updates"
e3c68b
-            fi
e3c68b
-
e3c68b
-            sed "/^Change-Id:/{p; s/^.*$/${fixes_string}: ${bz_string}#${bug}/;}" $1 > $1.new && \
e3c68b
-                mv $1.new $1;
e3c68b
             return;
e3c68b
         done
e3c68b
     fi
e3c68b
@@ -234,8 +219,8 @@ check_patches_for_coding_style()
e3c68b
 #   IOW, the above helps us find the pattern with leading or training spaces
e3c68b
 #   or non word consituents like , or ;
e3c68b
 #
e3c68b
-#   [fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])
e3c68b
-#      Finds 'fixes' OR 'updates' in any case combination
e3c68b
+#   [bB][uU][gG]
e3c68b
+#      Finds 'bug' in any case
e3c68b
 #
e3c68b
 #   (:)?
e3c68b
 #      Followed by an optional : (colon)
e3c68b
@@ -256,28 +241,11 @@ warn_reference_missing()
e3c68b
     echo ""
e3c68b
     echo "=== Missing a reference in commit! ==="
e3c68b
     echo ""
e3c68b
-    echo "Gluster commits are made with a reference to a bug or a github issue"
e3c68b
-    echo ""
e3c68b
-    echo "Submissions that are enhancements (IOW, not functional"
e3c68b
-    echo "bug fixes, but improvements of any nature to the code) are tracked"
e3c68b
-    echo "using github issues [1]."
e3c68b
+    echo "You must give BUG: <bugid>"
e3c68b
     echo ""
e3c68b
-    echo "Submissions that are bug fixes are tracked using Bugzilla [2]."
e3c68b
+    echo "for example:"
e3c68b
     echo ""
e3c68b
-    echo "A check on the commit message, reveals that there is no bug or"
e3c68b
-    echo "github issue referenced in the commit message"
e3c68b
-    echo ""
e3c68b
-    echo "[1] https://github.com/gluster/glusterfs/issues/new"
e3c68b
-    echo "[2] https://bugzilla.redhat.com/enter_bug.cgi?product=GlusterFS"
e3c68b
-    echo ""
e3c68b
-    echo "Please file an issue or a bug report and reference the same in the"
e3c68b
-    echo "commit message using the following tags:"
e3c68b
-    echo "GitHub Issues:"
e3c68b
-    echo "\"Fixes: gluster/glusterfs#n\" OR \"Updates: gluster/glusterfs#n\","
e3c68b
-    echo "\"Fixes: #n\" OR \"Updates: #n\","
e3c68b
-    echo "Bugzilla ID:"
e3c68b
-    echo "\"Fixes: bz#n\" OR \"Updates: bz#n\","
e3c68b
-    echo "where n is the issue or bug number"
e3c68b
+    echo "BUG: 1234567"
e3c68b
     echo ""
e3c68b
     echo "You may abort the submission choosing 'N' below and use"
e3c68b
     echo "'git commit --amend' to add the issue reference before posting"
e3c68b
@@ -312,7 +280,7 @@ main()
e3c68b
     assert_diverge;
e3c68b
 
e3c68b
     # see note above function warn_reference_missing for regex elaboration
e3c68b
-    reference=$(git log -n1 --format='%b' | grep -ow -E "([fF][iI][xX][eE][sS]|[uU][pP][dD][aA][tT][eE][sS])(:)?[[:space:]]+(gluster\/glusterfs)?(bz)?#[[:digit:]]+" | awk -F '#' '{print $2}');
e3c68b
+    reference=$(git log -n1 --format='%b' | grep -ow -E "^[bB][uU][gG](:)[[:space:]]+[[:digit:]]+" | awk  '{print $2}')
e3c68b
 
e3c68b
     # If this is a commit against master and does not have a bug ID or a github
e3c68b
     # issue reference. Warn the contributor that one of the 2 is required
e3c68b
@@ -320,6 +288,7 @@ main()
e3c68b
         warn_reference_missing;
e3c68b
     fi
e3c68b
 
e3c68b
+
e3c68b
     # TODO: add clang-format command here. It will after the changes are done everywhere else
e3c68b
     clang_format=$(clang-format --version)
e3c68b
     if [ ! -z "${clang_format}" ]; then
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b