Skip to content

Conversation

@danpawlik
Copy link
Contributor

@danpawlik danpawlik commented Oct 28, 2025

The script is verifying if the minimum body length contains 10 characters. Also raise a warning if there is no: "Signed-Off-By".

OSPRH-21367

@danpawlik danpawlik requested a review from a team as a code owner October 28, 2025 11:07
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@danpawlik
Copy link
Contributor Author

let's set as non-voting now.

@danpawlik danpawlik changed the title Add git-commit-msg-hook script Add git minimum length body count validator Nov 5, 2025
@danpawlik danpawlik force-pushed the add-commit-message-verify branch from 19188fc to bcf8fe3 Compare November 5, 2025 11:36
The script is verifying if the minimum body length contains
10 characters. Also raise a warning if there is no: "Signed-Off-By".

Signed-off-by: Daniel Pawlik <[email protected]>
@danpawlik danpawlik force-pushed the add-commit-message-verify branch from bcf8fe3 to 6fb1009 Compare November 5, 2025 12:00
@danpawlik
Copy link
Contributor Author

PR needs to be merged to get results.
Demo how it works - danpawlik#4

Copy link
Contributor

@michburk michburk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion, otherwise lgtm


if ! grep -qi '^Signed-off-by:' "$MSG_FILE"; then
echo -e "\n\n**WARNING: Missing 'Signed-off-by:' line in commit message.**\n" >&2
echo "Add: Signed-off-by: Your Name <[email protected]>" >&2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[non-blocking] Maybe we also want to add a tip about including the -s flag when committing to automatically include the Signed-off-by?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants