fix(identity): heal transitional CL reviewers without SQL - #2168
Conversation
Match approve against github_login-keyed rows and remap them on list, resync system reviewers when a CL is updated, and use github_login in auto conversation text instead of campsite public ids.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfe9e00418
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| mega_cl_reviewer::Entity::delete_by_id(row.id) | ||
| .exec(self.get_connection()) | ||
| .await?; |
There was a problem hiding this comment.
Preserve reviewer flags when merging duplicate rows
When a CL already has a public-id reviewer row and a transitional GitHub-login row for the same person, this branch deletes the transitional row instead of merging its system_required/approved state into the row being kept. That can happen after a reviewer was manually added by public id while Cedar assignment had stored the same reviewer by GitHub login; simply loading reviewers then drops the system-required bit, so remove_reviewers no longer protects that required reviewer. Please update the kept row or otherwise preserve those fields before deleting the duplicate.
Useful? React with 👍 / 👎.
Match approve against github_login-keyed rows and remap them on list, resync system reviewers when a CL is updated, and use github_login in auto conversation text instead of campsite public ids.