Skip to content

Commit 507b9ec

Browse files
committed
Expose Revoked and Expired field for Deploy Tokens
1 parent 83608f7 commit 507b9ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

deploy_tokens.go

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ type DeployToken struct {
3636
Name string `json:"name"`
3737
Username string `json:"username"`
3838
ExpiresAt *time.Time `json:"expires_at"`
39+
Expired bool `json:"expired"`
40+
Revoked bool `json:"revoked"`
3941
Token string `json:"token,omitempty"`
4042
Scopes []string `json:"scopes"`
4143
}

deploy_tokens_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ func TestListAllDeployTokens(t *testing.T) {
3939
"scopes": [
4040
"read_repository",
4141
"read_registry"
42-
]
42+
],
43+
"expired": true,
44+
"revoked": true
4345
}
4446
]
4547
`)
@@ -62,6 +64,8 @@ func TestListAllDeployTokens(t *testing.T) {
6264
"read_repository",
6365
"read_registry",
6466
},
67+
Expired: true,
68+
Revoked: true,
6569
},
6670
}
6771

0 commit comments

Comments
 (0)