From 6fdbb5ebe65eec8c67980954a8c6cab3ae59d46a Mon Sep 17 00:00:00 2001 From: Hamza Tahir Date: Sat, 24 Aug 2024 14:56:37 +0200 Subject: [PATCH] Remove unnecessary PR comment creation on no changes --- .github/workflows/update-tutorials.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/update-tutorials.yml b/.github/workflows/update-tutorials.yml index db371cd30ae..672f57a26d8 100644 --- a/.github/workflows/update-tutorials.yml +++ b/.github/workflows/update-tutorials.yml @@ -105,22 +105,3 @@ jobs: console.error('Error creating comment:', error); core.setFailed(`Failed to create comment: ${error.message}`); } - - - name: Create PR comment on no changes - if: steps.git-check.outputs.changes != 'true' - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: |- - const prNumber = context.payload.pull_request.number; - try { - await github.rest.issues.createComment({ - issue_number: prNumber, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'No changes were detected in the tutorials content. All files are up to date.' - }); - } catch (error) { - console.error('Error creating comment:', error); - core.setFailed(`Failed to create comment: ${error.message}`); - } \ No newline at end of file