Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

ci: enforce conventional pull request titles (#321)

mldangelo-oaicbd0d9576c98
diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml
new file mode 100644
index 000000000..3d35cbf8d
--- /dev/null
+++ b/.github/workflows/validate-pr-title.yml
@@ -0,0 +1,23 @@
+name: Validate PR Title
+
+on:
+ pull_request:
+ branches: [main]
+ types: [opened, edited, reopened, synchronize]
+
+permissions: {}
+
+jobs:
+ validate-pr-title:
+ name: Validate PR Title
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check conventional title
+ env:
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ run: |
+ pattern='^(build|chore|ci|docs|feat|fix|perf|refactor|release|revert|style|test)(\([^()[:space:]]+\))?!?:[[:space:]][^[:space:]].*$'
+ if [[ ! "$PR_TITLE" =~ $pattern ]]; then
+ echo '::error::PR titles must use a supported Conventional Commit type.'
+ exit 1
+ fi