stable

Clone or download

Read-only

Send a webhook at artifact creation / update

This is part of story #11035 trigger webhook on artifact updates The webhook URL must be stored directly in DB to be sent (the UI to do this will be done at the very end of the story). A fake payload content is sent to check that the webhook was correctly sent. Some web services can do this for you [1] For the object injection, I did this as best effort. A refactoring will be possible at the end of the story to better handle this (if necessary). The log system is not yet implemented. It will be done in a dedicated commit to reduce the size and the scope of this commit. Next commit will introduce the real payload content. [1] https://requestbin.fullcontact.com/ Change-Id: I37c2d65de7506fd6f4d2717eaa18f5128e0e9826

Modified Files

Name
M plugins/tracker/db/install.sql +8 −0 Go to diff View file
A plugins/tracker/db/mysql/updates/2018/201806251409_create_tracker_webhook_url_table.php +48 −0 Go to diff View file
M plugins/tracker/db/uninstall.sql +1 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/ChangesetCreatorBase.class.php +28 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/InitialChangesetAtGivenDateCreator.class.php +11 −4 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/InitialChangesetCreator.class.php +10 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/InitialChangesetCreatorBase.class.php +16 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/NewChangesetAtGivenDateCreator.class.php +9 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/NewChangesetCreator.class.php +9 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/NewChangesetCreatorBase.class.php +16 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact.class.php +31 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_ArtifactFactory.class.php +14 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImportBuilder.class.php +17 −3 Go to diff View file
M plugins/tracker/include/Tracker/Migration/MigrationManager.php +24 −3 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +16 −2 Go to diff View file
A plugins/tracker/include/Tracker/Webhook/ArtifactPayload.php +39 −0 Go to diff View file
A plugins/tracker/include/Tracker/Webhook/Webhook.php +51 −0 Go to diff View file
A plugins/tracker/include/Tracker/Webhook/WebhookDao.php +36 −0 Go to diff View file
A plugins/tracker/include/Tracker/Webhook/WebhookRetriever.php +58 −0 Go to diff View file
A plugins/tracker/include/Tracker/Webhook/WebhookStatusLogger.php +32 −0 Go to diff View file
M plugins/tracker/tests/Artifact/Changeset/InitialChangesetCreatorTest.php +11 −3 Go to diff View file
M plugins/tracker/tests/Tracker_ArtifactTest.php +39 −3 Go to diff View file