Add --web and --tools to support other repo's.
authorRich Salz <rsalz@akamai.com>
Wed, 23 May 2018 15:44:44 +0000 (11:44 -0400)
committerRich Salz <rsalz@akamai.com>
Thu, 24 May 2018 00:12:11 +0000 (20:12 -0400)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/tools/pull/1t)

review-tools/addrev
review-tools/gitaddrev

index 0bd28a51b68a5d9b837aa5b2d822b7462e4219c2..ce770f3b5437ac8ff1088db482f09cbac24c7ec3 100755 (executable)
@@ -22,6 +22,10 @@ foreach (@ARGV) {
         $args .= "--rmreviewers ";
     } elsif (/^--trivial$/) {
         $args .= "--trivial ";
+    } elsif (/^--web$/) {
+        $args .= "--web ";
+    } elsif (/^--tools$/) {
+        $args .= "--tools ";
     } elsif (/^--verbose$/) {
         $args .= "--verbose ";
     } elsif (/^--noself$/) {
index 2beb48a67491441214385dd78b82f088fb348e98..cf041d4bd78710520c4c15dab3c4bb4a1a49aa0b 100755 (executable)
@@ -21,6 +21,7 @@ my $num = 0;
 my $refuse = 0;
 my $prnum = 0;
 my $verbose = 0;
+my $WHAT = 'openssl';
 
 my $query = OpenSSL::Query->new();
 
@@ -99,6 +100,10 @@ foreach (@ARGV) {
        try_add_reviewer($1);
     } elsif (/^--verbose$/) {
        $verbose = 1;
+    } elsif (/^--web$/) {
+        $WHAT = 'web';
+    } elsif (/--tools$/) {
+        $WHAT = 'tools'
     }
 }
 
@@ -189,7 +194,7 @@ my $last_is_rev = 0;
 foreach (@commit_message) {
     # Start each line with assuming it's not a reviewed-by line
     $last_is_rev = 0;
-    if (/^\(Merged from https:\/\/github\.com\/openssl\/openssl\/pull\//) {
+    if (/^\(Merged from https:\/\/github\.com\/openssl\/$WHAT\/pull\//) {
         next if $rmrev == 1;
         $last_is_rev = 1;
         next;                  # Because we're rewriting it below
@@ -211,5 +216,5 @@ if ($rmrev == 0) {
     }
 }
 
-print "(Merged from https://github.com/openssl/openssl/pull/$prnum)\n"
+print "(Merged from https://github.com/openssl/$WHAT/pull/$prnum)\n"
     if $prnum;