chore: add a precommit hook for signing commit#1230
chore: add a precommit hook for signing commit#1230dbasunag merged 3 commits intoopendatahub-io:mainfrom
Conversation
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/verified', '/hold', '/cherry-pick', '/wip', '/build-push-pr-image', '/lgtm'} |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoves a disabled Renovate pre-commit hook block and adds a local Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Actionable Issues
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.pre-commit-config.yaml:
- Around line 72-73: The pre-commit hook currently only checks for the presence
of "Signed-off-by:" using the grep invocation shown (bash -c 'grep -q
"^Signed-off-by:" "$1" || { ... }'), which allows malformed or empty trailers;
update that check to validate the full trailer format by replacing the simple
existence check with a regex-based validation that enforces a non-empty name and
a valid-looking email in the form "Signed-off-by: Name <user@domain>" (reject if
it doesn't match), so the hook exits with the same error when the trailer fails
this stricter pattern.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 0f37e9e9-7bc5-4e69-8702-1103e733ddfb
📒 Files selected for processing (1)
.pre-commit-config.yaml
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
|
Status of building tag latest: success. |
* chore: add a precommit hook for signing commit Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> * fix: Update based on review comment Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> --------- Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
* chore: add a precommit hook for signing commit Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> * fix: Update based on review comment Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> --------- Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> Signed-off-by: Shehan Saleem <ssaleem@redhat.com>
Pull Request
Summary
pre-commit would catch locally if the current patch doesn't have signed commit
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit