Skip to content

Commit f897b2c

Browse files
authored
Add OldLogin field to AuditEntryData (#2850)
Relates to: #2843.
1 parent 44d09ce commit f897b2c

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ type AuditEntry struct {
127127

128128
// AuditEntryData represents additional information stuffed into a `data` field.
129129
type AuditEntryData struct {
130-
OldName *string `json:"old_name,omitempty"` // The previous name of the repository, for a name change
130+
OldName *string `json:"old_name,omitempty"` // The previous name of the repository, for a name change
131+
OldLogin *string `json:"old_login,omitempty"` // The previous name of the organization, for a name change
131132
}
132133

133134
// GetAuditLog gets the audit-log entries for an organization.

github/orgs_audit_log_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ func TestAuditEntry_Marshal(t *testing.T) {
300300
WorkflowID: Int64(1),
301301
WorkflowRunID: Int64(1),
302302
Data: &AuditEntryData{
303-
OldName: String("on"),
303+
OldName: String("on"),
304+
OldLogin: String("ol"),
304305
},
305306
}
306307

@@ -396,7 +397,8 @@ func TestAuditEntry_Marshal(t *testing.T) {
396397
"workflow_id": 1,
397398
"workflow_run_id": 1,
398399
"data": {
399-
"old_name": "on"
400+
"old_name": "on",
401+
"old_login": "ol"
400402
}
401403
}`
402404

0 commit comments

Comments
 (0)