Skip to content

Derive personal org slugs from GitHub usernames - #658

Merged
codingjoe merged 1 commit into
mainfrom
codingjoe-fix-github-org-slug
Nov 18, 2026
Merged

codingjoe merged 1 commit into
mainfrom
codingjoe-fix-github-org-slug

Conversation

@codingjoe

Copy link
Copy Markdown
Member

Personal org creation used the GitHub login as the slug. Mixed case logins fail slug validation and block signup.

Changes:

  • Add OrganizationQuerySet.create_personal() to slugify the login and retry a taken slug with a numeric suffix
  • Call it from the social account adapter
  • Cover mixed case logins and taken slugs with tests

Fixes #657

GitHub logins keep their casing, so Organization.save rejected the slug. Slugify the username and suffix taken slugs.
@codingjoe
codingjoe enabled auto-merge (squash) November 18, 2026 15:02
@github-actions

Copy link
Copy Markdown

Coverage Results 📊

✅ Patch coverage is 100.00% (14 of 14 changed executable lines covered; target 80%).
Project statement coverage is 95.13%.

Changed files with executable lines (1)
File Patch coverage Changed executable lines
accounts/models.py 100.00% 14/14 covered

Generated by Coverage Action

@codingjoe
codingjoe merged commit 75fc439 into main Nov 18, 2026
12 checks passed
@codingjoe
codingjoe deleted the codingjoe-fix-github-org-slug branch November 18, 2026 15:07
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.

ValidationError: ['Enter lowercase letters, digits, and single hyphens.']

1 participant