Page MenuHomePhabricator
Diviner Phabricator Tech Docs DoorkeeperJIRAFeedWorker

final class DoorkeeperJIRAFeedWorker
Phabricator Technical Documentation (Doorkeeper)

Publishes feed stories into JIRA, using the "JIRA Issues" field to identify linked issues.

Methods

protected function publishFeedStory()

DoorkeeperFeedWorker

Actually publish the feed story. Subclasses will generally make API calls to publish some version of the story into external systems.

DoorkeeperJIRAFeedWorker

Publishes stories into JIRA using the JIRA API.

Return
void

public function isEnabled()

DoorkeeperFeedWorker

Enable or disable the worker. Normally, this checks configuration to see if Phabricator is linked to applicable external systems.

DoorkeeperJIRAFeedWorker

This worker is enabled when a JIRA authentication provider is active.

Return
boolTrue if this worker should try to publish stories.

protected function getFeedStory()
Inherited

DoorkeeperFeedWorker

Get the PhabricatorFeedStory that should be published.

Return
PhabricatorFeedStoryThe story to publish.

protected function getViewer()
Inherited

DoorkeeperFeedWorker

Get the viewer for the act of publishing.

NOTE: Publishing currently uses the omnipotent viewer because it depends on loading external accounts. Possibly we should tailor this. See T3732. Using the actor for most operations might make more sense.
Return
PhabricatorUserViewer.

protected function getPublisher()
Inherited

DoorkeeperFeedWorker

Get the DoorkeeperFeedStoryPublisher which handles this object.

Return
DoorkeeperFeedStoryPublisherObject publisher.

protected function getStoryObject()
Inherited

DoorkeeperFeedWorker

Get the primary object the story is about, like a DifferentialRevision or ManiphestTask.

Return
objectObject which the story is about.

private function loadPublisher()
Inherited

DoorkeeperFeedWorker

Load the DoorkeeperFeedStoryPublisher which corresponds to this object. Publishers provide a common API for pushing object updates into foreign systems.

Return
DoorkeeperFeedStoryPublisherPublisher for the story's object.

final protected function doWork()
Inherited

DoorkeeperFeedWorker

Doorkeeper workers set up some context, then call publishFeedStory().

Return
wild

public function getMaximumRetryCount()
Inherited

DoorkeeperFeedWorker

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.

Return
wild

public function getWaitBeforeRetry($task)
Inherited

DoorkeeperFeedWorker

See getMaximumRetryCount() for a description of Doorkeeper retry defaults.

Parameters
PhabricatorWorkerTask$task
Return
wild

private function getProvider()

Get the active JIRA provider.

Return
PhabricatorJIRAAuthProviderActive JIRA auth provider.

private function findUsersToPossess()

Get a list of users to act as when publishing into JIRA.

Return
list<phid>Candidate user PHIDs to act as when publishing this story.

private function shouldPostComment()

This method is not documented.
Return
wild

private function shouldPostLink()

This method is not documented.
Return
wild

private function postComment($account, $jira_key)

This method is not documented.
Parameters
$account
$jira_key
Return
wild

private function renderStoryText()

This method is not documented.
Return
wild

private function postLink($account, $jira_key)

This method is not documented.
Parameters
$account
$jira_key
Return
wild