Skip to content

ci: add PR conventional commits validation#305

Merged
SoulPancake merged 1 commit intomainfrom
feat/add-pr-conventional-commits-validation
Mar 16, 2026
Merged

ci: add PR conventional commits validation#305
SoulPancake merged 1 commit intomainfrom
feat/add-pr-conventional-commits-validation

Conversation

@SoulPancake
Copy link
Member

@SoulPancake SoulPancake commented Mar 16, 2026

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Added automated validation for pull request titles to enforce conventional commit format conventions (feat, fix, docs, test, refactor, ci, perf, chore, revert).

@SoulPancake SoulPancake requested a review from a team as a code owner March 16, 2026 07:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

Walkthrough

Adds a GitHub Actions workflow configuration file that enforces conventional commit conventions for pull request titles. The workflow triggers on PR events and validates that PR titles match allowed commit types (feat, fix, docs, test, refactor, ci, perf, chore, revert) using the pr-conventional-commits action.

Changes

Cohort / File(s) Summary
PR Title Validation Workflow
.github/workflows/pr-title-check.yml
New GitHub Actions workflow that validates pull request titles against conventional commit standards. Runs on ubuntu-latest, triggers on pull request open/reopen/synchronize/edit events for the main branch, and uses ytanikin/pr-conventional-commits action to enforce allowed commit type prefixes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: add PR conventional commits validation' directly and accurately reflects the main change: adding a GitHub Actions workflow for conventional commit validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-pr-conventional-commits-validation
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.02%. Comparing base (82aabf2) to head (ea6be0b).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #305      +/-   ##
============================================
- Coverage     38.03%   38.02%   -0.02%     
+ Complexity     1258     1257       -1     
============================================
  Files           198      198              
  Lines          7643     7643              
  Branches        885      885              
============================================
- Hits           2907     2906       -1     
  Misses         4598     4598              
- Partials        138      139       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/pr-title-check.yml (1)

3-7: Consider removing synchronize from event types.

The synchronize event fires when commits are pushed to the PR branch, not when the title changes. For PR title validation, only opened, reopened, and edited are relevant. Keeping it causes unnecessary workflow runs on every push.

Suggested fix
 on:
   pull_request:
-    types: [opened, reopened, synchronize, edited]
+    types: [opened, reopened, edited]
     branches:
       - main
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-title-check.yml around lines 3 - 7, Remove the
unnecessary 'synchronize' trigger from the pull_request event types so the PR
title check only runs on title-relevant events; update the on: pull_request
types array to include only opened, reopened, and edited (remove 'synchronize')
to avoid workflow runs on every push to the PR branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/pr-title-check.yml:
- Around line 3-7: Remove the unnecessary 'synchronize' trigger from the
pull_request event types so the PR title check only runs on title-relevant
events; update the on: pull_request types array to include only opened,
reopened, and edited (remove 'synchronize') to avoid workflow runs on every push
to the PR branch.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ecb7562f-88fc-4758-9856-ee948020845f

📥 Commits

Reviewing files that changed from the base of the PR and between 82aabf2 and ea6be0b.

📒 Files selected for processing (1)
  • .github/workflows/pr-title-check.yml

@SoulPancake SoulPancake added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 02bce0f Mar 16, 2026
27 checks passed
@SoulPancake SoulPancake deleted the feat/add-pr-conventional-commits-validation branch March 16, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants