Reactive test fecthers on scheduled test with proper git install (#13097)

* Reactive test fecthers on scheduled test with proper git install

* Proper fetch-depth
This commit is contained in:
Sylvain Gugger
2021-08-12 11:38:14 +02:00
committed by GitHub
parent ea8ffe36d3
commit be323d5152
2 changed files with 78 additions and 80 deletions

View File

@@ -445,7 +445,7 @@ if __name__ == "__main__":
repo = Repo(PATH_TO_TRANFORMERS)
diff_with_last_commit = args.diff_with_last_commit
if not repo.head.is_detached and repo.head.ref == repo.refs.master:
if not diff_with_last_commit and not repo.head.is_detached and repo.head.ref == repo.refs.master:
print("Master branch detected, fetching tests against last commit.")
diff_with_last_commit = True