diff options
author | Mike Frysinger <vapier@google.com> | 2020-02-19 02:22:22 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2020-02-19 08:31:18 +0000 |
commit | 84685ba1875db265051cdd043d5dba768c7c42e5 (patch) | |
tree | 426cb29f23da77aac700bce1c08cba935d6f96aa /project.py | |
parent | 72ebf19e52e7c4b270e40ba07fec1048b3612797 (diff) | |
download | git-repo-84685ba1875db265051cdd043d5dba768c7c42e5.tar.gz |
upload: add support for setting hashtags
This allows users to specify custom hashtags when uploading, both via
the CLI and via the same gitconfig settings as other upload options.
Bug: https://crbug.com/gerrit/11174
Change-Id: Ia0959e25b463e5f29d704e4d06e0de793d4fc77c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255855
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -199,6 +199,7 @@ class ReviewableBranch(object): | |||
199 | 199 | ||
200 | def UploadForReview(self, people, | 200 | def UploadForReview(self, people, |
201 | auto_topic=False, | 201 | auto_topic=False, |
202 | hashtags=(), | ||
202 | draft=False, | 203 | draft=False, |
203 | private=False, | 204 | private=False, |
204 | notify=None, | 205 | notify=None, |
@@ -209,6 +210,7 @@ class ReviewableBranch(object): | |||
209 | self.project.UploadForReview(self.name, | 210 | self.project.UploadForReview(self.name, |
210 | people, | 211 | people, |
211 | auto_topic=auto_topic, | 212 | auto_topic=auto_topic, |
213 | hashtags=hashtags, | ||
212 | draft=draft, | 214 | draft=draft, |
213 | private=private, | 215 | private=private, |
214 | notify=notify, | 216 | notify=notify, |
@@ -1331,6 +1333,7 @@ class Project(object): | |||
1331 | def UploadForReview(self, branch=None, | 1333 | def UploadForReview(self, branch=None, |
1332 | people=([], []), | 1334 | people=([], []), |
1333 | auto_topic=False, | 1335 | auto_topic=False, |
1336 | hashtags=(), | ||
1334 | draft=False, | 1337 | draft=False, |
1335 | private=False, | 1338 | private=False, |
1336 | notify=None, | 1339 | notify=None, |
@@ -1388,6 +1391,7 @@ class Project(object): | |||
1388 | opts = [] | 1391 | opts = [] |
1389 | if auto_topic: | 1392 | if auto_topic: |
1390 | opts += ['topic=' + branch.name] | 1393 | opts += ['topic=' + branch.name] |
1394 | opts += ['t=%s' % p for p in hashtags] | ||
1391 | 1395 | ||
1392 | opts += ['r=%s' % p for p in people[0]] | 1396 | opts += ['r=%s' % p for p in people[0]] |
1393 | opts += ['cc=%s' % p for p in people[1]] | 1397 | opts += ['cc=%s' % p for p in people[1]] |