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 #1977 from hjweddie/main
Browse files Browse the repository at this point in the history
Support more options for list PATs
  • Loading branch information
svanharmelen authored Aug 8, 2024
2 parents fb55ff5 + 94d6f83 commit 19fbf97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion personal_access_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ func (p PersonalAccessToken) String() string {
// https://docs.gitlab.com/ee/api/personal_access_tokens.html#list-personal-access-tokens
type ListPersonalAccessTokensOptions struct {
ListOptions
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
CreatedAfter *ISOTime `url:"created_after,omitempty" json:"created_after,omitempty"`
CreatedBefore *ISOTime `url:"created_before,omitempty" json:"created_before,omitempty"`
LastUsedAfter *ISOTime `url:"last_used_after,omitempty" json:"last_used_after,omitempty"`
LastUsedBefore *ISOTime `url:"last_used_before,omitempty" json:"last_used_before,omitempty"`
Revoked *bool `url:"revoked,omitempty" json:"revoked,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
State *string `url:"state,omitempty" json:"state,omitempty"`
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
}

// ListPersonalAccessTokens gets a list of all personal access tokens.
Expand Down

0 comments on commit 19fbf97

Please sign in to comment.