Differential D12380 Diff 29771 src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php
Show All 11 Lines | final class DiffusionCreateCommentConduitAPIMethod | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Add a comment to a Diffusion commit. By specifying an action of '. | return 'Add a comment to a Diffusion commit. By specifying an action of '. | ||||
'"concern", "accept", "resign", or "close", auditing actions can '. | '"concern", "accept", "resign", or "close", auditing actions can '. | ||||
'be triggered. Defaults to "comment".'; | 'be triggered. Defaults to "comment".'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'phid' => 'required string', | 'phid' => 'required string', | ||||
'action' => 'optional string', | 'action' => 'optional string', | ||||
'message' => 'required string', | 'message' => 'required string', | ||||
'silent' => 'optional bool', | 'silent' => 'optional bool', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'bool'; | return 'bool'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_BAD_COMMIT' => 'No commit found with that PHID', | 'ERR_BAD_COMMIT' => 'No commit found with that PHID', | ||||
'ERR_BAD_ACTION' => 'Invalid action type', | 'ERR_BAD_ACTION' => 'Invalid action type', | ||||
'ERR_MISSING_MESSAGE' => 'Message is required', | 'ERR_MISSING_MESSAGE' => 'Message is required', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |