Skip to content

Commit 9d14e78

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Update documentation for the new YAML label file format (go-gitea#23020) Remove unnecessary space on link (go-gitea#23334) Fix incorrect redirect link of delete org project (go-gitea#23327) Fix incorrect project links and use symlink icon for org-wide projects (go-gitea#23325) Fix PR view misalignment caused by long name file (go-gitea#23321) Add ActionRunStatus component (go-gitea#23259) Scoped labels: don't require holding alt key to remove (go-gitea#23303)
2 parents 306ba96 + 84a2993 commit 9d14e78

File tree

15 files changed

+85
-43
lines changed

15 files changed

+85
-43
lines changed

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,22 @@ To add custom .gitignore, add a file with existing [.gitignore rules](https://gi
282282

283283
### Labels
284284

285-
To add a custom label set, add a file that follows the [label format](https://github.com/go-gitea/gitea/blob/main/options/label/Default) to `$GITEA_CUSTOM/options/label`
285+
Starting with Gitea 1.19, you can add a file that follows the [YAML label format](https://github.com/go-gitea/gitea/blob/main/options/label/Advanced.yaml) to `$GITEA_CUSTOM/options/label`:
286+
287+
```yaml
288+
labels:
289+
- name: "foo/bar" # name of the label that will appear in the dropdown
290+
exclusive: true # whether to use the exclusive namespace for scoped labels. scoped delimiter is /
291+
color: aabbcc # hex colour coding
292+
description: Some label # long description of label intent
293+
```
294+
295+
The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/label/Default) can still be used following the format below, however we strongly recommend using the newer YAML format instead.
296+
286297
`#hex-color label name ; label description`
287298

299+
For more information, see the [labels documentation]({{< relref "doc/usage/labels.en-us.md" >}}).
300+
288301
### Licenses
289302

290303
To add a custom license, add a file with the license text to `$GITEA_CUSTOM/options/license`

routers/web/org/projects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func DeleteProject(ctx *context.Context) {
205205
}
206206

207207
ctx.JSON(http.StatusOK, map[string]interface{}{
208-
"redirect": ctx.Repo.RepoLink + "/projects",
208+
"redirect": ctx.ContextUser.HomeLink() + "/-/projects",
209209
})
210210
}
211211

templates/org/menu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
55
</a>
66
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
7-
{{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
7+
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
88
</a>
99
{{if .IsPackageEnabled}}
1010
<a class="item" href="{{$.Org.HomeLink}}/-/packages">

templates/projects/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{template "base/alert" .}}
1313
<div class="ui compact tiny menu">
1414
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open">
15-
{{svg "octicon-project" 16 "gt-mr-3"}}
15+
{{svg "octicon-project-symlink" 16 "gt-mr-3"}}
1616
{{JsPrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
1717
</a>
1818
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=closed">
@@ -38,7 +38,7 @@
3838
<div class="milestone list">
3939
{{range .Projects}}
4040
<li class="item">
41-
{{svg "octicon-project"}} <a href="{{$.Link}}/{{.ID}}">{{.Title}}</a>
41+
{{svg "octicon-project-symlink"}} <a href="{{.Link}}">{{.Title}}</a>
4242
<div class="meta">
4343
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
4444
{{if .IsClosed}}

templates/repo/actions/runs_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="issue-item-main gt-f1 gt-fc gt-df">
88
<div class="issue-item-top-row">
99
<a class="index gt-ml-0 gt-mr-2" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
10-
{{.Title}}
10+
{{- .Title -}}
1111
</a>
1212
<span class="ui label">
1313
{{if .RefLink}}

templates/repo/diff/box.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
{{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}}
8080
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}>
8181
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header gt-df gt-ac gt-sb">
82-
<div class="gt-df gt-ac">
82+
<div class="diff-file-name gt-df gt-ac gt-mr-3">
8383
<a role="button" class="fold-file muted gt-mr-2" {{if not $isExpandable}}style="visibility: hidden"{{end}}>
8484
{{if $file.ShouldBeHidden}}
8585
{{svg "octicon-chevron-right" 18}}
@@ -96,7 +96,7 @@
9696
{{template "repo/diff/stats" dict "file" . "root" $}}
9797
{{end}}
9898
</div>
99-
<span class="file gt-mono"><a class="muted" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
99+
<span class="file gt-mono"><a class="muted file-link" title="{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} &rarr; {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span>
100100
{{if $file.IsGenerated}}
101101
<span class="ui label gt-ml-3">{{$.locale.Tr "repo.diff.generated"}}</span>
102102
{{end}}

templates/repo/issue/new_form.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@
176176
{{.locale.Tr "repo.issues.new.open_projects"}}
177177
</div>
178178
{{range .OpenProjects}}
179-
<a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
180-
{{svg "octicon-project" 18 "gt-mr-3"}}
179+
<a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
180+
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
181181
{{.Title}}
182182
</a>
183183
{{end}}
@@ -188,8 +188,8 @@
188188
{{.locale.Tr "repo.issues.new.closed_projects"}}
189189
</div>
190190
{{range .ClosedProjects}}
191-
<a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
192-
{{svg "octicon-project" 18 "gt-mr-3"}}
191+
<a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
192+
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
193193
{{.Title}}
194194
</a>
195195
{{end}}
@@ -201,8 +201,8 @@
201201
<span class="no-select item {{if .Project}}gt-hidden{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
202202
<div class="selected">
203203
{{if .Project}}
204-
<a class="item muted sidebar-item-link" href="{{.RepoLink}}/projects/{{.Project.ID}}">
205-
{{svg "octicon-project" 18 "gt-mr-3"}}
204+
<a class="item muted sidebar-item-link" href="{{.Project.Link}}">
205+
{{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "gt-mr-3"}}{{else}}{{svg "octicon-project" 18 "gt-mr-3"}}{{end}}
206206
{{.Project.Title}}
207207
</a>
208208
{{end}}

templates/repo/projects/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="milestone list">
4141
{{range .Projects}}
4242
<li class="item">
43-
{{svg "octicon-project"}} <a href="{{$.RepoLink}}/projects/{{.ID}}">{{.Title}}</a>
43+
{{svg "octicon-project"}} <a href="{{.Link}}">{{.Title}}</a>
4444
<div class="meta">
4545
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
4646
{{if .IsClosed}}

templates/shared/issuelist.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
</a>
8888
{{end}}
8989
{{if .Project}}
90-
<a class="project" {{if $.RepoLink}}href="{{$.RepoLink}}/projects/{{.Project.ID}}"{{else}}href="{{.Repo.Link}}/projects/{{.Project.ID}}"{{end}}>
91-
{{svg "octicon-project" 14 "gt-mr-2"}}{{.Project.Title}}
90+
<a class="project" href="{{.Project.Link}}">
91+
{{if .Project.IsOrganizationProject}}{{svg "octicon-project-symlink" 14 "gt-mr-2"}}{{else}}{{svg "octicon-project" 14 "gt-mr-2"}}{{end}}{{.Project.Title}}
9292
</a>
9393
{{end}}
9494
{{if .Ref}}

templates/user/overview/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
2424
</a>
2525
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
26-
{{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
26+
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
2727
</a>
2828
{{if (not .UnitPackagesGlobalDisabled)}}
2929
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">

0 commit comments

Comments
 (0)