From 534ecd312598382438c0bd03e235269f07937294 Mon Sep 17 00:00:00 2001 From: David Feng Date: Fri, 27 Sep 2024 13:35:28 -0400 Subject: [PATCH] add yaml --- .github/workflows/dismiss-stale-reviews.yaml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/dismiss-stale-reviews.yaml diff --git a/.github/workflows/dismiss-stale-reviews.yaml b/.github/workflows/dismiss-stale-reviews.yaml new file mode 100644 index 0000000000000..0c40c364efa89 --- /dev/null +++ b/.github/workflows/dismiss-stale-reviews.yaml @@ -0,0 +1,28 @@ +name: 'dismiss-stale-reviews' +on: + pull_request: + +jobs: + dismiss-stale-reviews: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # the git history must be fetched until merge-base commit of pull-request + fetch-depth: 0 + + # in case you use team handles in your CODEOWNERS file, you need to get a GitHub App token with advanced permissions: + repository contents: read + repository pull requests: write + organization members: read + # + # for more info on how to use GitHub App token check https://github.com/actions/create-github-app-token + - uses: actions/create-github-app-token@v1 + id: get-token + with: + private-key: ${{ secrets.MANAGE_REVIEWS_BOT_PEM }} + app-id: ${{ vars.MANAGE_REVIEWS_BOT_ID }} + + - uses: balvajs/dismiss-stale-reviews@v3 + with: + token: ${{ steps.get-token.outputs.token }}