瀏覽代碼

Fix CI issue (#6274)

* Slightly change github_actions_diff.py (to trigger CI)

* Always fetch master for PRs during CI
Albert Johnston 4 年之前
父節點
當前提交
6386132d37
共有 1 個文件被更改,包括 2 次插入4 次删除
  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(