HomeDevCentral

Improve API replies handling in NotifyNewCommitsToDiffusion

Description

Improve API replies handling in NotifyNewCommitsToDiffusion

Summary:
291a59a6 introduced exceptions in PhabricatorAPI static constructors.
Formerly, they returned null.

When a new payload comes from GitHub, the NotifyNewCommitsToDiffusion job
notifies Phabricator of the new commit. But when there is no Phabricator
instance for the same door (or in the future a mapping, see T851),
the code doesn't detect this new exception thrown.

Fixes T999.

Test Plan:
Improve NotifyNewCommitsToDiffusionTest to correctly
mock Phabricator API replies, and test each scenarii.

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T999

Differential Revision: https://devcentral.nasqueron.org/D807