Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1662 from timofurrer/deploy-token
Browse files Browse the repository at this point in the history
Expose Revoked and Expired field for Deploy Tokens
  • Loading branch information
svanharmelen authored Mar 4, 2023
2 parents 83608f7 + 74e732f commit 1e98371
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down
4 changes: 4 additions & 0 deletions deploy_tokens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down

0 comments on commit 1e98371

Please sign in to comment.