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 a workflow for linting pr titles #2497

Merged
merged 5 commits into from
Apr 18, 2024

Conversation

unvalley
Copy link
Member

@unvalley unvalley commented Apr 17, 2024

Summary

This PR adds a workflow for linting pr titles. It uses amannn/action-semantic-pull-request, used by some repositories (Electron · Vite · Excalidraw · Apache · Vercel · Microsoft · Firebase · AWS).

This is definition of each part (from amannn/action-semantic-pull-request).

feat(ui): Add `Button` component
^    ^    ^
|    |    |__ Subject
|    |_______ Scope
|____________ Type

I only added some types.

  • fix
  • feat
  • chore
  • ci
  • docs
  • refactor
  • release
  • test
  • revert (we don't need this?)

No scope and subject pattern for now, but we can define scopes for consistency. In lint area, we have some random scopes for example lint, lint/ruleName, analyzer.

Valid title

fix: Correct typo
feat: Add support for Node.js 18
refactor!: Drop support for Node.js 12
feat(ui): Add Button component

Invalid title

Correct typo
wip: Add support for Node.js 18

Test Plan

Tested on my forked repository : unvalley#2

@unvalley unvalley requested a review from a team April 18, 2024 06:33
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

We should update the contribution guidelines too

Comment on lines 58 to 60
ignoreLabels: |
bot
ignore-semantic-pull-request
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we use these labels internally

Comment on lines 24 to 34
# Default: https://github.com/commitizen/conventional-commit-types
types: |
fix
feat
chore
ci
docs
refactor
release
test
revert
Copy link
Member

Choose a reason for hiding this comment

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

Can you align the types with what we have in the contribution guide? https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#commit-messages

@unvalley unvalley merged commit 430ce69 into biomejs:main Apr 18, 2024
1 check passed
@unvalley unvalley deleted the linting-pr-titles branch April 18, 2024 08:57
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.

None yet

2 participants