stable

Clone or download

Read-only

Do not filter protected git references

We now remove protected git references from the references passed to WASM modules, as this could interfere with the Pull Request plugin. How to test: - tuleap config-set feature_flag_enable_pre_receive_command 1 (set the feature flag) - cp plugins/git/etc/sudoers.d/tuleap-git-prereceive /etc/sudoers.d/ - tuleap-cfg site-deploy:gitolite3-hooks - Place a valid WASM module in /var/lib/tuleap/untrusted-code/git/pre-receive-hook/<repo-id>.wasm (If you don't want to write your own, you can use https://gerrit.tuleap.net/plugins/gitiles/tuleap/+/refs/changes/75/27375/12/src/additional-packages/pre-receive-hook-example) - Enable the Pull Request plugin in Tuleap's interface - In a git repository, push some content on two separate, valid, git branches. - Create a pull request between these branches - The PR is created an can be merged successfully Part of story #31077 deploy a WebAssembly module to validate incoming references as a pre-receive hook Change-Id: I5320058f7adaf4436c9a90f3d0b81fe85d939e95

Modified Files

Name
M plugins/git/include/Hook/PreReceive/PreReceiveAction.php +10 −1 Go to diff View file
A plugins/git/include/Hook/PreReceive/PreReceiveHookDataWithoutTechnicalReference.php +57 −0 Go to diff View file
M plugins/git/include/gitPlugin.php +2 −1 Go to diff View file
M plugins/git/tests/unit/Hook/PreReceive/PreReceiveActionTest.php +44 −8 Go to diff View file
A plugins/git/tests/unit/Hook/PreReceive/PreReceiveHookDataWithoutTechnicalReferenceTest.php +61 −0 Go to diff View file