Skip to content

Commit 42ec5ce

Browse files
committed
Fix breakage from vendor-update
1 parent dad806d commit 42ec5ce

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

models/issue.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ func (issue *Issue) HTMLURL() string {
173173
// State returns string representation of issue status.
174174
func (issue *Issue) State() api.StateType {
175175
if issue.IsClosed {
176-
return api.STATE_CLOSED
176+
return api.StateClosed
177177
}
178-
return api.STATE_OPEN
178+
return api.StateOpen
179179
}
180180

181181
// APIFormat assumes some fields assigned with values:
@@ -483,7 +483,7 @@ func (issue *Issue) ChangeStatus(doer *User, repo *Repository, isClosed bool) (e
483483
if isClosed {
484484
apiPullRequest.Action = api.HookIssueClosed
485485
} else {
486-
apiPullRequest.Action = api.HookIssueReopened
486+
apiPullRequest.Action = api.HookIssueReOpened
487487
}
488488
err = PrepareWebhooks(repo, HookEventPullRequest, apiPullRequest)
489489
}
@@ -1409,9 +1409,9 @@ func (m *Milestone) AfterSet(colName string, _ xorm.Cell) {
14091409
// State returns string representation of milestone status.
14101410
func (m *Milestone) State() api.StateType {
14111411
if m.IsClosed {
1412-
return api.STATE_CLOSED
1412+
return api.StateClosed
14131413
}
1414-
return api.STATE_OPEN
1414+
return api.StateOpen
14151415
}
14161416

14171417
// APIFormat returns this Milestone in API format.

models/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (pr *PullRequest) APIFormat() *api.PullRequest {
139139

140140
if pr.Status != PullRequestStatusChecking {
141141
mergeable := pr.Status != PullRequestStatusConflict
142-
apiPullRequest.Mergeable = &mergeable
142+
apiPullRequest.Mergeable = mergeable
143143
}
144144
if pr.HasMerged {
145145
apiPullRequest.Merged = &pr.Merged

models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (u *User) APIFormat() *api.User {
174174
UserName: u.Name,
175175
FullName: u.FullName,
176176
Email: u.Email,
177-
AvatarUrl: u.AvatarLink(),
177+
AvatarURL: u.AvatarLink(),
178178
}
179179
}
180180

models/webhook_slack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func getSlackPullRequestPayload(p *api.PullRequestPayload, slack *SlackMeta) (*S
157157
} else {
158158
text = fmt.Sprintf("[%s] Pull request closed: %s by %s", p.Repository.FullName, titleLink, senderLink)
159159
}
160-
case api.HookIssueReopened:
160+
case api.HookIssueReOpened:
161161
text = fmt.Sprintf("[%s] Pull request re-opened: %s by %s", p.Repository.FullName, titleLink, senderLink)
162162
case api.HookIssueEdited:
163163
text = fmt.Sprintf("[%s] Pull request edited: %s by %s", p.Repository.FullName, titleLink, senderLink)

routers/api/v1/convert/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func ToDeployKey(apiLink string, key *models.DeployKey) *api.DeployKey {
115115
func ToOrganization(org *models.User) *api.Organization {
116116
return &api.Organization{
117117
ID: org.ID,
118-
AvatarUrl: org.AvatarLink(),
118+
AvatarURL: org.AvatarLink(),
119119
UserName: org.Name,
120120
FullName: org.FullName,
121121
Description: org.Description,

routers/api/v1/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
165165
return
166166
}
167167
if form.State != nil {
168-
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, api.STATE_CLOSED == api.StateType(*form.State)); err != nil {
168+
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, api.StateClosed == api.StateType(*form.State)); err != nil {
169169
ctx.Error(500, "ChangeStatus", err)
170170
return
171171
}

routers/api/v1/user/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func Search(ctx *context.APIContext) {
3838
results[i] = &api.User{
3939
ID: users[i].ID,
4040
UserName: users[i].Name,
41-
AvatarUrl: users[i].AvatarLink(),
41+
AvatarURL: users[i].AvatarLink(),
4242
FullName: users[i].FullName,
4343
}
4444
if ctx.IsSigned {

0 commit comments

Comments
 (0)