From 8155d1d59589b9e8a09f730976c5f0e9245a15fa Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Mon, 10 Jun 2024 09:44:30 -0400 Subject: [PATCH 1/2] Update jscpd.yml --- .github/workflows/jscpd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jscpd.yml b/.github/workflows/jscpd.yml index 51b7a7c6123..c2e7ddd7317 100644 --- a/.github/workflows/jscpd.yml +++ b/.github/workflows/jscpd.yml @@ -90,6 +90,7 @@ jobs: if: env.filtered_report_exists == 'true' uses: actions/github-script@v7 with: + github-token: ${{ secrets.PAT_TOKEN }} script: | const fs = require('fs'); const filteredReport = JSON.parse(fs.readFileSync('filtered-jscpd-report.json', 'utf8')); From 42ebe1d5ca87ee4e239e44f6831fc42c79d5e810 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Mon, 10 Jun 2024 09:46:18 -0400 Subject: [PATCH 2/2] Update jscpd.yml --- .github/workflows/jscpd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jscpd.yml b/.github/workflows/jscpd.yml index c2e7ddd7317..ab3eeebc81d 100644 --- a/.github/workflows/jscpd.yml +++ b/.github/workflows/jscpd.yml @@ -101,7 +101,7 @@ jobs: const lines = duplication.lines; comment += `- \`${firstFile}\` has ${lines} duplicated lines with \`${secondFile}\`\n`; }); - comment += "\nReducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Keep up the great work! 🚀"; + comment += "\nReducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. Keep up the great work! 🚀"; github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo,