DELETE /projects/:id/deploy_tokens/:token_id doesn't remove the token from GET /deploy_tokens
Removing a project deploy token using DELETE /projects/:id/deploy_tokens/:token_id
removes this token from GET /projects/:id/deploy_tokens
but doesn't remove it from GET /deploy_tokens
Is this the desired behaviour ?
If yes, how can we remove it from GET /deploy_tokens
?
I note that the token becomes invalid (at least for a project read_repository token)
I didn't test for group deploy tokens.
EDIT:
The behaviour is the same when I delete a project deploy token using the UI.
The token is revoked, but it still exists in the BD, and GET /deploy_tokens
returns it. The problem is that the response doesn't mark the token as revoked and that can be confusing.
And how can we clean those revoked rows from the table deploy_tokens
, are they removed once they expire ? Is there a cleaning process ?