Page MenuHomePhabricator

support phids in repository.query
Changes PlannedPublic

Authored by cburroughs on Aug 18 2014, 6:04 PM.
Tags
None
Referenced Files
F12819978: D10289.id25777.diff
Thu, Mar 28, 5:57 AM
Unknown Object (File)
Sun, Mar 10, 3:38 AM
Unknown Object (File)
Mon, Mar 4, 3:47 PM
Unknown Object (File)
Mon, Mar 4, 2:28 PM
Unknown Object (File)
Fri, Mar 1, 1:10 PM
Unknown Object (File)
Feb 27 2024, 1:41 PM
Unknown Object (File)
Feb 13 2024, 11:21 AM
Unknown Object (File)
Feb 8 2024, 12:12 PM

Details

Summary

Return project phids when making repository.query calls. This allows
conduit clients to access the repo<-->project mapping. Also allow
querying by project phids for symmetry.

Calling needProjectPHIDs on every needProjectPHIDs may make them more
expensive but this method is already marked as unstable and adding
some new repoistory.query.withprojects method sounds ugly and
complicated.

Test Plan
  • Use a phabricator instance where some repos have projects
  • Query for a repo by callsign, observe projects array has something that looks like a phid
  • Query project.query with the phid to make sure it's something valid
  • Query for a repo by project, should return only repos with that project
  • Query for a repo with no projects, observe a nice empty projects array.

Diff Detail

Repository
rP Phabricator
Branch
conduit-repo-project
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6789
Build 6811: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

cburroughs retitled this revision from to support phids in repository.query.
cburroughs updated this object.
cburroughs edited the test plan for this revision. (Show Details)
cburroughs edited edge metadata.
  • new arc lint fixes
epriestley added a reviewer: epriestley.

This should wait for T7715 and rebuild on top of ApplicationSearch-based Conduit query methods.

This revision now requires changes to proceed.May 17 2015, 2:44 PM

Just keeping patch stack up to date.

dereckson added inline comments.
src/applications/repository/storage/PhabricatorRepository.php
144

This won't work when the public toDictionary() method is called without needProjectsPHIDs(true) before.