Page MenuHomePhabricator

support phids in repository.query
Changes PlannedPublic

Authored by cburroughs on Aug 18 2014, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 6:03 PM
Unknown Object (File)
Thu, Nov 14, 5:33 AM
Unknown Object (File)
Sat, Nov 2, 8:08 AM
Unknown Object (File)
Sat, Oct 26, 9:59 AM
Unknown Object (File)
Fri, Oct 25, 2:11 PM
Unknown Object (File)
Oct 18 2024, 7:54 AM
Unknown Object (File)
Oct 14 2024, 7:20 AM
Unknown Object (File)
Sep 22 2024, 1:15 AM

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.