Skip to content

Commit 80218b8

Browse files
authored
Merge branch 'main' into incoming-mail
2 parents b6087bd + 9d08d3f commit 80218b8

File tree

21 files changed

+544
-532
lines changed

21 files changed

+544
-532
lines changed

options/locale/locale_pt-PT.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ confirm_delete_selected=Confirma a exclusão de todos os itens marcados?
145145

146146
name=Nome
147147
value=Valor
148+
readme=Leia-me
148149

149150
filter=Filtro
150151
filter.clear=Retirar filtro
@@ -1045,6 +1046,8 @@ generate_repo=Gerar repositório
10451046
generate_from=Gerar a partir de
10461047
repo_desc=Descrição
10471048
repo_desc_helper=Insira uma descrição curta (opcional)
1049+
repo_no_desc=Descrição não fornecida
1050+
repo_lang=Idiomas
10481051
repo_gitignore_helper=Escolher modelos .gitignore.
10491052
repo_gitignore_helper_desc=Escolha os ficheiros que não são para rastrear, a partir de uma lista de modelos de linguagens comuns. Serão incluídos no ficheiro .gitignore, logo à partida, artefactos típicos gerados pelas ferramentas de construção de cada uma das linguagens.
10501053
issue_labels=Rótulos para as questões
@@ -1942,6 +1945,10 @@ pulls.delete.title=Eliminar este pedido de integração?
19421945
pulls.delete.text=Tem a certeza que quer eliminar este pedido de integração? Isso irá remover todo o conteúdo permanentemente. Como alternativa considere fechá-lo, se pretender mantê-lo em arquivo.
19431946

19441947
pulls.recently_pushed_new_branches=Enviou para o ramo <strong>%[1]s</strong> %[2]s
1948+
pulls.upstream_diverging_prompt_behind_1=Este ramo está %d cometimento atrás de %s
1949+
pulls.upstream_diverging_prompt_behind_n=Este ramo está %d cometimentos atrás de %s
1950+
pulls.upstream_diverging_prompt_base_newer=O ramo base %s tem novas modificações
1951+
pulls.upstream_diverging_merge=Sincronizar derivação
19451952

19461953
pull.deleted_branch=(eliminado):%s
19471954
pull.agit_documentation=Rever a documentação sobre o AGit

routers/web/repo/actions/view.go

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"context"
1010
"errors"
1111
"fmt"
12+
"html/template"
1213
"io"
1314
"net/http"
1415
"net/url"
@@ -29,6 +30,7 @@ import (
2930
"code.gitea.io/gitea/modules/setting"
3031
"code.gitea.io/gitea/modules/storage"
3132
api "code.gitea.io/gitea/modules/structs"
33+
"code.gitea.io/gitea/modules/templates"
3234
"code.gitea.io/gitea/modules/timeutil"
3335
"code.gitea.io/gitea/modules/util"
3436
"code.gitea.io/gitea/modules/web"
@@ -87,19 +89,20 @@ type ViewResponse struct {
8789

8890
State struct {
8991
Run struct {
90-
Link string `json:"link"`
91-
Title string `json:"title"`
92-
Status string `json:"status"`
93-
CanCancel bool `json:"canCancel"`
94-
CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve
95-
CanRerun bool `json:"canRerun"`
96-
CanDeleteArtifact bool `json:"canDeleteArtifact"`
97-
Done bool `json:"done"`
98-
WorkflowID string `json:"workflowID"`
99-
WorkflowLink string `json:"workflowLink"`
100-
IsSchedule bool `json:"isSchedule"`
101-
Jobs []*ViewJob `json:"jobs"`
102-
Commit ViewCommit `json:"commit"`
92+
Link string `json:"link"`
93+
Title string `json:"title"`
94+
TitleHTML template.HTML `json:"titleHTML"`
95+
Status string `json:"status"`
96+
CanCancel bool `json:"canCancel"`
97+
CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve
98+
CanRerun bool `json:"canRerun"`
99+
CanDeleteArtifact bool `json:"canDeleteArtifact"`
100+
Done bool `json:"done"`
101+
WorkflowID string `json:"workflowID"`
102+
WorkflowLink string `json:"workflowLink"`
103+
IsSchedule bool `json:"isSchedule"`
104+
Jobs []*ViewJob `json:"jobs"`
105+
Commit ViewCommit `json:"commit"`
103106
} `json:"run"`
104107
CurrentJob struct {
105108
Title string `json:"title"`
@@ -200,7 +203,10 @@ func ViewPost(ctx *context_module.Context) {
200203
}
201204
}
202205

206+
metas := ctx.Repo.Repository.ComposeMetas(ctx)
207+
203208
resp.State.Run.Title = run.Title
209+
resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, metas)
204210
resp.State.Run.Link = run.Link()
205211
resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
206212
resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions)

routers/web/repo/issue_page_meta.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ func (d *IssuePageMetaData) retrieveReviewersData(ctx *context.Context) {
195195
var reviews issues_model.ReviewList
196196

197197
if d.Issue == nil {
198-
posterID = ctx.Doer.ID
198+
if ctx.Doer != nil {
199+
posterID = ctx.Doer.ID
200+
}
199201
} else {
200202
posterID = d.Issue.PosterID
201203
if d.Issue.OriginalAuthorID > 0 {

0 commit comments

Comments
 (0)