Fix breakage from vendor-update
This commit is contained in:
parent
dad806d3ea
commit
42ec5ce740
7 changed files with 11 additions and 11 deletions
|
@ -173,9 +173,9 @@ func (issue *Issue) HTMLURL() string {
|
|||
// State returns string representation of issue status.
|
||||
func (issue *Issue) State() api.StateType {
|
||||
if issue.IsClosed {
|
||||
return api.STATE_CLOSED
|
||||
return api.StateClosed
|
||||
}
|
||||
return api.STATE_OPEN
|
||||
return api.StateOpen
|
||||
}
|
||||
|
||||
// APIFormat assumes some fields assigned with values:
|
||||
|
@ -483,7 +483,7 @@ func (issue *Issue) ChangeStatus(doer *User, repo *Repository, isClosed bool) (e
|
|||
if isClosed {
|
||||
apiPullRequest.Action = api.HookIssueClosed
|
||||
} else {
|
||||
apiPullRequest.Action = api.HookIssueReopened
|
||||
apiPullRequest.Action = api.HookIssueReOpened
|
||||
}
|
||||
err = PrepareWebhooks(repo, HookEventPullRequest, apiPullRequest)
|
||||
}
|
||||
|
@ -1409,9 +1409,9 @@ func (m *Milestone) AfterSet(colName string, _ xorm.Cell) {
|
|||
// State returns string representation of milestone status.
|
||||
func (m *Milestone) State() api.StateType {
|
||||
if m.IsClosed {
|
||||
return api.STATE_CLOSED
|
||||
return api.StateClosed
|
||||
}
|
||||
return api.STATE_OPEN
|
||||
return api.StateOpen
|
||||
}
|
||||
|
||||
// APIFormat returns this Milestone in API format.
|
||||
|
|
|
@ -139,7 +139,7 @@ func (pr *PullRequest) APIFormat() *api.PullRequest {
|
|||
|
||||
if pr.Status != PullRequestStatusChecking {
|
||||
mergeable := pr.Status != PullRequestStatusConflict
|
||||
apiPullRequest.Mergeable = &mergeable
|
||||
apiPullRequest.Mergeable = mergeable
|
||||
}
|
||||
if pr.HasMerged {
|
||||
apiPullRequest.Merged = &pr.Merged
|
||||
|
|
|
@ -174,7 +174,7 @@ func (u *User) APIFormat() *api.User {
|
|||
UserName: u.Name,
|
||||
FullName: u.FullName,
|
||||
Email: u.Email,
|
||||
AvatarUrl: u.AvatarLink(),
|
||||
AvatarURL: u.AvatarLink(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ func getSlackPullRequestPayload(p *api.PullRequestPayload, slack *SlackMeta) (*S
|
|||
} else {
|
||||
text = fmt.Sprintf("[%s] Pull request closed: %s by %s", p.Repository.FullName, titleLink, senderLink)
|
||||
}
|
||||
case api.HookIssueReopened:
|
||||
case api.HookIssueReOpened:
|
||||
text = fmt.Sprintf("[%s] Pull request re-opened: %s by %s", p.Repository.FullName, titleLink, senderLink)
|
||||
case api.HookIssueEdited:
|
||||
text = fmt.Sprintf("[%s] Pull request edited: %s by %s", p.Repository.FullName, titleLink, senderLink)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue