File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,16 @@ func TestWebhooks(t *testing.T) {
483483 "X-Hub-Signature" : []string {"sha1=df442a8af41edd2d42ccdd997938d1d111b0f94e" },
484484 },
485485 },
486+ {
487+ name : "RepositoryEditedEvent" ,
488+ event : RepositoryEvent ,
489+ typ : RepositoryPayload {},
490+ filename : "../testdata/github/repository-edited.json" ,
491+ headers : http.Header {
492+ "X-Github-Event" : []string {"repository" },
493+ "X-Hub-Signature" : []string {"sha1=4edb36f8c0a8e3905e340c7af4b3af9a21d93acc" },
494+ },
495+ },
486496 {
487497 name : "RepositoryVulnerabilityAlertEvent" ,
488498 event : RepositoryVulnerabilityAlertEvent ,
Original file line number Diff line number Diff line change @@ -5431,7 +5431,29 @@ type ReleasePayload struct {
54315431
54325432// RepositoryPayload contains the information for GitHub's repository hook event
54335433type RepositoryPayload struct {
5434- Action string `json:"action"`
5434+ Action string `json:"action"`
5435+ Changes struct {
5436+ DefaultBranch struct {
5437+ From string `json:"from"`
5438+ } `json:"default_branch,omitempty"`
5439+ Description struct {
5440+ From string `json:"from"`
5441+ } `json:"description,omitempty"`
5442+ Homepage struct {
5443+ From string `json:"from"`
5444+ } `json:"homepage,omitempty"`
5445+ Topics struct {
5446+ From string `json:"from,omitempty"`
5447+ } `json:"topics,omitempty"`
5448+ Repository struct {
5449+ Name struct {
5450+ From string `json:"from"`
5451+ } `json:"name"`
5452+ } `json:"repository,omitempty"`
5453+ Owner struct {
5454+ From string `json:"from"`
5455+ } `json:"owner,omitempty"`
5456+ } `json:"changes,omitempty"`
54355457 Repository struct {
54365458 ID int64 `json:"id"`
54375459 NodeID string `json:"node_id"`
You can’t perform that action at this time.
0 commit comments