Remove redundant sprintf
This commit is contained in:
parent
264f895967
commit
0c6f56d6c0
|
|
@ -175,7 +175,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
|
|||
if form.Closed {
|
||||
if err := issue.ChangeStatus(ctx.User, ctx.Repo.Repository, true); err != nil {
|
||||
if models.IsErrDependenciesLeft(err) {
|
||||
ctx.Error(http.StatusPreconditionFailed, "", fmt.Sprintf("cannot close this issue because it still has open dependencies"))
|
||||
ctx.Error(http.StatusPreconditionFailed, "", "cannot close this issue because it still has open dependencies")
|
||||
return
|
||||
}
|
||||
ctx.Error(500, "ChangeStatus", err)
|
||||
|
|
@ -286,7 +286,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
|
|||
if form.State != nil {
|
||||
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, api.StateClosed == api.StateType(*form.State)); err != nil {
|
||||
if models.IsErrDependenciesLeft(err) {
|
||||
ctx.Error(http.StatusPreconditionFailed, "", fmt.Sprintf("cannot close this issue because it still has open dependencies"))
|
||||
ctx.Error(http.StatusPreconditionFailed, "", "cannot close this issue because it still has open dependencies")
|
||||
return
|
||||
}
|
||||
ctx.Error(500, "ChangeStatus", err)
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) {
|
|||
if form.State != nil {
|
||||
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, api.StateClosed == api.StateType(*form.State)); err != nil {
|
||||
if models.IsErrDependenciesLeft(err) {
|
||||
ctx.Error(http.StatusPreconditionFailed, "", fmt.Sprintf("cannot close this pull request because it still has open dependencies"))
|
||||
ctx.Error(http.StatusPreconditionFailed, "", "cannot close this pull request because it still has open dependencies")
|
||||
return
|
||||
}
|
||||
ctx.Error(500, "ChangeStatus", err)
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ func UpdateIssueStatus(ctx *context.Context) {
|
|||
for _, issue := range issues {
|
||||
if err := issue.ChangeStatus(ctx.User, issue.Repo, isClosed); err != nil {
|
||||
if models.IsErrDependenciesLeft(err) {
|
||||
ctx.Error(http.StatusPreconditionFailed, "", fmt.Sprintf("cannot close this issue because it still has open dependencies"))
|
||||
ctx.Error(http.StatusPreconditionFailed, "", "cannot close this issue because it still has open dependencies")
|
||||
return
|
||||
}
|
||||
ctx.ServerError("ChangeStatus", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user