Page MenuHomePhabricator

Move project slug normalization inside project Query
ClosedPublic

Authored by epriestley on Dec 27 2015, 10:32 AM.
Tags
None
Referenced Files
F11399236: D14888.id35996.diff
Tue, Nov 29, 2:52 AM
F11399235: D14888.id35985.diff
Tue, Nov 29, 2:52 AM
F11399233: D14888.id.diff
Tue, Nov 29, 2:52 AM
Unknown Object (File)
Tue, Nov 15, 10:41 PM
Unknown Object (File)
Sat, Nov 12, 5:44 AM
Unknown Object (File)
Thu, Nov 10, 2:59 AM
Unknown Object (File)
Thu, Nov 10, 2:59 AM
Unknown Object (File)
Thu, Nov 10, 2:59 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
Branch
sub1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 9808
Build 11799: Run Core Tests
Build 11798: arc lint + arc unit