From 7d3e8b8679049d72b260f555acd2cc05e315db3d Mon Sep 17 00:00:00 2001 From: Lysandre Date: Wed, 9 Mar 2022 10:12:19 +0100 Subject: [PATCH 1/2] Add issue number --- .github/workflows/build_dev_documentation.yml | 35 ++++++++++--------- .../workflows/delete_dev_documentation.yml | 35 ++++++++++--------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_dev_documentation.yml b/.github/workflows/build_dev_documentation.yml index 43b7ae15c003..2ccff495c984 100644 --- a/.github/workflows/build_dev_documentation.yml +++ b/.github/workflows/build_dev_documentation.yml @@ -74,23 +74,24 @@ jobs: message: 'The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_${{ env.PR_NUMBER }}). All of your documentation changes will be reflected on that endpoint.' GITHUB_TOKEN: ${{ env.WRITE }} -# - name: Find Comment -# if: github.event.action == 'reopened' -# uses: peter-evans/find-comment@v1 -# id: fc -# with: -# issue-number: ${{ env.PR_NUMBER }} -# comment-author: HuggingFaceDocBuilder - -# - name: Update comment -# if: github.event.action == 'reopened' -# uses: peter-evans/create-or-update-comment@v1 -# with: -# comment-id: ${{ steps.fc.outputs.comment-id }} -# token: ${{ env.WRITE }} -# edit-mode: replace -# body: | -# The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_${{ env.PR_NUMBER }}). All of your documentation changes will be reflected on that endpoint. + - name: Find Comment + if: github.event.action == 'reopened' + uses: peter-evans/find-comment@v1 + id: fc + with: + issue-number: ${{ env.PR_NUMBER }} + comment-author: HuggingFaceDocBuilder + + - name: Update comment + if: github.event.action == 'reopened' + uses: peter-evans/create-or-update-comment@v1 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ env.PR_NUMBER }} + token: ${{ env.WRITE }} + edit-mode: replace + body: | + The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_${{ env.PR_NUMBER }}). All of your documentation changes will be reflected on that endpoint. - name: Make documentation env: diff --git a/.github/workflows/delete_dev_documentation.yml b/.github/workflows/delete_dev_documentation.yml index 98f2fb41db5c..a235f49686f7 100644 --- a/.github/workflows/delete_dev_documentation.yml +++ b/.github/workflows/delete_dev_documentation.yml @@ -44,20 +44,21 @@ jobs: fi shell: bash -# - name: Find Comment -# if: ${{ always() }} -# uses: peter-evans/find-comment@v1 -# id: fc -# with: -# issue-number: ${{ env.PR_NUMBER }} -# comment-author: HuggingFaceDocBuilder - -# - name: Update comment -# if: ${{ always() }} -# uses: peter-evans/create-or-update-comment@v1 -# with: -# comment-id: ${{ steps.fc.outputs.comment-id }} -# token: ${{ env.WRITE }} -# edit-mode: replace -# body: | -# _The documentation is not available anymore as the PR was closed or merged._ + - name: Find Comment + if: ${{ always() }} + uses: peter-evans/find-comment@v1 + id: fc + with: + issue-number: ${{ env.PR_NUMBER }} + comment-author: HuggingFaceDocBuilder + + - name: Update comment + if: ${{ always() }} + uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ env.PR_NUMBER }} + comment-id: ${{ steps.fc.outputs.comment-id }} + token: ${{ env.WRITE }} + edit-mode: replace + body: | + _The documentation is not available anymore as the PR was closed or merged._ From 9ac96d762bb47ed34f2537daa7ef9d60d4b3bd87 Mon Sep 17 00:00:00 2001 From: Lysandre Date: Wed, 9 Mar 2022 10:55:04 +0100 Subject: [PATCH 2/2] Dev --- .github/workflows/build_dev_documentation.yml | 3 +-- .github/workflows/delete_dev_documentation.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_dev_documentation.yml b/.github/workflows/build_dev_documentation.yml index 2ccff495c984..1617750486c0 100644 --- a/.github/workflows/build_dev_documentation.yml +++ b/.github/workflows/build_dev_documentation.yml @@ -80,14 +80,13 @@ jobs: id: fc with: issue-number: ${{ env.PR_NUMBER }} - comment-author: HuggingFaceDocBuilder + comment-author: HuggingFaceDocBuilderDev - name: Update comment if: github.event.action == 'reopened' uses: peter-evans/create-or-update-comment@v1 with: comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ env.PR_NUMBER }} token: ${{ env.WRITE }} edit-mode: replace body: | diff --git a/.github/workflows/delete_dev_documentation.yml b/.github/workflows/delete_dev_documentation.yml index a235f49686f7..61da3c32856d 100644 --- a/.github/workflows/delete_dev_documentation.yml +++ b/.github/workflows/delete_dev_documentation.yml @@ -50,13 +50,12 @@ jobs: id: fc with: issue-number: ${{ env.PR_NUMBER }} - comment-author: HuggingFaceDocBuilder + comment-author: HuggingFaceDocBuilderDev - name: Update comment if: ${{ always() }} uses: peter-evans/create-or-update-comment@v1 with: - issue-number: ${{ env.PR_NUMBER }} comment-id: ${{ steps.fc.outputs.comment-id }} token: ${{ env.WRITE }} edit-mode: replace