-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Description
Problem
The github user payload has a type field which can be "User", "Bot" or "Organization".
With "User" and "Bot", we normalize these values during conversion into "user" and "bot".
However, "Organization" remains capitalized and is not changed when inserting/updating into our database. Any case where where the type is being saved as "Organization" should be saved as "organization" (lowercased).
Subtasks
- make switch in code so
"Organization"is normalized into the lowercase"organization"- in
lib/github/adapters/user.ex, the functiontransform_type/1is likely the only culprit
- in
- change any tests affected by this
- add an existing data migration, for staging and production, which changes
"Organization"to"organization"on all user records of type"Organization"
from u in User, where [type: "Organization"]
|> Repo.update_all(set: [type: "organization"])