def get_commits():
- target_branch = os.getenv('ghprbTargetBranch', 'origin/master')
+ target_branch = os.getenv('ghprbTargetBranch', 'master')
# we use 'HEAD' here because the PR is already checked out on the right branch
source_branch = 'HEAD'
- command = ['git', 'log', '--no-merges', '%s..%s' % (target_branch, source_branch)]
+ command = ['git', 'log', '--no-merges', 'origin/%s..%s' % (target_branch, source_branch)]
output = run(command)
chunked_commits = []
for chunk in output.split('\n\ncommit'):