protected function publishFeedStory()
Actually publish the feed story. Subclasses will generally make API calls to publish some version of the story into external systems.
Publishes stories into JIRA using the JIRA API.
void |
public function isEnabled()
Enable or disable the worker. Normally, this checks configuration to see if Phabricator is linked to applicable external systems.
This worker is enabled when a JIRA authentication provider is active.
bool | True if this worker should try to publish stories. |
protected function getFeedStory()Inherited
Get the PhabricatorFeedStory that should be published.
PhabricatorFeedStory | The story to publish. |
protected function getViewer()Inherited
Get the viewer for the act of publishing.
PhabricatorUser | Viewer. |
protected function getPublisher()Inherited
Get the DoorkeeperFeedStoryPublisher which handles this object.
DoorkeeperFeedStoryPublisher | Object publisher. |
protected function getStoryObject()Inherited
Get the primary object the story is about, like a DifferentialRevision or ManiphestTask.
object | Object which the story is about. |
private function loadPublisher()Inherited
Load the DoorkeeperFeedStoryPublisher which corresponds to this object. Publishers provide a common API for pushing object updates into foreign systems.
DoorkeeperFeedStoryPublisher | Publisher for the story's object. |
final protected function doWork()Inherited
Doorkeeper workers set up some context, then call publishFeedStory().
wild |
public function getMaximumRetryCount()Inherited
By default, Doorkeeper workers perform a small number of retries with exponential backoff. A consideration in this policy is that many of these workers are laden with side effects.
wild |
public function getWaitBeforeRetry($task)Inherited
See getMaximumRetryCount() for a description of Doorkeeper retry defaults.
PhabricatorWorkerTask | $task |
wild |
private function getProvider()
Get the active JIRA provider.
PhabricatorJIRAAuthProvider | Active JIRA auth provider. |
private function findUsersToPossess()
Get a list of users to act as when publishing into JIRA.
list<phid> | Candidate user PHIDs to act as when publishing this story. |
private function shouldPostComment()
wild |
private function shouldPostLink()
wild |
private function postComment($account, $jira_key)
$account | ||
$jira_key |
wild |
private function renderStoryText()
wild |
private function postLink($account, $jira_key)
$account | ||
$jira_key |
wild |