|
@@ -58,15 +58,13 @@ def quit_diffing():
|
|
|
|
|
|
curr_branch = ""
|
|
|
is_PR = (os.getenv("PR_NUMBER") != "")
|
|
|
-# BRANCH_NAME is the the name of the branch
|
|
|
-is_master = os.getenv("BRANCH_NAME") == "master"
|
|
|
previous_commit = os.getenv("PREVIOUS_COMMIT")
|
|
|
|
|
|
if is_PR:
|
|
|
curr_branch = "HEAD"
|
|
|
# Also fetch master to compare against
|
|
|
subprocess.check_output(['bash', '-c', 'git fetch origin master:master'])
|
|
|
-elif not is_master:
|
|
|
+else:
|
|
|
curr_branch = os.getenv("GITHUB_SHA")
|
|
|
|
|
|
diff_target = "master" if is_PR else previous_commit
|