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
Unknown Object (File)
Tue, Apr 16, 6:42 AM
Unknown Object (File)
Fri, Mar 29, 10:21 AM
Unknown Object (File)
Mar 19 2024, 5:52 PM
Unknown Object (File)
Mar 19 2024, 5:52 PM
Unknown Object (File)
Mar 19 2024, 5:52 PM
Unknown Object (File)
Mar 19 2024, 5:52 PM
Unknown Object (File)
Mar 19 2024, 5:52 PM
Unknown Object (File)
Mar 5 2024, 2:08 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).