From 5242726bb7d473e9f2e81f61be99d1b9749a93a1 Mon Sep 17 00:00:00 2001 From: frank zhu Date: Tue, 19 Mar 2024 12:46:56 -0700 Subject: [PATCH] chore: update changeset workflow comment action and remove readme workflow (#12493) --- .github/workflows/changeset.yml | 16 ++++++++----- .github/workflows/readme.yml | 40 --------------------------------- 2 files changed, 10 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/readme.yml diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 8b881e18d23..897b1581659 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -36,26 +36,30 @@ jobs: - '!core/chainlink.Dockerfile' contracts: - contracts/**/*.sol + - '!contracts/**/*.t.sol' core-changeset: - added: '.changeset/**' contracts-changeset: - added: 'contracts/.changeset/**' - name: Make a comment - uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # v1.3.0 + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - msg: "I see you updated files related to `core`. Please run `pnpm changeset` in the root directory to add a changeset." - check_for_duplicate_msg: true + message: "I see you updated files related to `core`. Please run `pnpm changeset` in the root directory to add a changeset." + reactions: eyes + comment_tag: changeset-core - name: Make a comment - uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # v1.3.0 + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 if: ${{ steps.files-changed.outputs.contracts == 'true' && steps.files-changed.outputs.contracts-changeset == 'false' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - msg: "I see you updated files related to `contracts`. Please run `pnpm changeset` in the `contracts` directory to add a changeset." - check_for_duplicate_msg: true + message: | + I see you updated files related to `contracts`. Please run `pnpm changeset` in the `contracts` directory to add a changeset. + reactions: eyes + comment_tag: changeset-contracts - name: Check for new changeset for core if: ${{ (steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true') && steps.files-changed.outputs.core-changeset == 'false' }} shell: bash diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml deleted file mode 100644 index 54fa3d7e43d..00000000000 --- a/.github/workflows/readme.yml +++ /dev/null @@ -1,40 +0,0 @@ -# -# This action checks PRs to see if any README* files were updated. -# If none were, it will add a message to the PR asking if it would make sense to do so. -# -name: Readme - -on: pull_request - -jobs: - readme: - # For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs. - # This check skips the job if it is detected we are running on a fork. - if: ${{ github.event.pull_request.head.repo.full_name == 'smartcontractkit/chainlink' }} - name: Readme checker - runs-on: ubuntu-latest - steps: - - name: Check for changed files - id: changedfiles - uses: umani/changed-files@d7f842d11479940a6036e3aacc6d35523e6ba978 # Version 4.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pattern: '^(?!.*node_modules).*README\.md$' - - name: Make a comment - uses: unsplash/comment-on-pr@ffe8f97ccc63ce12c3c23c6885b169db67958d3b # Version 1.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: contains(steps.changedfiles.outputs.files_updated, 'README') != true && contains(steps.changedfiles.outputs.files_created, 'README') != true - with: - msg: "I see that you haven't updated any README files. Would it make sense to do so?" - check_for_duplicate_msg: true - - name: Collect Metrics - if: always() - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0 - with: - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Readme checker - continue-on-error: true \ No newline at end of file