Skip to content

Draft: Create Projects::DeployTokens::RevokeService

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.

What does this MR do and why?

This MR is a preparation for !170421

Until now, there was no RevokeService for project deploy tokens, only for group deploy tokens.

In order to be able to revoke deploy tokens with the new Admin Token Revoke API, we also need to support project deploy tokens. Right now, only group deploy tokens can be revoked using the API. This would be rather confusing, so this MR adds a RevokeService for projects as well.

Issue: #499958

🛠 with at Siemens

MR acceptance checklist

MR Checklist ( @nwittstruck)

How to set up and validate locally

This MR uses the new Projects::DeployTokens::RevokeService to revoke the deploy tokens, instead of just doing it in the controller. Therefore, you can test that the existing behaviour still works by creating and revoking a new project token:

  1. Create a project deploy token
  2. Revoke the project deploy token

Related to #499958

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading