Compare commits

...

9 commits

Author SHA1 Message Date
ca822c91f2 gitea.nulo.in: Use NPM cache
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-23 13:08:44 -03:00
9af3466049 gitea.nulo.in: Use APK cache 2023-01-23 13:08:44 -03:00
b167b43232 gitea.nulo.in: Use script to upgrade 2023-01-23 13:08:44 -03:00
45f01dbd71 gitea.nulo.in: Use Alpine 3.16 2023-01-23 13:08:44 -03:00
cdc222055f Add .woodpecker.yml for gitea.nulo.in 2023-01-23 13:08:44 -03:00
John Olheiser
f6cb7860a2
Changelog 1.18.3 (#22575)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-01-23 08:42:02 -06:00
Yarden Shoham
6068978c42
Prevent multiple To recipients (#22566) (#22569)
Backport #22566

Change the mailer interface to prevent the leaking of possible hidden
email addresses when sending to multiple recipients.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
2023-01-22 11:37:26 -06:00
Yarden Shoham
c320caed97
Truncate commit summary on repo files table. (#22551) (#22552)
Backport #22551
There was an unintended regression in #21124 which assumed that
.commits-list .message-wrapper would only match the commit summaries on
/{owner}/{name}/commits/*. This assumption is incorrect as the
directory/file view also uses a .commits-list wrapper.

Rather than completely restructure this page this PR simply adjusts the
styling to again use display: inline-block; for #repo-files-table
.commit-list .message-wrapper

Fix #22360
2023-01-20 23:34:52 +08:00
silverwind
f1c826ed29
Mute all links in issue timeline (#22534)
Backport of https://github.com/go-gitea/gitea/pull/22533.
https://github.com/go-gitea/gitea/pull/21799 introduced a regression
where some links in the issue timeline were not muted any more. Fix it
by replacing all `class="text grey"` with `class="text grey
muted-links"` in the file.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-01-20 00:18:58 -05:00
11 changed files with 124 additions and 69 deletions

39
.woodpecker.yml Normal file
View file

@ -0,0 +1,39 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
tags: true
pipeline:
build:
image: docker.io/alpine:3.16
commands:
- echo "172.17.0.1 alpine.proxy.coso npm.proxy.coso" >> /etc/hosts
- echo "http://alpine.proxy.coso/alpine/v3.16/main" > /etc/apk/repositories
- echo "http://alpine.proxy.coso/alpine/v3.16/community" >> /etc/apk/repositories
- apk add git nodejs npm go make rsync openssh-client-default
- npm set registry http://npm.proxy.coso
- GOOS=linux GOARCH=amd64 LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="bindata sqlite sqlite_unlock_notify" make build
- eval $(ssh-agent -s)
- echo "$${SSH_KEY}" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- echo "[nulo.in]:420,[186.136.121.7]:420 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGPkgRVWYcVcgjI0xAjDgZQsYuXU9edcya8zna01ibyUMlfKHIMD9yOoq0R+fQPTCqwiol/2tKMPJ2hlKshc+H8=" > ~/.ssh/known_hosts
# #!/bin/sh
# # Editar en https://gitea.nulo.in/Nulo/gitea si se cambia
# bin=/usr/local/bin/gitea
# new=/usr/local/bin/gitea.new
#
# rm "$new"
# cat /dev/stdin > "$new" || exit $?
# chmod +x "$new" || exit $?
# mv "$new" "$bin" || exit $?
# sv restart gitea || exit $?
- ssh -p420 ci-gitea@nulo.in doas /usr/local/sbin/instalar-gitea < gitea
when:
branch: gitea.nulo.in
event: push
secrets:
- ssh_key

View file

@ -4,6 +4,14 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io). been added to each release, please refer to the [blog](https://blog.gitea.io).
## [1.18.3](https://github.com/go-gitea/gitea/releases/tag/v1.18.3) - 2023-01-23
* SECURITY
* Prevent multiple `To` recipients (#22566) (#22569)
* BUGFIXES
* Truncate commit summary on repo files table. (#22551) (#22552)
* Mute all links in issue timeline (#22534)
## [1.18.2](https://github.com/go-gitea/gitea/releases/tag/v1.18.2) - 2023-01-19 ## [1.18.2](https://github.com/go-gitea/gitea/releases/tag/v1.18.2) - 2023-01-19
* BUGFIXES * BUGFIXES

View file

@ -81,7 +81,7 @@ func SendEmail(ctx *context.PrivateContext) {
func sendEmail(ctx *context.PrivateContext, subject, message string, to []string) { func sendEmail(ctx *context.PrivateContext, subject, message string, to []string) {
for _, email := range to { for _, email := range to {
msg := mailer.NewMessage([]string{email}, subject, message) msg := mailer.NewMessage(email, subject, message)
mailer.SendAsync(msg) mailer.SendAsync(msg)
} }

View file

@ -61,7 +61,7 @@ func SendTestMail(email string) error {
// No mail service configured // No mail service configured
return nil return nil
} }
return gomail.Send(Sender, NewMessage([]string{email}, "Gitea Test Email!", "Gitea Test Email!").ToMessage()) return gomail.Send(Sender, NewMessage(email, "Gitea Test Email!", "Gitea Test Email!").ToMessage())
} }
// sendUserMail sends a mail to the user // sendUserMail sends a mail to the user
@ -86,7 +86,7 @@ func sendUserMail(language string, u *user_model.User, tpl base.TplName, code, s
return return
} }
msg := NewMessage([]string{u.Email}, subject, content.String()) msg := NewMessage(u.Email, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, %s", u.ID, info) msg.Info = fmt.Sprintf("UID: %d, %s", u.ID, info)
SendAsync(msg) SendAsync(msg)
@ -137,7 +137,7 @@ func SendActivateEmailMail(u *user_model.User, email *user_model.EmailAddress) {
return return
} }
msg := NewMessage([]string{email.Email}, locale.Tr("mail.activate_email"), content.String()) msg := NewMessage(email.Email, locale.Tr("mail.activate_email"), content.String())
msg.Info = fmt.Sprintf("UID: %d, activate email", u.ID) msg.Info = fmt.Sprintf("UID: %d, activate email", u.ID)
SendAsync(msg) SendAsync(msg)
@ -168,7 +168,7 @@ func SendRegisterNotifyMail(u *user_model.User) {
return return
} }
msg := NewMessage([]string{u.Email}, locale.Tr("mail.register_notify"), content.String()) msg := NewMessage(u.Email, locale.Tr("mail.register_notify"), content.String())
msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID) msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID)
SendAsync(msg) SendAsync(msg)
@ -202,7 +202,7 @@ func SendCollaboratorMail(u, doer *user_model.User, repo *repo_model.Repository)
return return
} }
msg := NewMessage([]string{u.Email}, subject, content.String()) msg := NewMessage(u.Email, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, add collaborator", u.ID) msg.Info = fmt.Sprintf("UID: %d, add collaborator", u.ID)
SendAsync(msg) SendAsync(msg)
@ -306,7 +306,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient
msgs := make([]*Message, 0, len(recipients)) msgs := make([]*Message, 0, len(recipients))
for _, recipient := range recipients { for _, recipient := range recipients {
msg := NewMessageFrom([]string{recipient.Email}, ctx.Doer.DisplayName(), setting.MailService.FromEmail, subject, mailBody.String()) msg := NewMessageFrom(recipient.Email, ctx.Doer.DisplayName(), setting.MailService.FromEmail, subject, mailBody.String())
msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info) msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info)
msg.SetHeader("Message-ID", "<"+msgID+">") msg.SetHeader("Message-ID", "<"+msgID+">")

View file

@ -90,7 +90,7 @@ func mailNewRelease(ctx context.Context, lang string, tos []string, rel *repo_mo
publisherName := rel.Publisher.DisplayName() publisherName := rel.Publisher.DisplayName()
relURL := "<" + rel.HTMLURL() + ">" relURL := "<" + rel.HTMLURL() + ">"
for _, to := range tos { for _, to := range tos {
msg := NewMessageFrom([]string{to}, publisherName, setting.MailService.FromEmail, subject, mailBody.String()) msg := NewMessageFrom(to, publisherName, setting.MailService.FromEmail, subject, mailBody.String())
msg.Info = subject msg.Info = subject
msg.SetHeader("Message-ID", relURL) msg.SetHeader("Message-ID", relURL)
msgs = append(msgs, msg) msgs = append(msgs, msg)

View file

@ -83,9 +83,12 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *user_model.U
return err return err
} }
msg := NewMessage(emails, subject, content.String()) for _, to := range emails {
msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID) msg := NewMessage(to, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID)
SendAsync(msg)
}
SendAsync(msg)
return nil return nil
} }

View file

@ -53,7 +53,7 @@ func MailTeamInvite(ctx context.Context, inviter *user_model.User, team *org_mod
return err return err
} }
msg := NewMessage([]string{invite.Email}, subject, mailBody.String()) msg := NewMessage(invite.Email, subject, mailBody.String())
msg.Info = subject msg.Info = subject
SendAsync(msg) SendAsync(msg)

View file

@ -36,7 +36,7 @@ type Message struct {
Info string // Message information for log purpose. Info string // Message information for log purpose.
FromAddress string FromAddress string
FromDisplayName string FromDisplayName string
To []string To string // Use only one recipient to prevent leaking of addresses
Subject string Subject string
Date time.Time Date time.Time
Body string Body string
@ -47,7 +47,7 @@ type Message struct {
func (m *Message) ToMessage() *gomail.Message { func (m *Message) ToMessage() *gomail.Message {
msg := gomail.NewMessage() msg := gomail.NewMessage()
msg.SetAddressHeader("From", m.FromAddress, m.FromDisplayName) msg.SetAddressHeader("From", m.FromAddress, m.FromDisplayName)
msg.SetHeader("To", m.To...) msg.SetHeader("To", m.To)
for header := range m.Headers { for header := range m.Headers {
msg.SetHeader(header, m.Headers[header]...) msg.SetHeader(header, m.Headers[header]...)
} }
@ -86,7 +86,7 @@ func (m *Message) generateAutoMessageID() string {
dateMs := m.Date.UnixNano() / 1e6 dateMs := m.Date.UnixNano() / 1e6
h := fnv.New64() h := fnv.New64()
if len(m.To) > 0 { if len(m.To) > 0 {
_, _ = h.Write([]byte(m.To[0])) _, _ = h.Write([]byte(m.To))
} }
_, _ = h.Write([]byte(m.Subject)) _, _ = h.Write([]byte(m.Subject))
_, _ = h.Write([]byte(m.Body)) _, _ = h.Write([]byte(m.Body))
@ -94,7 +94,7 @@ func (m *Message) generateAutoMessageID() string {
} }
// NewMessageFrom creates new mail message object with custom From header. // NewMessageFrom creates new mail message object with custom From header.
func NewMessageFrom(to []string, fromDisplayName, fromAddress, subject, body string) *Message { func NewMessageFrom(to, fromDisplayName, fromAddress, subject, body string) *Message {
log.Trace("NewMessageFrom (body):\n%s", body) log.Trace("NewMessageFrom (body):\n%s", body)
return &Message{ return &Message{
@ -109,7 +109,7 @@ func NewMessageFrom(to []string, fromDisplayName, fromAddress, subject, body str
} }
// NewMessage creates new mail message object with default From header. // NewMessage creates new mail message object with default From header.
func NewMessage(to []string, subject, body string) *Message { func NewMessage(to, subject, body string) *Message {
return NewMessageFrom(to, setting.MailService.FromName, setting.MailService.FromEmail, subject, body) return NewMessageFrom(to, setting.MailService.FromName, setting.MailService.FromEmail, subject, body)
} }

View file

@ -22,17 +22,17 @@ func TestGenerateMessageID(t *testing.T) {
setting.Domain = "localhost" setting.Domain = "localhost"
date := time.Date(2000, 1, 2, 3, 4, 5, 6, time.UTC) date := time.Date(2000, 1, 2, 3, 4, 5, 6, time.UTC)
m := NewMessageFrom(nil, "display-name", "from-address", "subject", "body") m := NewMessageFrom("", "display-name", "from-address", "subject", "body")
m.Date = date m.Date = date
gm := m.ToMessage() gm := m.ToMessage()
assert.Equal(t, "<autogen-946782245000-41e8fc54a8ad3a3f@localhost>", gm.GetHeader("Message-ID")[0]) assert.Equal(t, "<autogen-946782245000-41e8fc54a8ad3a3f@localhost>", gm.GetHeader("Message-ID")[0])
m = NewMessageFrom([]string{"a@b.com"}, "display-name", "from-address", "subject", "body") m = NewMessageFrom("a@b.com", "display-name", "from-address", "subject", "body")
m.Date = date m.Date = date
gm = m.ToMessage() gm = m.ToMessage()
assert.Equal(t, "<autogen-946782245000-cc88ce3cfe9bd04f@localhost>", gm.GetHeader("Message-ID")[0]) assert.Equal(t, "<autogen-946782245000-cc88ce3cfe9bd04f@localhost>", gm.GetHeader("Message-ID")[0])
m = NewMessageFrom([]string{"a@b.com"}, "display-name", "from-address", "subject", "body") m = NewMessageFrom("a@b.com", "display-name", "from-address", "subject", "body")
m.SetHeader("Message-ID", "<msg-d@domain.com>") m.SetHeader("Message-ID", "<msg-d@domain.com>")
gm = m.ToMessage() gm = m.ToMessage()
assert.Equal(t, "<msg-d@domain.com>", gm.GetHeader("Message-ID")[0]) assert.Equal(t, "<msg-d@domain.com>", gm.GetHeader("Message-ID")[0])

View file

@ -29,7 +29,7 @@
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
<span class="text grey"> <span class="text grey muted-links">
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}} {{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}}
</span> </span>
<span class="text migrate"> <span class="text migrate">
@ -41,7 +41,7 @@
{{avatar .Poster}} {{avatar .Poster}}
</a> </a>
{{end}} {{end}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
</span> </span>
@ -95,7 +95,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-green text-white">{{svg "octicon-dot-fill"}}</span> <span class="badge bg-green text-white">{{svg "octicon-dot-fill"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}} {{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}} {{$.locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
@ -108,7 +108,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-red text-white">{{svg "octicon-circle-slash"}}</span> <span class="badge bg-red text-white">{{svg "octicon-circle-slash"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}} {{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}} {{$.locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
@ -121,7 +121,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-purple text-white">{{svg "octicon-git-merge"}}</span> <span class="badge bg-purple text-white">{{svg "octicon-git-merge"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$link := printf "%s/commit/%s" $.Repository.HTMLURL ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{$link := printf "%s/commit/%s" $.Repository.HTMLURL ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
{{if eq $.Issue.PullRequest.Status 3}} {{if eq $.Issue.PullRequest.Status 3}}
@ -156,20 +156,20 @@
{{if eq .RefAction 3}}</del>{{end}} {{if eq .RefAction 3}}</del>{{end}}
<div class="detail"> <div class="detail">
<span class="text grey"><a class="muted" href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span> <span class="text grey muted-links"><a href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span>
</div> </div>
</div> </div>
{{else if eq .Type 4}} {{else if eq .Type 4}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span> <span class="badge">{{svg "octicon-bookmark"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}} {{$.locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
</span> </span>
<div class="detail"> <div class="detail">
{{svg "octicon-git-commit"}} {{svg "octicon-git-commit"}}
<span class="text grey">{{.Content | Str2html}}</span> <span class="text grey muted-links">{{.Content | Str2html}}</span>
</div> </div>
</div> </div>
{{else if eq .Type 7}} {{else if eq .Type 7}}
@ -177,7 +177,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-tag"}}</span> <span class="badge">{{svg "octicon-tag"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if and .AddedLabels (not .RemovedLabels)}} {{if and .AddedLabels (not .RemovedLabels)}}
{{$.locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels .AddedLabels $.RepoLink) $createdStr | Safe}} {{$.locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels .AddedLabels $.RepoLink) $createdStr | Safe}}
@ -193,7 +193,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-milestone"}}</span> <span class="badge">{{svg "octicon-milestone"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}} {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
</span> </span>
@ -204,7 +204,7 @@
{{if gt .AssigneeID 0}} {{if gt .AssigneeID 0}}
{{if .RemovedAssignee}} {{if .RemovedAssignee}}
{{template "shared/user/avatarlink" .Assignee}} {{template "shared/user/avatarlink" .Assignee}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}} {{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .Assignee.ID}} {{if eq .Poster.ID .Assignee.ID}}
{{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
@ -214,7 +214,7 @@
</span> </span>
{{else}} {{else}}
{{template "shared/user/avatarlink" .Assignee}} {{template "shared/user/avatarlink" .Assignee}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}} {{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .AssigneeID}} {{if eq .Poster.ID .AssigneeID}}
{{$.locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}} {{$.locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
@ -229,7 +229,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-pencil"}}</span> <span class="badge">{{svg "octicon-pencil"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}} {{$.locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}}
</span> </span>
@ -238,7 +238,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span> <span class="badge">{{svg "octicon-git-branch"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
</span> </span>
@ -247,7 +247,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} {{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
</span> </span>
@ -256,35 +256,35 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} {{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
</span> </span>
{{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}} {{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}}
<div class="detail"> <div class="detail">
{{svg "octicon-clock"}} {{svg "octicon-clock"}}
<span class="text grey">{{.Content}}</span> <span class="text grey muted-links">{{.Content}}</span>
</div> </div>
</div> </div>
{{else if eq .Type 14}} {{else if eq .Type 14}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}} {{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
</span> </span>
{{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}} {{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}}
<div class="detail"> <div class="detail">
{{svg "octicon-clock"}} {{svg "octicon-clock"}}
<span class="text grey">{{.Content}}</span> <span class="text grey muted-links">{{.Content}}</span>
</div> </div>
</div> </div>
{{else if eq .Type 15}} {{else if eq .Type 15}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} {{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
</span> </span>
@ -293,7 +293,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}} {{$.locale.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
</span> </span>
@ -302,7 +302,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$parsedDeadline := .Content | ParseDeadline}} {{$parsedDeadline := .Content | ParseDeadline}}
{{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}} {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}}
@ -312,7 +312,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}} {{$.locale.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
</span> </span>
@ -321,15 +321,15 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span> <span class="badge">{{svg "octicon-package-dependents"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}} {{$.locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
</span> </span>
{{if .DependentIssue}} {{if .DependentIssue}}
<div class="detail"> <div class="detail">
{{svg "octicon-plus"}} {{svg "octicon-plus"}}
<span class="text grey"> <span class="text grey muted-links">
<a class="muted" href="{{.DependentIssue.HTMLURL}}"> <a href="{{.DependentIssue.HTMLURL}}">
{{if eq .DependentIssue.RepoID .Issue.RepoID}} {{if eq .DependentIssue.RepoID .Issue.RepoID}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else}} {{else}}
@ -344,15 +344,15 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span> <span class="badge">{{svg "octicon-package-dependents"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}} {{$.locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
</span> </span>
{{if .DependentIssue}} {{if .DependentIssue}}
<div class="detail"> <div class="detail">
<span class="text grey">{{svg "octicon-trash"}}</span> <span class="text grey muted-links">{{svg "octicon-trash"}}</span>
<span class="text grey"> <span class="text grey muted-links">
<a class="muted" href="{{.DependentIssue.HTMLURL}}"> <a href="{{.DependentIssue.HTMLURL}}">
{{if eq .DependentIssue.RepoID .Issue.RepoID}} {{if eq .DependentIssue.RepoID .Issue.RepoID}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else}} {{else}}
@ -373,13 +373,13 @@
</a> </a>
{{end}} {{end}}
<span class="badge{{if eq .Review.Type 1}} bg-green text-white{{else if eq .Review.Type 3}} bg-red text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span> <span class="badge{{if eq .Review.Type 1}} bg-green text-white{{else if eq .Review.Type 3}} bg-red text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
<span class="text grey"> <span class="text grey muted-links">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black"> <span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span> <span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span> <span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}} {{else}}
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
@ -404,13 +404,13 @@
<div class="content comment-container"> <div class="content comment-container">
<div class="ui top attached header comment-header df ac sb"> <div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac"> <div class="comment-header-left df ac">
<span class="text grey"> <span class="text grey muted-links">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black bold"> <span class="text black bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span> <span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span> <span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}} {{else}}
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
@ -532,13 +532,13 @@
{{avatar .Poster}} {{avatar .Poster}}
</a> </a>
{{end}} {{end}}
<span class="text grey"> <span class="text grey muted-links">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black bold"> <span class="text black bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span> <span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span> <span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}} {{else}}
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
@ -628,12 +628,12 @@
<span class="badge">{{svg "octicon-lock"}}</span> <span class="badge">{{svg "octicon-lock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
{{if .Content}} {{if .Content}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} {{$.locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
</span> </span>
{{else}} {{else}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} {{$.locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
</span> </span>
@ -643,7 +643,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-key"}}</span> <span class="badge">{{svg "octicon-key"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}} {{$.locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
</span> </span>
@ -652,7 +652,7 @@
<div class="timeline-item event"> <div class="timeline-item event">
<span class="badge">{{svg "octicon-git-branch"}}</span> <span class="badge">{{svg "octicon-git-branch"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
<a{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> <a{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a>
{{$.locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
</span> </span>
@ -661,21 +661,21 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span> <span class="badge">{{svg "octicon-clock"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}} {{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}}
</span> </span>
<div class="detail"> <div class="detail">
{{svg "octicon-clock"}} {{svg "octicon-clock"}}
<span class="text grey">{{.Content}}</span> <span class="text grey muted-links">{{.Content}}</span>
</div> </div>
</div> </div>
{{else if eq .Type 27}} {{else if eq .Type 27}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-eye"}}</span> <span class="badge">{{svg "octicon-eye"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if (gt .AssigneeID 0)}} {{if (gt .AssigneeID 0)}}
{{if .RemovedAssignee}} {{if .RemovedAssignee}}
@ -699,7 +699,7 @@
{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}} {{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-repo-push"}}</span> <span class="badge">{{svg "octicon-repo-push"}}</span>
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if .IsForcePush}} {{if .IsForcePush}}
{{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}}
@ -716,7 +716,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-project"}}</span> <span class="badge">{{svg "octicon-project"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if gt .OldProjectID 0}} {{if gt .OldProjectID 0}}
{{if gt .ProjectID 0}} {{if gt .ProjectID 0}}
@ -737,7 +737,7 @@
<img src="{{.Poster.AvatarLink}}"> <img src="{{.Poster.AvatarLink}}">
</a> </a>
<span class="badge grey">{{svg "octicon-x" 16}}</span> <span class="badge grey">{{svg "octicon-x" 16}}</span>
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$reviewerName := ""}} {{$reviewerName := ""}}
{{if eq .Review.OriginalAuthor ""}} {{if eq .Review.OriginalAuthor ""}}
@ -752,7 +752,7 @@
<div class="timeline-item comment"> <div class="timeline-item comment">
<div class="content"> <div class="content">
<div class="ui top attached header arrow-top"> <div class="ui top attached header arrow-top">
<span class="text grey"> <span class="text grey muted-links">
{{$.locale.Tr "action.review_dismissed_reason"}} {{$.locale.Tr "action.review_dismissed_reason"}}
</span> </span>
</div> </div>
@ -773,7 +773,7 @@
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span> <span class="badge">{{svg "octicon-git-branch"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}} {{if and .OldRef .NewRef}}
{{$.locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
@ -787,7 +787,7 @@
{{else if or (eq .Type 34) (eq .Type 35)}} {{else if or (eq .Type 34) (eq .Type 35)}}
<div class="timeline-item event" id="{{.HashTag}}"> <div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-merge" 16}}</span> <span class="badge">{{svg "octicon-git-merge" 16}}</span>
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{if eq .Type 34}}{{$.locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}} {{if eq .Type 34}}{{$.locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}}
{{else}}{{$.locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}} {{else}}{{$.locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}}

View file

@ -2845,6 +2845,11 @@ tbody.commit-list {
display: inline; display: inline;
} }
// but in the repo-files-table we cannot
#repo-files-table .commit-list .message-wrapper {
display: inline-block;
}
@media @mediaSm { @media @mediaSm {
tr.commit-list { tr.commit-list {
width: 100%; width: 100%;