stable

Clone or download

Read-only

feat: Close artifacts asynchronously with redis

part of story #26802 have smart commit with Tuleap Git How to test: - ensure you have redis configured and running - In a git repository, in Settings > General settings, allow artifact closure - commit on the default branch (for example master or main) of the git repository. Your commit message should have a "closing reference" to an artifact in the same project, like the following: closes art #000 - push the default branch - The artifacts you referenced are closed shortly after (when Tuleap handles the redis message) The following "faults" will be logged in git_syslog: - the git repository cannot be found (it may have been deleted since the event was dispatched). - the pushing user does not have the read permission on the git repository (access control may have changed). - the pushing user does not have access to the repository's project. - the commit message of the given commit sha1 cannot be read. Change-Id: Icf84d6133687a3e9ba97d52f672ced932612ab42

Modified Files

Name
M plugins/git/hooks/post-receive.php +6 −4 Go to diff View file
A plugins/git/include/Hook/Asynchronous/AnalyzeCommitTask.php +64 −0 Go to diff View file
A plugins/git/include/Hook/Asynchronous/AsynchronousEventHandler.php +68 −0 Go to diff View file
M plugins/git/include/Hook/Asynchronous/CommitAnalysisOrder.php +1 −8 Go to diff View file
A plugins/git/include/Hook/Asynchronous/CommitAnalysisOrderParser.php +97 −0 Go to diff View file
M plugins/git/include/Hook/Asynchronous/CommitAnalysisProcessor.php +16 −12 Go to diff View file
M plugins/git/include/Hook/Asynchronous/CommitAnalysisProcessorBuilder.php +0 −2 Go to diff View file
A plugins/git/include/Hook/Asynchronous/GitRepositoryRetriever.php +68 −0 Go to diff View file
R plugins/git/include/Hook/DispatchGitPushReception.php Go to diff View file
R plugins/git/tests/unit/Stub/DispatchGitPushReceptionStub.php Go to diff View file
D plugins/git/include/Hook/GitPushReceptionDispatcher.php +0 −51 Go to diff View file
M plugins/git/include/Hook/PostReceive.php +7 −10 Go to diff View file
A plugins/git/include/Hook/PushCommitsAnalyzer.php +61 −0 Go to diff View file
M plugins/git/include/gitPlugin.php +26 −0 Go to diff View file
A plugins/git/tests/unit/Hook/Asynchronous/AnalyzeCommitTaskTest.php +65 −0 Go to diff View file
A plugins/git/tests/unit/Hook/Asynchronous/AsynchronousEventHandlerTest.php +131 −0 Go to diff View file
A plugins/git/tests/unit/Hook/Asynchronous/CommitAnalysisOrderParserTest.php +135 −0 Go to diff View file
M plugins/git/tests/unit/Hook/Asynchronous/CommitAnalysisOrderTest.php +1 −4 Go to diff View file
M plugins/git/tests/unit/Hook/Asynchronous/CommitAnalysisProcessorTest.php +23 −29 Go to diff View file
A plugins/git/tests/unit/Hook/Asynchronous/GitRepositoryRetrieverTest.php +125 −0 Go to diff View file
D plugins/git/tests/unit/Hook/GitPushReceptionDispatcherTest.php +0 −97 Go to diff View file
M plugins/git/tests/unit/Hook/PostReceiveTest.php +26 −37 Go to diff View file
A plugins/git/tests/unit/Hook/PushCommitsAnalyzerTest.php +96 −0 Go to diff View file
M plugins/git/tests/unit/Stub/EventDispatcherStub.php +9 −1 Go to diff View file
A plugins/git/tests/unit/Stub/RetrieveGitRepositoryStub.php +53 −0 Go to diff View file