From 1c194dedde9606ae3844d8ffb3f456b09ba15f8c Mon Sep 17 00:00:00 2001 From: Lucas Lois Date: Tue, 7 Apr 2026 18:04:56 -0300 Subject: [PATCH 1/3] ci: add PR title conventional commits check Co-Authored-By: Claude Opus 4.6 (1M context) Committed-By-Agent: claude --- .github/workflows/pr-title.yml | 14 ++++++++++++++ CONTRIBUTING.md | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/pr-title.yml diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..2a4696b --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,14 @@ +name: PR Title +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + conventional-commits: + timeout-minutes: 5 + name: conventional-commits + runs-on: ubuntu-latest + steps: + - uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 + with: + task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert","style","build"]' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d458adc..878bbf6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,25 @@ For questions or support, email . +## Pull requests + +PR titles **must** follow [Conventional Commits](https://www.conventionalcommits.org/) format: + +``` +type(optional scope): description +``` + +Allowed types: `feat`, `fix`, `docs`, `test`, `ci`, `refactor`, `perf`, `chore`, `revert`, `style`, `build`. + +Examples: + +``` +feat: add wallet balance endpoint +fix(auth): handle expired tokens +chore: update dependencies +``` + +A CI check will block merge if the PR title does not match this format. ### Code style & formatting From 161c5a18ef71184d050ffc25cd556a58b6c7001c Mon Sep 17 00:00:00 2001 From: Lucas Lois Date: Tue, 7 Apr 2026 18:09:14 -0300 Subject: [PATCH 2/3] ci: pin ubuntu-24.04 and add explicit permissions block Co-Authored-By: Claude Opus 4.6 (1M context) Committed-By-Agent: claude --- .github/workflows/pr-title.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 2a4696b..ca17ef7 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -3,11 +3,16 @@ on: pull_request: types: [opened, edited, synchronize, reopened] +permissions: + pull-requests: write # Read PR details and add labels + issues: write # Labels are managed via issues API + contents: read # Read repository content + jobs: conventional-commits: timeout-minutes: 5 name: conventional-commits - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 with: From aa19636d760db06c89a39edbb12326bb80ed347b Mon Sep 17 00:00:00 2001 From: Lucas Lois Date: Tue, 7 Apr 2026 18:14:01 -0300 Subject: [PATCH 3/3] ci: disable label creation and narrow permissions to read-only Committed-By-Agent: claude --- .github/workflows/pr-title.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index ca17ef7..7a7ee5e 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -4,8 +4,7 @@ on: types: [opened, edited, synchronize, reopened] permissions: - pull-requests: write # Read PR details and add labels - issues: write # Labels are managed via issues API + pull-requests: read # Read PR details contents: read # Read repository content jobs: @@ -17,3 +16,4 @@ jobs: - uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 with: task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert","style","build"]' + add_label: 'false'