Page MenuHomePhabricator

Move project slug normalization inside project Query
ClosedPublic

Authored by epriestley on Dec 27 2015, 10:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 6:06 PM
Unknown Object (File)
Mon, Mar 18, 7:12 PM
Unknown Object (File)
Thu, Mar 14, 4:38 PM
Unknown Object (File)
Thu, Mar 14, 3:54 PM
Unknown Object (File)
Wed, Mar 13, 4:37 PM
Unknown Object (File)
Wed, Mar 13, 4:13 PM
Unknown Object (File)
Mon, Mar 11, 5:01 PM
Unknown Object (File)
Thu, Feb 29, 6:45 AM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable