Skip to content

Commit 733c09b

Browse files
committed
adding topics to push event repo struct
1 parent c96ba41 commit 733c09b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

github/event_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,7 @@ type PushEventRepository struct {
10621062
SSHURL *string `json:"ssh_url,omitempty"`
10631063
CloneURL *string `json:"clone_url,omitempty"`
10641064
SVNURL *string `json:"svn_url,omitempty"`
1065+
Topics []string `json:"topics,omitempty"`
10651066
}
10661067

10671068
// PushEventRepoOwner is a basic representation of user/org in a PushEvent payload.

github/event_types_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12271,6 +12271,7 @@ func TestPushEventRepository_Marshal(t *testing.T) {
1227112271
SSHURL: String("s"),
1227212272
CloneURL: String("c"),
1227312273
SVNURL: String("s"),
12274+
Topics: []string{"octocat", "api"},
1227412275
}
1227512276

1227612277
want := `{
@@ -12325,7 +12326,11 @@ func TestPushEventRepository_Marshal(t *testing.T) {
1232512326
"git_url": "g",
1232612327
"ssh_url": "s",
1232712328
"clone_url": "c",
12328-
"svn_url": "s"
12329+
"svn_url": "s",
12330+
"topics": [
12331+
"octocat",
12332+
"api"
12333+
]
1232912334
}`
1233012335

1233112336
testJSONMarshal(t, u, want)

0 commit comments

Comments
 (0)