From ba8c2932710ce05d84a767784da31f215ca4e8ff Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 02:56:27 +0800 Subject: [PATCH 1/5] Comment failure action. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2295e5e4..67afc343 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,12 @@ jobs: - run: mkdocs build --strict - run: npm install - run: node .github/manual_lint.js + - name: Comment + if: always() + uses: thollander/actions-comment-pull-request@v1 + with: + message: '只有通过自动化检查的合并请求才会被人工审批,请确保此 Pull Request 能够通过自动化检查!' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: quipper/comment-failure-action@v0.1.1 # Suppress 036 Emphasis used instead of a header # Suppress 024 Multiple headers with the same content From 04e7fed0ea1ec441b26413357d7f368a9797afe6 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 02:59:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3comment=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67afc343..72c29788 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ jobs: markdown-lint: runs-on: ubuntu-latest steps: + - name: Comment + uses: thollander/actions-comment-pull-request@v1 + with: + message: '正在运行自动化检查... \n\n**只有通过自动化检查的合并请求才会被人工审批,请确保此 Pull Request 能够通过自动化检查!**' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: @@ -21,12 +26,8 @@ jobs: - run: mkdocs build --strict - run: npm install - run: node .github/manual_lint.js - - name: Comment + - name: Comment failure message if: always() - uses: thollander/actions-comment-pull-request@v1 - with: - message: '只有通过自动化检查的合并请求才会被人工审批,请确保此 Pull Request 能够通过自动化检查!' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: quipper/comment-failure-action@v0.1.1 + uses: quipper/comment-failure-action@v0.1.1 # Suppress 036 Emphasis used instead of a header # Suppress 024 Multiple headers with the same content From d6c3417f363ccf58d24783f71e71bec499359e58 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 03:04:57 +0800 Subject: [PATCH 3/5] Fix comment. --- .github/workflows/ci.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72c29788..4c4549d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,6 @@ jobs: markdown-lint: runs-on: ubuntu-latest steps: - - name: Comment - uses: thollander/actions-comment-pull-request@v1 - with: - message: '正在运行自动化检查... \n\n**只有通过自动化检查的合并请求才会被人工审批,请确保此 Pull Request 能够通过自动化检查!**' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: @@ -26,8 +21,16 @@ jobs: - run: mkdocs build --strict - run: npm install - run: node .github/manual_lint.js - - name: Comment failure message - if: always() - uses: quipper/comment-failure-action@v0.1.1 + - name: Comment + uses: thollander/actions-comment-pull-request@v1 + with: + message: '自动化内容检查通过。 请 @Anduin2017 尽快合并此 Pull Request!**' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Comment + if: failure() + uses: thollander/actions-comment-pull-request@v1 + with: + message: '**不能**合并此 Pull Request,因为它未能通过自动化检查!请**确保**内容符合规范!' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Suppress 036 Emphasis used instead of a header # Suppress 024 Multiple headers with the same content From b64cbc5815d5ada02b7f3a97c532f5f37286f2f3 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 03:05:58 +0800 Subject: [PATCH 4/5] More messages. --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c4549d4..335e6dd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ jobs: markdown-lint: runs-on: ubuntu-latest steps: + - name: Comment + uses: thollander/actions-comment-pull-request@v1 + with: + message: '正在运行自动化菜谱内容规范检查……预计需要 1 分钟。' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: From 8de0c58bf01f516ac13f2a001380017a372e7fed Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Mon, 21 Mar 2022 03:13:13 +0800 Subject: [PATCH 5/5] Better CI interaction. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 335e6dd4..52ed8c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: Comment uses: thollander/actions-comment-pull-request@v1 with: - message: '正在运行自动化菜谱内容规范检查……预计需要 1 分钟。' + message: '正在检查您的贡献请求……这预计需要 1 分钟,请稍等……' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -29,13 +29,13 @@ jobs: - name: Comment uses: thollander/actions-comment-pull-request@v1 with: - message: '自动化内容检查通过。 请 @Anduin2017 尽快合并此 Pull Request!**' + message: '内容检查完成,感谢您的贡献! 我们很快就会合并此 Pull Request! @Anduin2017' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Comment if: failure() uses: thollander/actions-comment-pull-request@v1 with: - message: '**不能**合并此 Pull Request,因为它未能通过自动化检查!请**确保**内容符合规范!' + message: '尚**不能继续此 Pull Request!** 其内容不符合规范!请确保内容符合规范后重新提交!' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Suppress 036 Emphasis used instead of a header # Suppress 024 Multiple headers with the same content