Page MenuHomePhabricator

Include project slugs in the results of a `project.query` Conduit call.
ClosedPublic

Authored by joshuaspence on Jun 18 2014, 6:42 AM.
Tags
None
Referenced Files
F15484474: D9619.diff
Wed, Apr 9, 6:27 PM
F15461814: D9619.id23274.diff
Tue, Apr 1, 11:28 AM
F15461296: D9619.id23301.diff
Tue, Apr 1, 7:06 AM
F15461164: D9619.id.diff
Tue, Apr 1, 5:51 AM
F15461106: D9619.id23300.diff
Tue, Apr 1, 5:17 AM
F15460143: D9619.diff
Mon, Mar 31, 8:36 PM
F15458345: D9619.id23063.diff
Sun, Mar 30, 11:10 PM
F15447718: D9619.id23274.diff
Fri, Mar 28, 1:15 AM
Subscribers

Details

Summary

Ref T4418. This feature will be used by D9457 to determine whether the specified slugs exist.

Test Plan

Made a conduit call with arc:

> echo '{"slugs": ["foo"]}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit project.query
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"data":{"PHID-PROJ-ttomlhslujpx5sdpbu2c":{"id":"1","phid":"PHID-PROJ-ttomlhslujpx5sdpbu2c","name":"Foo","members":["PHID-USER-cb5af6p4oepy5tlgqypi"],"slugs":["foo","bar"],"dateCreated":"1402422720","dateModified":"1402422728"}},"slugMap":{"foo":"PHID-PROJ-ttomlhslujpx5sdpbu2c"},"cursor":{"limit":100,"after":null,"before":null}}}

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Include project slugs in the results of a `project.query` Conduit call..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 18 2014, 12:11 PM
joshuaspence edited edge metadata.
  • Nest data returned from project.query into 'data' subkey.
  • Paginate results.
  • Add a slug map
  • Need slugs
  • Fix slugMap
  • Fix slugs return value
  • Fix slug map.
joshuaspence edited edge metadata.

I've updated this diff to reflect D9457#25.

Example output

> echo '{"slugs": ["foo"]}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit project.query
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"data":{"PHID-PROJ-ttomlhslujpx5sdpbu2c":{"id":"1","phid":"PHID-PROJ-ttomlhslujpx5sdpbu2c","name":"Foo","members":["PHID-USER-cb5af6p4oepy5tlgqypi"],"slugs":["foo","bar"],"dateCreated":"1402422720","dateModified":"1402422728"}},"slugMap":{"foo":"1"},"cursor":{"limit":100,"after":null,"before":null}}}
epriestley edited edge metadata.

We can fix the map construction later, I think we should be normalizing slugs here anyway (so "DiFfuSIon" matches "diffusion").

src/applications/project/conduit/ConduitAPI_project_query_Method.php
95

This should probably be phid, given that $projects ends up keyed by PHID?

This revision is now accepted and ready to land.Jun 23 2014, 11:25 PM
joshuaspence edited edge metadata.
  • Map project PHID instead of project ID.
  • Add a TODO
joshuaspence updated this revision to Diff 23301.

Closed by commit rP396433672237 (authored by @joshuaspence).