Page MenuHomePhabricator

Move project slug normalization inside project Query
ClosedPublic

Authored by epriestley on Dec 27 2015, 10:32 AM.
Tags
None
Referenced Files
F14053055: D14888.id35996.diff
Fri, Nov 15, 12:35 PM
F14044918: D14888.id.diff
Tue, Nov 12, 10:52 PM
F14004595: D14888.id35985.diff
Sat, Oct 26, 11:31 PM
F13997098: D14888.id35996.diff
Thu, Oct 24, 2:09 AM
F13996186: D14888.id.diff
Wed, Oct 23, 6:49 PM
F13965394: D14888.diff
Oct 16 2024, 1:46 AM
Unknown Object (File)
Oct 2 2024, 2:59 AM
Unknown Object (File)
Oct 2 2024, 2:15 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