summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Stefani <luca.stefani.ge1@gmail.com>2018-04-14 23:11:02 +0200
committerLuca Stefani <luca.stefani.ge1@gmail.com>2018-04-14 23:21:12 +0200
commit550d796aeeffdc57aebf02ae155e237de74ec660 (patch)
tree743c56a1dc2c0e33537e236f1566bf1c38695c5a
parent422d2a66b5b0804b67132c5ab64ee4183d2e3ab0 (diff)
downloadscripts-550d796aeeffdc57aebf02ae155e237de74ec660.tar.gz
scripts-550d796aeeffdc57aebf02ae155e237de74ec660.tar.bz2
scripts-550d796aeeffdc57aebf02ae155e237de74ec660.zip
lineage-push: Add hashtag support
Change-Id: I5bb4ccc8922a94fa3f3336268da5c81ee215bef2
-rw-r--r--lineage-push/README.md3
-rwxr-xr-xlineage-push/lineage-push.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/lineage-push/README.md b/lineage-push/README.md
index f0a88aa..38f7bdc 100644
--- a/lineage-push/README.md
+++ b/lineage-push/README.md
@@ -1,7 +1,7 @@
# LineageOS Push Script
```
-usage: lineage-push.py [-h] [-b] [-d] [-e] [-f] [-l LABEL] [-m [MESSAGE]]
+usage: lineage-push.py [-h] [-a] [-b] [-d] [-e] [-f] [-l LABEL] [-m [MESSAGE]]
[-p [PRIVATE]] [-r REF] [-s] [-t TOPIC] [-w [WIP]]
branch
@@ -12,6 +12,7 @@ positional arguments:
optional arguments:
-h, --help show this help message and exit
+ -a, --hashtag add hashtag to change
-b, --bypass bypass review and merge
-d, --draft upload change as draft
-e, --edit upload change as edit
diff --git a/lineage-push/lineage-push.py b/lineage-push/lineage-push.py
index 0635116..68ba4e8 100755
--- a/lineage-push/lineage-push.py
+++ b/lineage-push/lineage-push.py
@@ -52,6 +52,9 @@ def push(args):
if args.topic:
command += '%topic={}'.format(args.topic)
+ if args.hashtag:
+ command += '%hashtag={}'.format(args.hashtag)
+
if args.submit:
command += '%submit'
@@ -84,6 +87,8 @@ def parse_cmdline():
parser = ArgumentParser(
description='Pushes a local git repository\'s changes to Gerrit for code review')
parser.add_argument('branch', help='upload change to branch')
+ parser.add_argument('-a', '--hashtag', action='store_true',
+ help='add hashtag to change')
parser.add_argument('-b', '--bypass', action='store_true',
help='bypass review and merge')
parser.add_argument('-d', '--draft', action='store_true',