From d97334b69bca477698084fa92fe1ac940028d718 Mon Sep 17 00:00:00 2001 From: Michael Haken Date: Mon, 16 Dec 2024 22:26:30 -0500 Subject: [PATCH] chore: update workflow --- .github/workflows/auto-approve.yml | 2 +- .mergify.yml | 4 ++-- .projenrc.ts | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index 24fc600..dd6847c 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write - if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'cdklabs-automation' || github.event.pull_request.user.login == 'hakenmt' || github.event.pull_request.user.login == 'dependabot[bot]') + if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'cdklabs-automation' || github.event.pull_request.user.login == 'hakenmt' || github.event.pull_request.user.login == 'github-bot' || github.event.pull_request.user.login == 'dependabot[bot]') steps: - uses: hmarr/auto-approve-action@v2.2.1 with: diff --git a/.mergify.yml b/.mergify.yml index a652cea..9042e54 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,7 +4,7 @@ queue_rules: - name: default update_method: merge conditions: - - "#approved-reviews-by>=0" + - "#approved-reviews-by>=1" - -label~=(do-not-merge) - status-success=build - status-success=package-js @@ -24,7 +24,7 @@ pull_request_rules: queue: name: default conditions: - - "#approved-reviews-by>=0" + - "#approved-reviews-by>=1" - -label~=(do-not-merge) - status-success=build - status-success=package-js diff --git a/.projenrc.ts b/.projenrc.ts index 9717515..5caefe2 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -26,12 +26,9 @@ const project = new CdklabsConstructLibrary ({ mergeQueue: true }, autoMerge: true, - autoMergeOptions: { - approvedReviews: 0 - }, autoApproveUpgrades: true, autoApproveOptions: { - allowedUsernames: ['cdklabs-automation', "hakenmt", "github-bot"] + allowedUsernames: ['cdklabs-automation', "github-bot", "dependabot[bot]"] }, eslint: false, eslintOptions: { @@ -266,7 +263,7 @@ project.github project.github ?.tryFindWorkflow('auto-approve') - ?.file?.patch(JsonPatch.replace('/jobs/approve/if', "contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'cdklabs-automation' || github.event.pull_request.user.login == 'hakenmt' || github.event.pull_request.user.login == 'dependabot[bot]')")); + ?.file?.patch(JsonPatch.replace('/jobs/approve/if', "contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'cdklabs-automation' || github.event.pull_request.user.login == 'hakenmt' || github.event.pull_request.user.login == 'github-bot' || github.event.pull_request.user.login == 'dependabot[bot]')")); project.github ?.tryFindWorkflow('build')