allero icon indicating copy to clipboard operation
allero copied to clipboard

Enforce pr title conventions

Open dimabru opened this issue 2 years ago • 9 comments

Is your feature request related to a problem? Please describe. PR titles should align to the same standards

Describe the solution you'd like A Github workflow that runs on every PR that enforces commit message conventions as described here For example: build: support docker push refactor: improve unit tests feat: create json output flag

workflow should do the following:

  1. enforce all in lowercase
  2. make sure valid prefix exists (build, feat, bug, etc.)

dimabru avatar Oct 06 '22 08:10 dimabru

Actually not just the PR name this is a conventional commit message. I want to promote a project by @tomerFi, to which I am also one of the contributors. I think this is a great tool that does exactly what we need here.

dolby360 avatar Oct 06 '22 17:10 dolby360

I can do this task if you want

dolby360 avatar Oct 06 '22 17:10 dolby360

@dolby360 I think we can can either add a flag inside the conventional-commits-handler to include PR titles:

---
pr:
  conventionalCommits:
    includePrTitle: true
    rules:
      'body-max-line-length': [2, 'always', 150]

or add a designated handler:

---
pr:
  conventionalPrTitles:
  conventionalCommits:
    rules:
      'body-max-line-length': [2, 'always', 150]

I'm not sure what's better... WDYT?

TomerFi avatar Oct 07 '22 07:10 TomerFi

@TomerFi I'll open a new issue in the repository and we will decide about the design.

dolby360 avatar Oct 07 '22 10:10 dolby360

We use squash strategy when pushing feature branches into main so the structure of the commit messages is not that important to us since it is being overridden. The pr title is usually the commit message itself after squash. hence, this is what we want to enforce.

@dolby360 still want to take this issue?

@TomerFi if your project solves that problem for us, we can definitely integrate it into our project :)

dimabru avatar Oct 12 '22 08:10 dimabru

@dimabru sure, it will take me a while since I'm working on another issue. @TomerFi are you able to take this issue?

dolby360 avatar Oct 12 '22 18:10 dolby360

I'll add the handler for conventional pr titles to auto-me-bot.

TomerFi avatar Oct 13 '22 04:10 TomerFi

No problems @dimabru assign me for this issue

dolby360 avatar Oct 13 '22 05:10 dolby360

@dolby360 new handler released in auto-me-bot 1.4.0.

TomerFi avatar Oct 15 '22 10:10 TomerFi