Loading
Add GraphQL mutation to revoke import source user reassignment
What does this MR do and why?
This MR adds an importSourceUserRevoke GraphQL mutation that lets a user revoke one of their completed import source user mappings, similar to other existing source user GraphQL mutations. Before this MR, there was no way for users to revoke placeholder reassignments.
References
- Requires changes from !258267 (merged)
- Resolves #629220
- Parent issue: #478147
Screenshots or screen recordings
N/A
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:revoke_import_source_user_reassignment) - Ensure there's completed source users reassigned to your user. If you don't have any source users, import a project with contributions from one of the supported sources and reassign a user's contributions: https://docs.gitlab.com/user/import/mapping/post_migration_mapping
- As the reassigned user, revoke a completed reassignment:
mutation {
importSourceUserRevoke(input: { id: "gid://gitlab/Import::SourceUser/<id>" }) {
importSourceUser {
status
}
errors
}
}- Verify that the reassignment was successfully revoked in the UI, console, or check it's no longer in
currentUser.importSourceUsersas the reassigned user
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Sam Word