1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Provide revision parent/child edges in edge.search, and more information in differential.revision.search

Summary: See PHI195. This bulks out these API methods since all the requests are pretty straightforward.

Test Plan: Ran `edge.search` and `differential.revision.search`.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18762
This commit is contained in:
epriestley 2017-11-06 10:38:43 -08:00
parent cb98b60033
commit cc865e549b
3 changed files with 42 additions and 0 deletions

View file

@ -13,6 +13,20 @@ final class DifferentialRevisionDependedOnByRevisionEdgeType
return true; return true;
} }
public function getConduitKey() {
return 'revision.child';
}
public function getConduitName() {
return pht('Revision Has Child');
}
public function getConduitDescription() {
return pht(
'The source revision makes changes required by the destination '.
'revision.');
}
public function getTransactionAddString( public function getTransactionAddString(
$actor, $actor,
$add_count, $add_count,

View file

@ -17,6 +17,19 @@ final class DifferentialRevisionDependsOnRevisionEdgeType
return true; return true;
} }
public function getConduitKey() {
return 'revision.parent';
}
public function getConduitName() {
return pht('Revision Has Parent');
}
public function getConduitDescription() {
return pht(
'The source revision depends on changes in the destination revision.');
}
public function getTransactionAddString( public function getTransactionAddString(
$actor, $actor,
$add_count, $add_count,

View file

@ -986,6 +986,18 @@ final class DifferentialRevision extends DifferentialDAO
->setKey('status') ->setKey('status')
->setType('map<string, wild>') ->setType('map<string, wild>')
->setDescription(pht('Information about revision status.')), ->setDescription(pht('Information about revision status.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('repositoryPHID')
->setType('phid?')
->setDescription(pht('Revision repository PHID.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('diffPHID')
->setType('phid')
->setDescription(pht('Active diff PHID.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('summary')
->setType('string')
->setDescription(pht('Revision summary.')),
); );
} }
@ -1002,6 +1014,9 @@ final class DifferentialRevision extends DifferentialDAO
'title' => $this->getTitle(), 'title' => $this->getTitle(),
'authorPHID' => $this->getAuthorPHID(), 'authorPHID' => $this->getAuthorPHID(),
'status' => $status_info, 'status' => $status_info,
'repositoryPHID' => $this->getRepositoryPHID(),
'diffPHID' => $this->getActiveDiffPHID(),
'summary' => $this->getSummary(),
); );
} }