Skip to content

Commit 83f6079

Browse files
committed
fix typo
1 parent cf32df5 commit 83f6079

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

models/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) {
11711171
}
11721172

11731173
for i := 0; i < len(attachments); i++ {
1174-
if !attachments[i].IsNotAttached(){
1174+
if !attachments[i].IsNotAttached() {
11751175
log.Error("newIssue [%s]: skipping already linked attachement", attachments[i].UUID)
11761176
continue
11771177
}

models/issue_comment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,15 +604,15 @@ func sendCreateCommentAction(e *xorm.Session, opts *CreateCommentOptions, commen
604604
if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil {
605605
return err
606606
}
607-
607+
608608
// Check attachments
609609
attachments, err := getAttachmentsByUUIDs(e, opts.Attachments)
610610
if err != nil {
611611
return fmt.Errorf("getAttachmentsByUUIDs [uuids: %v]: %v", opts.Attachments, err)
612612
}
613613

614614
for i := range attachments {
615-
if !attachments[i].IsNotAttached(){
615+
if !attachments[i].IsNotAttached() {
616616
log.Error("sendCreateCommentAction [%s]: skipping already linked attachement", attachments[i].UUID)
617617
continue
618618
}

models/release.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ func createTag(gitRepo *git.Repository, rel *Release) error {
151151
func linkReleaseAttachments(releaseID int64, attachmentUUIDs []string) (err error) {
152152
// Check attachments
153153
attachments, err := GetAttachmentsByUUIDs(attachmentUUIDs)
154-
if err != nil {
155-
return fmt.Errorf("GetAttachmentsByUUIDs [uuids: %v]: %v", attachmentUUIDs, err)
156-
}
154+
if err != nil {
155+
return fmt.Errorf("GetAttachmentsByUUIDs [uuids: %v]: %v", attachmentUUIDs, err)
156+
}
157157

158158
for i := range attachments {
159-
if !attachments[i].IsNotAttached(){
159+
if !attachments[i].IsNotAttached() {
160160
log.Error("linkReleaseAttachments [%s]: skipping already linked attachement", attachments[i].UUID)
161161
continue
162162
}

routers/routes/routes.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,11 @@ func RegisterRoutes(m *macaron.Macaron) {
498498
//Check issue access
499499
if attach.IssueID != 0 {
500500
iss, err = GetIssueByID(attach.IssueID)
501-
if err != nil {{
501+
if err != nil {
502502
ctx.ServerError("GetAttachmentByUUID.GetIssueByID", err)
503503
return
504504
}
505-
if !iss.Repo.CanRead(models.UnitTypeIssues){
505+
if !iss.Repo.CanRead(models.UnitTypeIssues) {
506506
ctx.Error(403)
507507
return
508508
}
@@ -511,11 +511,11 @@ func RegisterRoutes(m *macaron.Macaron) {
511511
//Check release access
512512
if attach.ReleaseID != 0 {
513513
rel, err = GetReleaseByID(attach.ReleaseID)
514-
if err != nil {{
514+
if err != nil {
515515
ctx.ServerError("GetAttachmentByUUID.GetReleaseByID", err)
516516
return
517517
}
518-
if !rel.Repo.CanRead(models.UnitTypeReleases){
518+
if !rel.Repo.CanRead(models.UnitTypeReleases) {
519519
ctx.Error(403)
520520
return
521521
}
@@ -709,7 +709,7 @@ func RegisterRoutes(m *macaron.Macaron) {
709709
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
710710
}, context.RepoMustNotBeArchived(), reqRepoIssueReader)
711711

712-
//Should be able to create issue (a user that can create release can create issue)
712+
//Should be able to create issue (a user that can create release can create issue)
713713
m.Post("/attachments", repo.UploadAttachment, context.RepoMustNotBeArchived(), reqRepoIssueReader)
714714

715715
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest.

0 commit comments

Comments
 (0)