@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Expose "isDraft" and "holdAsDraft" revision properties over Conduit

Summary:
Ref T13195. See PHI861. The "+ Draft" flag is not currently exposed over the API, but seems stable enough to expose.

Also expose the "hold as draft" flag, normally `arc diff --draft`.

Today, you can get "+ Draft" with some other state by:

- abandoning a draft revision ("Abandoned + Draft"); or
- using `arc diff --plan-changes` with an older `arc` version ("Changes Planned + Draft").

Test Plan: Called `differential.revision.search` via Conduit and got sensible-looking results for revisions in various states.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13195

Differential Revision: https://secure.phabricator.com/D19648

+16
+16
src/applications/differential/storage/DifferentialRevision.php
··· 1152 1152 ->setKey('testPlan') 1153 1153 ->setType('string') 1154 1154 ->setDescription(pht('Revision test plan.')), 1155 + id(new PhabricatorConduitSearchFieldSpecification()) 1156 + ->setKey('isDraft') 1157 + ->setType('bool') 1158 + ->setDescription( 1159 + pht( 1160 + 'True if this revision is in any draft state, and thus not '. 1161 + 'notifying reviewers and subscribers about changes.')), 1162 + id(new PhabricatorConduitSearchFieldSpecification()) 1163 + ->setKey('holdAsDraft') 1164 + ->setType('bool') 1165 + ->setDescription( 1166 + pht( 1167 + 'True if this revision is being held as a draft. It will not be '. 1168 + 'automatically submitted for review even if tests pass.')), 1155 1169 ); 1156 1170 } 1157 1171 ··· 1172 1186 'diffPHID' => $this->getActiveDiffPHID(), 1173 1187 'summary' => $this->getSummary(), 1174 1188 'testPlan' => $this->getTestPlan(), 1189 + 'isDraft' => !$this->getShouldBroadcast(), 1190 + 'holdAsDraft' => (bool)$this->getHoldAsDraft(), 1175 1191 ); 1176 1192 } 1177 1193