documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Integrate the commit message checker github action

Open SanketDG opened this issue 5 years ago • 8 comments

The Portal project recently integrated commitlint to check for incorrect commit messages.

Can we integrate this for other projects?

SanketDG avatar Jul 24 '20 18:07 SanketDG

yesss! I mean, how does this work? Does this avoid a squash and merge with the wrong commit message? What is the workflow here? @SanketDG

isabelcosta avatar Jul 26 '20 16:07 isabelcosta

@isabelcosta Well, it just parses the commit message for a set of rules and then throws an error for the failed github action! (like tests have failed)

Sample: https://github.com/anitab-org/portal/pull/566

SanketDG avatar Jul 26 '20 18:07 SanketDG

can i work on this??

19-pragya avatar Aug 19 '20 13:08 19-pragya

Sure @19-pragya, should I assign you?

SanketDG avatar Aug 19 '20 15:08 SanketDG

Yes please

19-pragya avatar Aug 19 '20 15:08 19-pragya

Let me know if you need any help.

SanketDG avatar Aug 19 '20 15:08 SanketDG

actually, i am very new to this.. can you please explain waht exactly i have to to?? @SanketDG

19-pragya avatar Aug 20 '20 08:08 19-pragya

@19-pragya

Most projects at Anita-B have a Commit Message Style Guide, which is adhered by all developers when updating or creating commits for a PR. This is Portal's.

This was mostly checked by each and every PR reviewer manually, which is not the most effecient way to do it. So, why not let computers do what they are good what?

https://github.com/anitab-org/portal/pull/607 introduced commitlint to automatically do this, so that reviewers don't have to check for each commit. Here's an example (if you scroll down you will see the commit message check failing) Here's the list of steps that one needs to do here:

  • Find a project under Anita-B that has a commit message style guide
  • Configure commitlint to use the set of rules as specified by the style guide
  • Open a PR!

This is not a beginner or first timer issue, but feel free to ask for help on here or Zulip if you choose to do this!

SanketDG avatar Aug 20 '20 10:08 SanketDG