Page MenuHomePhabricator

Move project slug normalization inside project Query
ClosedPublic

Authored by epriestley on Dec 27 2015, 10:32 AM.
Tags
None
Referenced Files
F19828261: D14888.diff
Mon, Mar 9, 5:30 PM
F19549565: D14888.id35996.diff
Jan 27 2026, 10:52 AM
F19543896: D14888.diff
Jan 23 2026, 1:01 AM
F19543895: D14888.diff
Jan 23 2026, 1:01 AM
F19520642: D14888.id.diff
Jan 16 2026, 3:26 PM
F19509937: D14888.diff
Jan 11 2026, 3:10 AM
F19087284: D14888.diff
Dec 3 2025, 12:13 AM
F19048896: D14888.id35985.diff
Nov 27 2025, 3:39 PM
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