Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Enforce pr title conventions #105

Open
dimabru opened this issue Oct 6, 2022 · 9 comments
Open

Enforce pr title conventions #105

dimabru opened this issue Oct 6, 2022 · 9 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers up for grabs Waiting for someone to take it

Comments

@dimabru
Copy link
Contributor

dimabru commented Oct 6, 2022

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 dimabru added enhancement New feature or request up for grabs Waiting for someone to take it good first issue Good for newcomers labels Oct 6, 2022
@dolby360
Copy link
Contributor

dolby360 commented Oct 6, 2022

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
Copy link
Contributor

dolby360 commented Oct 6, 2022

I can do this task if you want

@TomerFi
Copy link

TomerFi commented Oct 7, 2022

@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?

@dolby360
Copy link
Contributor

dolby360 commented Oct 7, 2022

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

@dimabru
Copy link
Contributor Author

dimabru commented Oct 12, 2022

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 :)

@dolby360
Copy link
Contributor

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

@TomerFi
Copy link

TomerFi commented Oct 13, 2022

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

@dolby360
Copy link
Contributor

No problems @dimabru assign me for this issue

@TomerFi
Copy link

TomerFi commented Oct 15, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers up for grabs Waiting for someone to take it
Projects
None yet
Development

No branches or pull requests

3 participants