parent
1346b7fb63
commit
8c78d967f8
1 changed files with 4 additions and 2 deletions
|
@ -358,10 +358,13 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||
[{'kind': 'tag', 'name': tag} for tag in tags])
|
||||
|
||||
config = self.config
|
||||
source = config.get('build_source')
|
||||
if source is None:
|
||||
return []
|
||||
|
||||
if field_name == 'tag_name':
|
||||
try:
|
||||
gh_client = self._get_client()
|
||||
source = config['build_source']
|
||||
repo = gh_client.get_repo(source)
|
||||
gh_tags = repo.get_tags()
|
||||
if limit:
|
||||
|
@ -378,7 +381,6 @@ class GithubBuildTrigger(BuildTriggerHandler):
|
|||
if field_name == 'branch_name':
|
||||
try:
|
||||
gh_client = self._get_client()
|
||||
source = config['build_source']
|
||||
repo = gh_client.get_repo(source)
|
||||
gh_branches = repo.get_branches()
|
||||
if limit:
|
||||
|
|
Reference in a new issue