Skip to content

Commit c8c34d0

Browse files
authored
Add old_name field to AuditEntry (#2843)
Fixes: #2844.
1 parent 098e698 commit c8c34d0

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/orgs_audit_log.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ type AuditEntry struct {
7878
Message *string `json:"message,omitempty"`
7979
Name *string `json:"name,omitempty"`
8080
OAuthApplicationID *int64 `json:"oauth_application_id,omitempty"`
81+
OldName *string `json:"old_name,omitempty"` // The previous name of the repository, for a name change
8182
OldUser *string `json:"old_user,omitempty"`
8283
OldPermission *string `json:"old_permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
8384
OpenSSHPublicKey *string `json:"openssh_public_key,omitempty"`

github/orgs_audit_log_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ func TestAuditEntry_Marshal(t *testing.T) {
256256
LimitedAvailability: Bool(false),
257257
Message: String("m"),
258258
Name: String("n"),
259+
OldName: String("on"),
259260
OldPermission: String("op"),
260261
OldUser: String("ou"),
261262
OpenSSHPublicKey: String("osshpk"),
@@ -345,6 +346,7 @@ func TestAuditEntry_Marshal(t *testing.T) {
345346
"limited_availability": false,
346347
"message": "m",
347348
"name": "n",
349+
"old_name": "on",
348350
"old_permission": "op",
349351
"old_user": "ou",
350352
"openssh_public_key": "osshpk",

0 commit comments

Comments
 (0)