protected function publishFeedStory()
Actually publish the feed story. Subclasses will generally make API calls to publish some version of the story into external systems.
Publish stories into Asana using the Asana 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 an Asana workspace ID is configured with asana.workspace-id.
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 getWorkspaceID()
wild |
private function getProvider()
wild |
private function getAsanaTaskData($object)
$object |
wild |
private function getAsanaSubtaskData($object)
$object |
wild |
private function getSynchronizationWarning()
wild |
private function lookupAsanaUserIDs($all_phids)
$all_phids |
wild |
private function findAnyValidAsanaAccessToken($user_phids)
array | $user_phids |
wild |
private function makeAsanaAPICall($token, $action, $method, $params)
$token | ||
$action | ||
$method | ||
array | $params |
wild |
private function newRefFromResult($type, $result)
$type | ||
$result |
wild |
private function addFollowers($oauth_token, $task_id, $followers, $silent)
$oauth_token | ||
$task_id | ||
array | $followers | |
$silent |
wild |
private function getAsanaProjectIDs()
wild |
private function addProjects($oauth_token, $task_id, $project_ids)
$oauth_token | ||
$task_id | ||
array | $project_ids |
wild |