diff --git a/.gitattributes b/.gitattributes index edc5148..bb2dd88 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,7 +5,6 @@ /.gitattributes linguist-generated /.github/pull_request_template.md linguist-generated /.github/workflows/auto-approve.yml linguist-generated -/.github/workflows/auto-queue.yml linguist-generated /.github/workflows/build.yml linguist-generated /.github/workflows/pull-request-lint.yml linguist-generated /.github/workflows/release.yml linguist-generated @@ -13,6 +12,7 @@ /.github/workflows/upgrade-dev-deps-main.yml linguist-generated /.github/workflows/upgrade-main.yml linguist-generated /.gitignore linguist-generated +/.mergify.yml linguist-generated /.npmignore linguist-generated /.prettierignore linguist-generated /.prettierrc.json linguist-generated diff --git a/.github/workflows/auto-queue.yml b/.github/workflows/auto-queue.yml deleted file mode 100644 index 7682cde..0000000 --- a/.github/workflows/auto-queue.yml +++ /dev/null @@ -1,22 +0,0 @@ -# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". - -name: auto-queue -on: - pull_request_target: - types: - - opened - - reopened - - ready_for_review -jobs: - enableAutoQueue: - name: "Set AutoQueue on PR #${{ github.event.number }}" - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - uses: peter-evans/enable-pull-request-automerge@v3 - with: - token: ${{ secrets.PROJEN_GITHUB_TOKEN }} - pull-request-number: ${{ github.event.number }} - merge-method: squash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5f6ba0..c2802d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ name: build on: pull_request: {} workflow_dispatch: {} - merge_group: {} jobs: build: runs-on: codebuild-Arm64CdkLabsGithubRunner-${{ github.run_id }}-${{ github.run_attempt }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e86abf3..722a099 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,6 +143,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20" + - name: " Install gpg-agent" + run: sudo dnf install --allowerasing gnupg2 - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 6f9ca42..97fcfae 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ junit.xml /dist/changelog.md /dist/version.txt !/.github/workflows/release.yml +!/.mergify.yml !/.github/pull_request_template.md !/.prettierignore !/.prettierrc.json @@ -70,7 +71,6 @@ tsconfig.json !/API.md .jsii.tabl.json !/rosetta/default.ts-fixture -!/.github/workflows/auto-queue.yml !/.github/workflows/upgrade-cdklabs-projen-project-types-main.yml !/.github/workflows/upgrade-main.yml !/.github/workflows/upgrade-dev-deps-main.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..9042e54 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,34 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +queue_rules: + - name: default + update_method: merge + conditions: + - "#approved-reviews-by>=1" + - -label~=(do-not-merge) + - status-success=build + - status-success=package-js + - status-success=package-java + - status-success=package-python + - status-success=package-dotnet + - status-success=package-go + merge_method: squash + commit_message_template: |- + {{ title }} (#{{ number }}) + + {{ body }} +pull_request_rules: + - name: Automatic merge on approval and successful build + actions: + delete_head_branch: {} + queue: + name: default + conditions: + - "#approved-reviews-by>=1" + - -label~=(do-not-merge) + - status-success=build + - status-success=package-js + - status-success=package-java + - status-success=package-python + - status-success=package-dotnet + - status-success=package-go diff --git a/.npmignore b/.npmignore index 98db8fc..0cf92b0 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,8 @@ permissions-backup.acl /dist/changelog.md /dist/version.txt /.mergify.yml +/.prettierignore +/.prettierrc.json /test/ /tsconfig.dev.json /src/ @@ -20,7 +22,6 @@ dist /.idea/ /.projenrc.js tsconfig.tsbuildinfo -/.eslintrc.json !.jsii /.gitattributes /.projenrc.ts diff --git a/.projen/deps.json b/.projen/deps.json index 7537fd9..95e6d86 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -11,7 +11,6 @@ }, { "name": "aws-cdk-lib", - "version": "2.173.1", "type": "build" }, { @@ -27,11 +26,6 @@ "version": "^12", "type": "build" }, - { - "name": "constructs", - "version": "10.0.5", - "type": "build" - }, { "name": "jest", "type": "build" diff --git a/.projen/files.json b/.projen/files.json index 90ef6c5..0e40363 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -3,7 +3,6 @@ ".gitattributes", ".github/pull_request_template.md", ".github/workflows/auto-approve.yml", - ".github/workflows/auto-queue.yml", ".github/workflows/build.yml", ".github/workflows/pull-request-lint.yml", ".github/workflows/release.yml", @@ -11,6 +10,7 @@ ".github/workflows/upgrade-dev-deps-main.yml", ".github/workflows/upgrade-main.yml", ".gitignore", + ".mergify.yml", ".prettierignore", ".prettierrc.json", ".projen/deps.json", diff --git a/.projen/tasks.json b/.projen/tasks.json index 5035704..4cd29f3 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -510,13 +510,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev --filter=@types/jest,cdk-nag,jest,jsii-diff,jsii-pacmak,jsii-rosetta,prettier,ts-jest,ts-node,typescript" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev --filter=@types/jest,aws-cdk-lib,cdk-nag,jest,jsii-diff,jsii-pacmak,jsii-rosetta,prettier,ts-jest,ts-node,typescript" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/node aws-cdk-lib cdk-nag commit-and-tag-version constructs jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii prettier ts-jest ts-node typescript @aws-cdk/integ-runner @aws-cdk/integ-tests-alpha" + "exec": "yarn upgrade @types/jest @types/node aws-cdk-lib cdk-nag commit-and-tag-version jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii prettier ts-jest ts-node typescript @aws-cdk/integ-runner @aws-cdk/integ-tests-alpha" }, { "exec": "npx projen" diff --git a/.projenrc.ts b/.projenrc.ts index b1e816e..db09c49 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -18,6 +18,7 @@ const project = new CdklabsConstructLibrary ({ 'aws-cdk-lib', 'cdk-nag' ], + private: false, npmAccess: javascript.NpmAccess.PUBLIC, license: 'Apache-2.0', githubOptions: { @@ -259,7 +260,9 @@ project.tasks.tryFind('release')?.updateStep(4, { project.github ?.tryFindWorkflow('release') ?.file?.patch(JsonPatch.remove('/jobs/release_pypi/steps/1')); -project.synth(); + project.github + ?.tryFindWorkflow('release') + ?.file?.patch(JsonPatch.add('/jobs/release_maven/steps/2', {"name": " Install gpg-agent", "run": "sudo dnf install --allowerasing gnupg2"})); project.github ?.tryFindWorkflow('build') diff --git a/package.json b/package.json index 7bd483f..cd2128d 100644 --- a/package.json +++ b/package.json @@ -103,8 +103,6 @@ "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", "/@(src|test)/**/__tests__/**/*.ts?(x)", "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", - "/@(projenrc)/**/__tests__/**/*.ts?(x)", - "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", "/@(projenrc)/**/__tests__/**/*.ts?(x)" ], "clearMocks": true, @@ -174,6 +172,5 @@ "rootDir": "src" } }, - "private": true, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." }