diff --git a/.gitattributes b/.gitattributes index d30e075..0ff1092 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,6 @@ /.github/workflows/cdk-deploy-dev.yml linguist-generated /.github/workflows/cdk-deploy-test.yml linguist-generated /.github/workflows/cdk-validate.yml linguist-generated -/.github/workflows/pull-request-lint.yml linguist-generated /.gitignore linguist-generated /.projen/** linguist-generated /.projen/deps.json linguist-generated diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml deleted file mode 100644 index 94ed431..0000000 --- a/.github/workflows/pull-request-lint.yml +++ /dev/null @@ -1,38 +0,0 @@ -# ~~ Generated by projen. To modify, edit .projenrc.py and run "uv run projen". - -name: pull-request-lint -on: - pull_request_target: - types: - - labeled - - opened - - synchronize - - reopened - - ready_for_review - - edited - merge_group: {} -jobs: - validate: - name: Validate PR title - runs-on: ubuntu-latest - permissions: - pull-requests: write - if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') - steps: - - id: validate-pr-title - uses: amannn/action-semantic-pull-request@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - types: |- - feat - fix - chore - refactor - perf - docs - style - test - build - ci - requireScope: false diff --git a/.gitignore b/.gitignore index b6c1ae2..0ba2e34 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ node_modules/ !/.projen/tasks.json !/.projen/deps.json !/.projen/files.json -!/.github/workflows/pull-request-lint.yml !/pyproject.toml __pycache__/ *.py[cod] diff --git a/.projen/files.json b/.projen/files.json index 70c38e3..6742240 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -6,7 +6,6 @@ ".github/workflows/cdk-deploy-dev.yml", ".github/workflows/cdk-deploy-test.yml", ".github/workflows/cdk-validate.yml", - ".github/workflows/pull-request-lint.yml", ".gitignore", ".projen/deps.json", ".projen/files.json", diff --git a/.projenrc.py b/.projenrc.py index 445ab9d..3f3bb21 100644 --- a/.projenrc.py +++ b/.projenrc.py @@ -11,7 +11,6 @@ from src.bin.cicd_helper import ( cdk_validate_workflow, github_cicd, - pin_github_actions, ) from src.bin.env_helper import CDK_VALIDATE_COMMAND, cdk_action_task @@ -60,24 +59,7 @@ "requires_python": python_requires, }, }, - github_options={ - "pull_request_lint_options": { - "semantic_title_options": { - "types": [ - "feat", - "fix", - "chore", - "refactor", - "perf", - "docs", - "style", - "test", - "build", - "ci", - ], - }, - }, - }, + github_options={"pull_request_lint": False}, git_ignore_options={ "ignore_patterns": [ "__pycache__", @@ -118,9 +100,6 @@ gh = project.github -# Keep projen-managed workflows (pull-request-lint) on the same action versions -pin_github_actions(gh) - # Validate the CDK app offline on every pull request (no AWS credentials required) cdk_validate_workflow( gh, diff --git a/src/bin/cicd_helper.py b/src/bin/cicd_helper.py index 523fd45..4926a18 100644 --- a/src/bin/cicd_helper.py +++ b/src/bin/cicd_helper.py @@ -1,25 +1,16 @@ from projen import github -# Pinned GitHub Actions used by every workflow in this repo. `.projenrc.py` registers these -# with projen's actions provider so projen-managed workflows (pull-request-lint) -# render the same versions as the workflows built here. +# Pinned GitHub Actions used by every workflow in this repo. GITHUB_ACTIONS = { "checkout": "actions/checkout@v7", "cache_restore": "actions/cache/restore@v6", "cache_save": "actions/cache/save@v6", "configure_aws_credentials": "aws-actions/configure-aws-credentials@v6", - "semantic_pull_request": "amannn/action-semantic-pull-request@v6", "setup_python": "actions/setup-python@v7", "setup_uv": "astral-sh/setup-uv@v10.0.1", # setup-uv publishes no floating v10 tag } -def pin_github_actions(gh): - """Register GITHUB_ACTIONS with projen's actions provider so every workflow uses the same versions.""" - for action in GITHUB_ACTIONS.values(): - gh.actions.set(action.split("@")[0], action) - - def cdk_environment_steps(python_version, cdk_cli_version, aws_credentials=None): """Checkout, Python, uv, project dependencies and the CDK CLI.""" return [