diff --git a/.github/workflows/pull-request-lint.yaml b/.github/workflows/pull-request-lint.yaml index b399514b..5e2bd05d 100644 --- a/.github/workflows/pull-request-lint.yaml +++ b/.github/workflows/pull-request-lint.yaml @@ -24,6 +24,26 @@ jobs: chore rfc revert + bedrock + budget + checks + cognito + containers + dynamodb + eventbridge + fifoqueue + github + jwt + lock + messagefanout + ngrok + openai + postgres + redis + sagemaker + simtools + vite + websockets subjectPattern: ^[^A-Z][^:]+[^.]$ subjectPatternError: Subject must start with a lowercase, should not include ':' and should not end with a period diff --git a/generate-workflows.main.w b/generate-workflows.main.w index da015bd4..38fbffd2 100644 --- a/generate-workflows.main.w +++ b/generate-workflows.main.w @@ -30,7 +30,7 @@ readme.update(libs.copy()); new stale.StaleWorkflow(workflowdir); new mergify.MergifyWorkflow(libs.copy()); new prdiff.PullRequestDiffWorkflow(workflowdir); -new prlint.PullRequestLintWorkflow(workflowdir); +new prlint.PullRequestLintWorkflow(workflowdir, libs.copy()); let skipCanaryTests = [ "containers" // https://github.com/winglang/wing/issues/5716 diff --git a/pr-lint.w b/pr-lint.w index 2c220bb7..d13a6933 100644 --- a/pr-lint.w +++ b/pr-lint.w @@ -1,7 +1,17 @@ bring fs; pub class PullRequestLintWorkflow { - new(workflowdir: str) { + new(workflowdir: str, libs: Array) { + let var types = MutArray[ + "feat", + "fix", + "docs", + "chore", + "rfc", + "revert", + ]; + types = types.concat(libs.copyMut()); + fs.writeYaml("{workflowdir}/pull-request-lint.yaml", { name: "Pull Request Lint", on: { @@ -21,7 +31,7 @@ pub class PullRequestLintWorkflow { "GITHUB_TOKEN": "$\{\{ secrets.GITHUB_TOKEN \}\}" }, "with": { - "types": "feat\nfix\ndocs\nchore\nrfc\nrevert", + "types": types.join("\n"), "subjectPattern": "^[^A-Z][^:]+[^.]$", "subjectPatternError": "Subject must start with a lowercase, should not include ':' and should not end with a period", "requireScope": false