forked from openlp/openlp
attempt to fix detection
This commit is contained in:
parent
6e3b02fb05
commit
eb27eead4c
@ -40,6 +40,7 @@ You can look up the token in the Branch-01-Pull job configuration or ask in IRC.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
import re
|
||||||
from requests.exceptions import HTTPError
|
from requests.exceptions import HTTPError
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
import sys
|
import sys
|
||||||
@ -137,6 +138,13 @@ def get_repo_name():
|
|||||||
# Determine the branch's name
|
# Determine the branch's name
|
||||||
repo_name = ''
|
repo_name = ''
|
||||||
for line in output_list:
|
for line in output_list:
|
||||||
|
# Check if it is remote branch.
|
||||||
|
if 'push branch' in line:
|
||||||
|
match = re.match(REPO_REGEX, line)
|
||||||
|
if match:
|
||||||
|
repo_name = 'lp:%s' % match.group(2)
|
||||||
|
break
|
||||||
|
elif 'checkout of branch' in line:
|
||||||
match = re.match(REPO_REGEX, line)
|
match = re.match(REPO_REGEX, line)
|
||||||
if match:
|
if match:
|
||||||
repo_name = 'lp:%s' % match.group(2)
|
repo_name = 'lp:%s' % match.group(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user