Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
adding topics to push event repo struct
  • Loading branch information
ecrupper committed Apr 7, 2023
commit 733c09b36d0c2c9b0b262b6bf7c5d025aff50455
1 change: 1 addition & 0 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ type PushEventRepository struct {
SSHURL *string `json:"ssh_url,omitempty"`
CloneURL *string `json:"clone_url,omitempty"`
SVNURL *string `json:"svn_url,omitempty"`
Topics []string `json:"topics,omitempty"`
}

// PushEventRepoOwner is a basic representation of user/org in a PushEvent payload.
Expand Down
7 changes: 6 additions & 1 deletion github/event_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12271,6 +12271,7 @@ func TestPushEventRepository_Marshal(t *testing.T) {
SSHURL: String("s"),
CloneURL: String("c"),
SVNURL: String("s"),
Topics: []string{"octocat", "api"},
}

want := `{
Expand Down Expand Up @@ -12325,7 +12326,11 @@ func TestPushEventRepository_Marshal(t *testing.T) {
"git_url": "g",
"ssh_url": "s",
"clone_url": "c",
"svn_url": "s"
"svn_url": "s",
"topics": [
"octocat",
"api"
]
}`

testJSONMarshal(t, u, want)
Expand Down