Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
invliD committed Feb 24, 2024
1 parent 3a54c6f commit 9fa95dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions services/migrations/gitea_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,15 @@ func (g *GiteaLocalUploader) CreateComments(comments ...*base.Comment) error {
}
case issues_model.CommentTypeChangeTitle:
if comment.Meta["OldTitle"] != nil {
cm.OldTitle = fmt.Sprintf("%s", comment.Meta["OldTitle"])
cm.OldTitle = fmt.Sprint(comment.Meta["OldTitle"])
}
if comment.Meta["NewTitle"] != nil {
cm.NewTitle = fmt.Sprintf("%s", comment.Meta["NewTitle"])
cm.NewTitle = fmt.Sprint(comment.Meta["NewTitle"])
}
case issues_model.CommentTypeChangeTargetBranch:
if comment.Meta["OldRef"] != nil && comment.Meta["NewRef"] != nil {
cm.OldRef = fmt.Sprintf("%s", comment.Meta["OldRef"])
cm.NewRef = fmt.Sprintf("%s", comment.Meta["NewRef"])
cm.OldRef = fmt.Sprint(comment.Meta["OldRef"])
cm.NewRef = fmt.Sprint(comment.Meta["NewRef"])
cm.Content = ""
}
case issues_model.CommentTypePRScheduledToAutoMerge, issues_model.CommentTypePRUnScheduledToAutoMerge:
Expand Down
6 changes: 2 additions & 4 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@
{{else if eq .Type 22}}
<div class="timeline-item-group" id="{{.HashTag}}">
<div class="timeline-item event">
{{if .OriginalAuthor}}
{{else}}
{{if not .OriginalAuthor}}
{{/* Some timeline avatars need a offset to correctly align with their speech
bubble. The condition depends on review type and for positive reviews whether
there is a comment element or not */}}
Expand Down Expand Up @@ -495,8 +494,7 @@
{{else if eq .Type 25}}
<div class="timeline-item event">
<span class="badge">{{svg "octicon-git-branch"}}</span>
{{if .OriginalAuthor}}
{{else}}
{{if not .OriginalAuthor}}
{{template "shared/user/avatarlink" dict "user" .Poster}}
{{end}}
<span class="text grey muted-links">
Expand Down

0 comments on commit 9fa95dd

Please sign in to comment.