Skip to content

Commit

Permalink
pack PR data into a PullRequest struct for webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Nov 27, 2023
1 parent a668d28 commit b810497
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ var (
skipDirectiveMsg = "skip ci directive found in commit title/message"
)

// PullRequest defines the data pulled from PRs while
// processing a webhook.
type PullRequest struct {
Comment string
Number int
IsFork bool
}

// Webhook defines a struct that is used to return
// the required data when processing webhook event
// a for a source provider event.
type Webhook struct {
Comment string
PRNumber int
Hook *library.Hook
Repo *library.Repo
Build *library.Build
PRFork bool
Hook *library.Hook
Repo *library.Repo
Build *library.Build
PullRequest PullRequest
}

// ShouldSkip uses the build information
Expand Down

0 comments on commit b810497

Please sign in to comment.