Skip to content

Commit 4fec23d

Browse files
authored
Add Topics to PushEventRepository (#2742)
Fixes: #2741.
1 parent c96ba41 commit 4fec23d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
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: 4 additions & 2 deletions
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,8 +12326,9 @@ func TestPushEventRepository_Marshal(t *testing.T) {
1232512326
"git_url": "g",
1232612327
"ssh_url": "s",
1232712328
"clone_url": "c",
12328-
"svn_url": "s"
12329-
}`
12329+
"svn_url": "s",
12330+
"topics": ["octocat","api"]
12331+
}`
1233012332

1233112333
testJSONMarshal(t, u, want)
1233212334
}

0 commit comments

Comments
 (0)