Skip to content

fix(pipeline): preserve casing when normalizing org/pipeline slugs - #986

Open
KnutZuidema wants to merge 1 commit into
buildkite:mainfrom
KnutZuidema:fix/preserve-org-slug-casing
Open

fix(pipeline): preserve casing when normalizing org/pipeline slugs#986
KnutZuidema wants to merge 1 commit into
buildkite:mainfrom
KnutZuidema:fix/preserve-org-slug-casing

Conversation

@KnutZuidema

Copy link
Copy Markdown

Description

bk pipeline view, bk pipeline copy, bk job list --pipeline, and bk artifacts list --pipeline all fail with 404 No organization found for organizations with mixed-case slugs (e.g. AcmeCorp), because normalizeSlug in internal/pipeline/resolver/cli.go lowercases org and pipeline slugs parsed from org/pipeline args, --pipeline, and --org.

This is a resurgence of #424 / #685. #686 only fixed the validation regex that rejected mixed-case slugs — it didn't touch normalizeSlug, which still forces lowercase.

Fixes #985

Changes

  • normalizeSlug no longer lowercases input; it still converts underscores to hyphens (for repo-directory-derived names like my_pipeline).
  • Updated the existing cli_test.go and resolver_test.go cases that asserted lowercasing, since mixed-case slugs are valid on Buildkite and should now be preserved.

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

I used an AI coding assistant (Claude, via the Pi agent harness) to investigate the bug, trace it to normalizeSlug, and implement this fix and the corresponding test updates. I reviewed and directed the change.

normalizeSlug lowercased org and pipeline slugs parsed from
'org/pipeline' arguments, --pipeline, and --org, causing 404s for
organizations with mixed-case slugs (e.g. AcmeCorp). This affected
'pipeline view', 'pipeline copy', 'job list --pipeline', and
'artifacts list --pipeline'.

Buildkite slugs may be mixed case, so only normalize underscores to
hyphens and leave casing untouched.

Fixes buildkite#985
@KnutZuidema
KnutZuidema requested review from a team as code owners September 11, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: pipeline view/job list/artifacts list still lowercase mixed-case org slugs (normalizeSlug), unlike PR #686

1 participant