From 52bf4e618ce70e255932e83356b611db4c53c89f Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Tue, 28 May 2024 09:09:25 -0700 Subject: [PATCH] Switch the resolve action to push (#3998) https://github.com/Ardiannn08/resolve-outdated-comment documents this as using push. My guess is that's the root of https://github.com/carbon-language/carbon-lang/actions/runs/9259644459/job/25471949664; if this doesn't fix it, we'll probably just need to remove it. --- .github/workflows/pre_commit_resolve.yaml | 24 +++++++++++++++++++ .github/workflows/pre_commit_suggestions.yaml | 18 +------------- 2 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/pre_commit_resolve.yaml diff --git a/.github/workflows/pre_commit_resolve.yaml b/.github/workflows/pre_commit_resolve.yaml new file mode 100644 index 000000000000..5a819beaa14a --- /dev/null +++ b/.github/workflows/pre_commit_resolve.yaml @@ -0,0 +1,24 @@ +# Part of the Carbon Language project, under the Apache License v2.0 with LLVM +# Exceptions. See /LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +name: 'Delete stale suggestions' + +on: + push: + +jobs: + delete-stale-suggestions: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 + with: + egress-policy: audit + + - name: Delete stale suggestions + uses: Ardiannn08/resolve-outdated-comment@3b3cf4b2651a84fac2d6a94c2aeca9ac7c05ac5f # v1.3 + with: + token: ${{ secrets.CARBON_INFRA_BOT_FOR_REVIEWDOG }} + filter-user: 'CarbonInfraBot' + mode: 'delete' diff --git a/.github/workflows/pre_commit_suggestions.yaml b/.github/workflows/pre_commit_suggestions.yaml index 3aa58c6b957a..bcaa31cb7026 100644 --- a/.github/workflows/pre_commit_suggestions.yaml +++ b/.github/workflows/pre_commit_suggestions.yaml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Create PR suggestions based on problems found by pre-commit action. -name: pre-commit-suggestions +name: 'Add pre-commit suggestions' # This action is run whenever the `pre-commit` action finishes. Because the # `pre-commit` action is an unprivileged action running on (for example) the @@ -60,19 +60,3 @@ jobs: cat ./diff | \ GITHUB_EVENT_PATH=./event \ reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review - - delete-stale-suggestions: - if: github.event.workflow_run.event == 'pull_request' - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 - with: - egress-policy: audit - - - name: Delete stale suggestions - uses: Ardiannn08/resolve-outdated-comment@3b3cf4b2651a84fac2d6a94c2aeca9ac7c05ac5f # v1.3 - with: - token: ${{ secrets.CARBON_INFRA_BOT_FOR_REVIEWDOG }} - filter-user: 'CarbonInfraBot' - mode: 'delete'