Page MenuHomePhabricator

Move project slug normalization inside project Query

Authored by epriestley on Dec 27 2015, 10:32 AM.



Ref T10010. We currently require withSlugs() to have properly formatted slugs, but this leads to similar code in several places.

Instead: accept any slug, normalize slugs in the query, return a map so callers can figure out what happened if they want.

This tends to do the right thing by default, while keeping enough information around to do more complex things if necessary. A similar approach for querying commits has worked well in Diffusion.

Test Plan

Added and executed unit tests.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley retitled this revision from to Move project slug normalization inside project Query.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad accepted this revision.Dec 27 2015, 4:23 PM
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 27 2015, 4:23 PM
This revision was automatically updated to reflect the committed changes.