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

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:revoke_import_source_user_reassignment)
  2. 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
  3. As the reassigned user, revoke a completed reassignment:
mutation {
  importSourceUserRevoke(input: { id: "gid://gitlab/Import::SourceUser/<id>" }) {
    importSourceUser {
      status
    }
    errors
  }
}
  1. Verify that the reassignment was successfully revoked in the UI, console, or check it's no longer in currentUser.importSourceUsers as 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

Merge request reports

Loading
Loading