plugin uri finder, jp (merge-request): labels handling:

- a label can now be specified as metadata after specifing a "xmpp:" URI in doc (with « use "[label]" label" » after the URI)
- updated jp to handle new signature of URIFind
- jp (merge-request/set): labels can now be specified using --label
This commit is contained in:
Goffi 2018-04-01 20:17:00 +02:00
commit e4c56da671

View file

@ -41,6 +41,7 @@ class Set(base.CommandBase):
self.parser.add_argument("-i", "--item", type=base.unicode_decoder, default=u'', help=_(u"id or URL of the request to update, or nothing for a new one"))
self.parser.add_argument("-r", "--repository", metavar="PATH", type=base.unicode_decoder, default=u'.', help=_(u"path of the repository (DEFAULT: current directory)"))
self.parser.add_argument("-f", "--force", action="store_true", help=_(u"publish merge request without confirmation"))
self.parser.add_argument("-l", "--label", dest="labels", type=base.unicode_decoder, action='append', help=_(u"labels to categorize your request"))
def mergeRequestSetCb(self, published_id):
if published_id:
@ -51,12 +52,15 @@ class Set(base.CommandBase):
def sendRequest(self):
extra = {'update': 'true'} if self.args.item else {}
values = {}
if self.args.labels is not None:
values[u'labels'] = self.args.labels
self.host.bridge.mergeRequestSet(
self.args.service,
self.args.node,
self.repository,
u'auto',
{},
values,
u'',
self.args.item,
extra,