stable

Clone or download

Read-only

refactor: TrackerArtifactCreator in MailGateway

No functional changes, it is still possible to create artifact by email. To test it you need to enable artifact creation for your tracker, then get the email address to do that in the dropdown menu. Then build a sample email message (`/tmp/mail.txt`) ``` From: email-of-one-of-your-user@example.com To: forge__tracker+....@example.com Subject: Test mailgateway Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Body of the email ``` Now execute the following command: ``` cat tmp/mail.txt | plugins/tracker/bin/emailgateway-wrapper.sh ``` A new artifact should be created. This decreases the number of usage of `\Tracker_ArtifactFactory::createArtifact` so that we can remove it in future contribution. Part of request #36805: Kanban item not found when creating a card in Kanban Change-Id: If18ee335243f0ec04334c39136f5478f3d260b70

Modified Files

Name
M plugins/tracker/bin/emailgateway.php +20 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/MailGateway/MailGateway.class.php +12 −8 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/MailGateway/MailGatewayBuilder.php +4 −9 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/MailGateway/MailGatewayBuilderTest.php +4 −3 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/MailGateway/MailGatewayInsecureTest.php +6 −6 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/MailGateway/MailGatewayTokenTest.php +4 −4 Go to diff View file