Skip to content

Commit e990e35

Browse files
Merge pull request #1 from Nullify-Platform/installation-id-commit-comment-issue-comment-issues-payloads
added changes for installation id struct
2 parents 5f67a8f + cb6399f commit e990e35

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Require labels to be added to a PR before merging
2+
# This is configured as a branch protection setting
3+
name: CI Require Labels
4+
on:
5+
pull_request:
6+
types: [opened, labeled, unlabeled, synchronize]
7+
merge_group:
8+
run-name: CI Require Labels ${{ github.sha }} by @${{ github.actor }}
9+
jobs:
10+
require-labels:
11+
if: ${{ github.event_name == 'pull_request' }}
12+
runs-on: ubuntu-latest
13+
outputs:
14+
status: ${{ steps.require-labels.outputs.status }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Require Labels
18+
id: require-labels
19+
uses: nullify-platform/github-actions/actions/require-labels@main

github/payload.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,9 @@ type CommitCommentPayload struct {
533533
Type string `json:"type"`
534534
SiteAdmin bool `json:"site_admin"`
535535
} `json:"sender"`
536+
Installation struct {
537+
ID int64 `json:"id"`
538+
} `json:"installation"`
536539
}
537540

538541
// CreatePayload contains the information for GitHub's create hook event
@@ -2117,6 +2120,9 @@ type IssueCommentPayload struct {
21172120
Type string `json:"type"`
21182121
SiteAdmin bool `json:"site_admin"`
21192122
} `json:"sender"`
2123+
Installation struct {
2124+
ID int64 `json:"id"`
2125+
} `json:"installation"`
21202126
}
21212127

21222128
// IssuesPayload contains the information for GitHub's issues hook event
@@ -2289,8 +2295,11 @@ type IssuesPayload struct {
22892295
Type string `json:"type"`
22902296
SiteAdmin bool `json:"site_admin"`
22912297
} `json:"sender"`
2292-
Assignee *Assignee `json:"assignee"`
2293-
Label *Label `json:"label"`
2298+
Assignee *Assignee `json:"assignee"`
2299+
Label *Label `json:"label"`
2300+
Installation struct {
2301+
ID int64 `json:"id"`
2302+
} `json:"installation"`
22942303
}
22952304

22962305
// LabelPayload contains the information for GitHub's label hook event

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/go-playground/webhooks/v6
1+
module github.com/nullify-platform/webhooks
22

33
go 1.15
44

0 commit comments

Comments
 (0)