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

chore: lint PR titles/commit messages in the CI #295

Open
JGAntunes opened this issue Jan 21, 2021 · 5 comments
Open

chore: lint PR titles/commit messages in the CI #295

JGAntunes opened this issue Jan 21, 2021 · 5 comments
Labels
type: chore work needed to keep the product and development running smoothly

Comments

@JGAntunes
Copy link
Contributor

After #285 releases are now made using release-please. This however depends on enforcing conventional-commits on everything that lands on the main branch. For PRs this means linting both commit messages as well as the PR title - https://github.community/t/how-to-change-the-default-squash-merge-commit-message/1155. It would probably be a good idea to have an action validating this 👍

@JGAntunes JGAntunes added the type: chore work needed to keep the product and development running smoothly label Jan 21, 2021
@mraerino
Copy link
Member

mraerino commented Jan 26, 2021

if we're able to find something that just enforces the PR title it would be nice, b/c

  • it's easy for people to change it
  • if we squash, single commits don't matter
  • we can allow squashing as the only allowed merge method

@erezrokah found this: https://github.com/marketplace/actions/conventional-pr-title

@mraerino
Copy link
Member

this one seems good: https://github.com/amannn/action-semantic-pull-request

@JGAntunes
Copy link
Contributor Author

@mraerino I'm not 100% sure linting only PR titles will cover it, as I believe the default behaviour for PRs with a single commit when squashed is to use the commit msg of that single commit and not the PR title:

I've seen this action for example handles that case - https://github.com/beemojs/conventional-pr-action/blob/master/src/index.ts#L171 - but haven't tried it yet.

@mraerino
Copy link
Member

yeah, with that check it's definitely nicer!

@JGAntunes
Copy link
Contributor Author

A conventional commit lint app should now be enabled for this repo - https://github.com/apps/conventional-commit-lint-gcf/installations/14413148 - once everyone's is comfortable with it we could make it a required step in our CI pipeline 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

No branches or pull requests

2 participants