Skip to content

Commit

Permalink
attempt issue ID parsing from pull request section
Browse files Browse the repository at this point in the history
  • Loading branch information
bivas committed Jul 12, 2017
1 parent a49a1fa commit 0ab6cc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bot/connector/github/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ func (builder *eventDataBuilder) readPayload(context *builderContext, r *http.Re
}

func (builder *eventDataBuilder) readFromJson(context *builderContext, payload *payload) {
context.data.number = payload.Number
if payload.PullRequest.Number > 0 {
context.data.number = payload.PullRequest.Number
} else {
context.data.number = payload.Number
}
context.data.title = payload.PullRequest.Title
context.data.changedFiles = payload.PullRequest.ChangedFiles
context.data.additions = payload.PullRequest.Additions
Expand Down
1 change: 1 addition & 0 deletions bot/connector/github/json.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package github

type pullRequestSection struct {
Number int `json:"number"`
State string `json:"state"`
Title string `json:"title"`
Commits int `json:"commits"`
Expand Down

0 comments on commit 0ab6cc0

Please sign in to comment.