diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 4d9e90f83f..37b2ccd25f 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -84,7 +84,7 @@ jobs: cd doc-builder if [[ `git status --porcelain` ]]; then 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 else echo "No diff in the documentation." @@ -94,7 +94,7 @@ jobs: cd notebooks if [[ `git status --porcelain` ]]; then 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 else echo "No diff in the notebooks." diff --git a/utils/update_metadata.py b/utils/update_metadata.py index 9d209d41eb..945740f02a 100644 --- a/utils/update_metadata.py +++ b/utils/update_metadata.py @@ -221,7 +221,13 @@ def update_metadata(token, commit_sha): if repo.is_repo_clean(): print("Nothing to commit!") 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)