1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix Shippable BASE_BRANCH lookup on merges.

This commit is contained in:
Matt Clay 2017-05-19 01:51:24 +08:00
parent c4a7f64c02
commit 53180ebb57

View file

@ -40,7 +40,6 @@ from lib.util import (
ApplicationWarning,
ApplicationError,
SubprocessError,
MissingEnvironmentVariable,
display,
run_command,
common_environment,
@ -1289,10 +1288,7 @@ class SanityConfig(TestConfig):
if args.base_branch:
self.base_branch = args.base_branch # str
elif is_shippable():
try:
self.base_branch = os.environ['BASE_BRANCH'] # str
except KeyError as ex:
raise MissingEnvironmentVariable(name=ex.args[0])
self.base_branch = os.environ.get('BASE_BRANCH', '') # str
if self.base_branch:
self.base_branch = 'origin/%s' % self.base_branch