diff --git a/deploy_tokens.go b/deploy_tokens.go index 351901629..07c53cc20 100644 --- a/deploy_tokens.go +++ b/deploy_tokens.go @@ -36,6 +36,8 @@ type DeployToken struct { Name string `json:"name"` Username string `json:"username"` ExpiresAt *time.Time `json:"expires_at"` + Revoked bool `json:"revoked"` + Expired bool `json:"expired"` Token string `json:"token,omitempty"` Scopes []string `json:"scopes"` } diff --git a/deploy_tokens_test.go b/deploy_tokens_test.go index f67bc36e3..01b917b09 100644 --- a/deploy_tokens_test.go +++ b/deploy_tokens_test.go @@ -36,6 +36,8 @@ func TestListAllDeployTokens(t *testing.T) { "name": "MyToken", "username": "gitlab+deploy-token-1", "expires_at": "2020-02-14T00:00:00.000Z", + "revoked": true, + "expired": true, "scopes": [ "read_repository", "read_registry" @@ -58,6 +60,8 @@ func TestListAllDeployTokens(t *testing.T) { Name: "MyToken", Username: "gitlab+deploy-token-1", ExpiresAt: &wantExpiresAt, + Revoked: true, + Expired: true, Scopes: []string{ "read_repository", "read_registry",