alexellis / derek

Reduce maintainer fatigue by automating GitHub
https://github.com/alexellis/derek/blob/master/USER_GUIDE.md
MIT License
808 stars 70 forks source link

Check if commit was signed by an anonymous email #120

Closed matipan closed 5 years ago

matipan commented 5 years ago

Signed-off-by: Matias Pan matias.pan26@gmail.com

This PR adds a check for when commits have an anonymous email address.

Description

If at least one of the commits was signed with an email address that ends in noreply.github.com then we reply with a different comment that asks for the commit to be properly signed. This is comment that we are using(it can be changed :smile: ):

Thank you for your contribution. It seems that one or more of your commits have an anonymous email address. Please consider signing your commits with a valid email address. Please see our contributing guide.

Motivation and Context

How Has This Been Tested?

Unit tests for new functionality I built derek at matipan/derek:anonymousCheck, deployed it on my personal cluster and tested it using the following repository: matipan/test-derek Derek in action: derek-dco-invalid-email Existing behavior was not changed: derek-dco-unsigned derek-dco-valid

Types of changes

Checklist:

matipan commented 5 years ago

@alexellis I updated with the requested changes. To clarify how hasAnonymous behaves. The only time we consider a commit to be anonymous is when the email address ends in noreply.github.com. If there is no Signed-off-by in the message the function returns true. We are still using the hasUnsigned function to check for that particular case. What do you think about that approach?

alexellis commented 5 years ago

Your work so far is looking 💯, very good workflow and testing. Thank you.

Please could you see this note on commit messages and edit your current message?

https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md#commit-messages

Alex

matipan commented 5 years ago

Definitely. I'll fix the last commit asap, thanks for the heads up :+1:

matipan commented 5 years ago

@alexellis I just updated the commit message to follow the guidelines :+1:

rgee0 commented 5 years ago

Hello @matipan - can we get the description updated so that it includes a GitHub closure keyword, please? More here: https://help.github.com/en/articles/closing-issues-using-keywords

Convention is to add it in this line:

matipan commented 5 years ago

No problem @rgee0. I just updated it, thanks!

alexellis commented 5 years ago

Thank you @matipan I owe you Derek swag :-)