diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index 815b9a4..24fc600 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 == '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 == 'dependabot[bot]') steps: - uses: hmarr/auto-approve-action@v2.2.1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 722a099..cdb6114 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,8 +143,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20" - - name: " Install gpg-agent" - run: sudo dnf install --allowerasing gnupg2 + - name: Install gpg-agent + run: dnf install --assumeyes --allowerasing gnupg2 - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.mergify.yml b/.mergify.yml index 9042e54..a652cea 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,7 +4,7 @@ queue_rules: - name: default update_method: merge conditions: - - "#approved-reviews-by>=1" + - "#approved-reviews-by>=0" - -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>=1" + - "#approved-reviews-by>=0" - -label~=(do-not-merge) - status-success=build - status-success=package-js diff --git a/.projenrc.ts b/.projenrc.ts index ef01fbe..9717515 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -26,9 +26,12 @@ const project = new CdklabsConstructLibrary ({ mergeQueue: true }, autoMerge: true, + autoMergeOptions: { + approvedReviews: 0 + }, autoApproveUpgrades: true, autoApproveOptions: { - allowedUsernames: ['cdklabs-automation', "hakenmt"], + allowedUsernames: ['cdklabs-automation', "hakenmt", "github-bot"] }, eslint: false, eslintOptions: { @@ -254,18 +257,18 @@ project.tasks.tryFind('release')?.updateStep(4, { exec: "git diff --ignore-space-at-eol --exit-code ':!tsconfig.json'", }); -/*project.addFields({ - version: '0.0.1-alpha.1', -});*/ - project.github ?.tryFindWorkflow('release') ?.file?.patch(JsonPatch.remove('/jobs/release_pypi/steps/1')); - project.github +project.github ?.tryFindWorkflow('release') - ?.file?.patch(JsonPatch.add('/jobs/release_maven/steps/2', {"name": " Install gpg-agent", "run": "sudo dnf install --allowerasing gnupg2"})); + ?.file?.patch(JsonPatch.add('/jobs/release_maven/steps/2', {"name": 'Install gpg-agent', "run": 'dnf install --assumeyes --allowerasing gnupg2'})); + +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]')")); project.github ?.tryFindWorkflow('build') ?.file?.patch(JsonPatch.remove('/jobs/package-python/steps/1')); -project.synth(); +project.synth(); \ No newline at end of file