feat: Add support for executing pre-receive hooks#908
feat: Add support for executing pre-receive hooks#908JamieSlome merged 19 commits intofinos:mainfrom fabiovincenzi:pre-receive
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
|
@06kellyjac (cc) 🍰 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #908 +/- ##
==========================================
+ Coverage 61.06% 61.88% +0.81%
==========================================
Files 48 49 +1
Lines 1767 1805 +38
==========================================
+ Hits 1079 1117 +38
Misses 688 688 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JamieSlome
left a comment
There was a problem hiding this comment.
Another solid G-PR 😏
Can you confirm my understanding? This PR supports the definition and execution of .sh scripts which can be exposed to the chain via the hooks folder?
|
Just a reminder to get the EasyCLA signed and we're good to proceed 🍰 |
Thank you @JamieSlome for the review! |
|
Thanks for the clarifications and updates ❤️ Once the EasyCLA is signed I'll merge the PR 🍰 EDIT: and release 🚀 |
|
@JamieSlome I added a check to verify whether the pre-receive hook exists. If it doesn’t, we simply skip its execution without any errors. This way, the check is only enforced if both the hooks folder and the pre-receive file are present. What do you think? Aside from that, we were considering implementing auto-approval of pushes using this hook. I'll create a separate PR for that, but perhaps adding a configuration option like
We are working to get the EasyCLA signed, thanks again!😊 |
|
@JamieSlome, All set! EasyCLA is now signed. |
This PR adds support for managing pre-receive hooks by executing .sh scripts located in the ./hooks directory. These scripts allow administrators to define conditions for automatically approving or rejecting pushes.
Changes Introduced
You can also test this feature using the following pre-receive samples. Simply place a sample script in the ./hooks directory and attempt a push. The script should execute and determine whether the push is accepted or rejected.