Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add action to lint PR titles #956

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR Title check

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a configuration for the action-semantic-pull-request to specify the expected PR title format. This ensures the action checks against the desired title conventions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider adding configuration options for the semantic PR action to match the project's existing commit message standards. For example:

- uses: amannn/action-semantic-pull-request@v5
  with:
    # Define allowed types based on your development.md guidelines
    types: |
      feat
      fix
      docs
      test
    # Add a helpful error message
    errorComment: |
      Please follow the semantic PR title format as defined in python/docs/development.md

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading