Skip to content

Commit

Permalink
Add old_name field to AuditEntry (#2843)
Browse files Browse the repository at this point in the history
Fixes: #2844.
  • Loading branch information
lmartinking authored Jul 27, 2023
1 parent 098e698 commit c8c34d0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions github/orgs_audit_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type AuditEntry struct {
Message *string `json:"message,omitempty"`
Name *string `json:"name,omitempty"`
OAuthApplicationID *int64 `json:"oauth_application_id,omitempty"`
OldName *string `json:"old_name,omitempty"` // The previous name of the repository, for a name change
OldUser *string `json:"old_user,omitempty"`
OldPermission *string `json:"old_permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
OpenSSHPublicKey *string `json:"openssh_public_key,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions github/orgs_audit_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func TestAuditEntry_Marshal(t *testing.T) {
LimitedAvailability: Bool(false),
Message: String("m"),
Name: String("n"),
OldName: String("on"),
OldPermission: String("op"),
OldUser: String("ou"),
OpenSSHPublicKey: String("osshpk"),
Expand Down Expand Up @@ -345,6 +346,7 @@ func TestAuditEntry_Marshal(t *testing.T) {
"limited_availability": false,
"message": "m",
"name": "n",
"old_name": "on",
"old_permission": "op",
"old_user": "ou",
"openssh_public_key": "osshpk",
Expand Down

0 comments on commit c8c34d0

Please sign in to comment.