Browse Source

Fix CI issue (#6274)

* Slightly change github_actions_diff.py (to trigger CI)

* Always fetch master for PRs during CI
Albert Johnston 4 years ago
parent
commit
6386132d37
1 changed files with 2 additions and 4 deletions
  1. 2 4
      toolset/github_actions/github_actions_diff.py

+ 2 - 4
toolset/github_actions/github_actions_diff.py

@@ -63,12 +63,10 @@ is_master = os.getenv("BRANCH_NAME") == "master"
 
 if is_PR:
     curr_branch = "HEAD"
-elif not is_master:
-    curr_branch = os.getenv("GITHUB_SHA")
-
-if not is_master:
     # Also fetch master to compare against
     subprocess.check_output(['bash', '-c', 'git fetch origin master:master'])
+elif not is_master:
+    curr_branch = os.getenv("GITHUB_SHA")
 
 # https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github
 changes = clean_output(