-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: enhance signoff check by adding message body and a better regex #141
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
Conversation
The current implementation of signoff policy check is considering only the subject. This is wrong because the signoff line is added in the body of a commit message. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
This name of the function is actualy wrong because it fetches only one single commit. I also added a sha parameter to help in the future to fetch older commits from the tree. Then, we can analyse multiple commits as the original function name suggests. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Before this commit, the signoff regex only looks for the exact word. This new proposal also checks if the commit has an email associated to it. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
This commit just updates the command line that is called by `get_commit_info` to reflect the latest changes. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. thank you so much for your great enhacement.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
+ Coverage 98.00% 98.01% +0.01%
==========================================
Files 7 7
Lines 250 252 +2
==========================================
+ Hits 245 247 +2
Misses 5 5 ☔ View full report in Codecov by Sentry. |
This pull request adds some enhancements in commit-check code such as:
get_commits_info
plus add the hash to verify it. In the future, it should be nice to check a range of commits and not only the HEAD. That's why this function was rebased a little bit to match what is exactly doing today.