"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "1484d67de9f4c8301874d62d821bbfbd3d6ce99b"
Unverified Commit c075fb78 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Replace commit sha by commit url for update jobs (#14852)



* Replace commit sha by commit url for update jobs

* Typo

* Update .github/workflows/build_documentation.yml
Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>

* Apply review comments
Co-authored-by: default avatarJulien Chaumond <julien@huggingface.co>
parent 5722d058
...@@ -84,7 +84,7 @@ jobs: ...@@ -84,7 +84,7 @@ jobs:
cd doc-builder cd doc-builder
if [[ `git status --porcelain` ]]; then if [[ `git status --porcelain` ]]; then
git add build git add build
git commit -m "Updated with commit ${{ github.sha }}" git commit -m "Updated with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}"
git push origin main git push origin main
else else
echo "No diff in the documentation." echo "No diff in the documentation."
...@@ -94,7 +94,7 @@ jobs: ...@@ -94,7 +94,7 @@ jobs:
cd notebooks cd notebooks
if [[ `git status --porcelain` ]]; then if [[ `git status --porcelain` ]]; then
git add transformers_doc git add transformers_doc
git commit -m "Updated Transformer doc notebooks with commit ${{ github.sha }}" git commit -m "Updated Transformer doc notebooks with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}"
git push origin master git push origin master
else else
echo "No diff in the notebooks." echo "No diff in the notebooks."
......
...@@ -221,7 +221,13 @@ def update_metadata(token, commit_sha): ...@@ -221,7 +221,13 @@ def update_metadata(token, commit_sha):
if repo.is_repo_clean(): if repo.is_repo_clean():
print("Nothing to commit!") print("Nothing to commit!")
else: else:
commit_message = f"Update with commit {commit_sha}" if commit_sha is not None else "Update" if commit_sha is not None:
commit_message = (
f"Update with commit {commit_sha}\n\nSee: "
f"https://github.com/huggingface/transformers/commit/{commit_sha}"
)
else:
commit_message = "Update"
repo.push_to_hub(commit_message) repo.push_to_hub(commit_message)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment