From fe1bad80ebe9e92db3755440dff78afe346b5bc0 Mon Sep 17 00:00:00 2001 From: Fabian <97912636+fziegner@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:19:21 +0100 Subject: [PATCH] changed linting message creation to updating exisiting comment --- .github/workflows/pylint.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index dca11561..bf25d384 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -64,15 +64,23 @@ jobs: echo "$EOF" >> "$GITHUB_OUTPUT" id: pr_score + - name: Find Comment + uses: peter-evans/find-comment@v2 + id: comment + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: Linting results by Pylint + - name: Post result to PR - uses: mshick/add-pr-comment@v1 + uses: peter-evans/create-or-update-comment@v3 with: - message: | + issue-number: ${{ github.event.pull_request.number }} + comment-id: ${{ steps.comment.outputs.comment-id }} + edit-mode: replace + body: | Linting results by Pylint: -------------------------- ${{ steps.pr_score.outputs.MESSAGE }} - The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the ${{ steps.branch_name.outputs.RC_BRANCH }} branch. + The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the ${{ github.base_ref }} branch. A decrease usually indicates your new code does not fully meet style guidelines or has potential errors. - repo-token: ${{ secrets.GITHUB_TOKEN }} - repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub token - allow-repeats: false # This is the default