Skip to content

Commit 6b8300f

Browse files
committed
Merge branch 'main' into sync-issue-pr-and-more
2 parents acd0ad2 + fdbd646 commit 6b8300f

File tree

152 files changed

+2210
-1239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+2210
-1239
lines changed

.eslintrc.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins:
1313
- eslint-plugin-import
1414
- eslint-plugin-jquery
1515
- eslint-plugin-sonarjs
16+
- eslint-plugin-custom-elements
1617

1718
env:
1819
es2022: true
@@ -62,6 +63,19 @@ rules:
6263
consistent-this: [0]
6364
constructor-super: [2]
6465
curly: [0]
66+
custom-elements/expose-class-on-global: [0]
67+
custom-elements/extends-correct-class: [2]
68+
custom-elements/file-name-matches-element: [0]
69+
custom-elements/no-constructor: [2]
70+
custom-elements/no-customized-built-in-elements: [2]
71+
custom-elements/no-dom-traversal-in-attributechangedcallback: [2]
72+
custom-elements/no-dom-traversal-in-connectedcallback: [2]
73+
custom-elements/no-exports-with-element: [2]
74+
custom-elements/no-method-prefixed-with-on: [2]
75+
custom-elements/no-unchecked-define: [0]
76+
custom-elements/one-element-per-file: [0]
77+
custom-elements/tag-name-matches-class: [2]
78+
custom-elements/valid-tag-name: [2]
6579
default-case-last: [2]
6680
default-case: [0]
6781
default-param-last: [0]

.gitpod.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ tasks:
2323
gp sync-await setup
2424
make watch-frontend
2525
openMode: split-right
26-
- name: Run docs
27-
command: |
28-
gp sync-await setup
29-
cd docs
30-
make clean update
31-
hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
32-
openMode: split-right
3326

3427
vscode:
3528
extensions:
@@ -46,5 +39,3 @@ vscode:
4639
ports:
4740
- name: Gitea
4841
port: 3000
49-
- name: Docs
50-
port: 1313

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM golang:1.20-alpine3.17 AS build-env
2+
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2323
# Begin env-to-ini build
2424
RUN go build contrib/environment-to-ini/environment-to-ini.go
2525

26-
FROM alpine:3.17
26+
FROM docker.io/library/alpine:3.17
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 22 3000

Dockerfile.rootless

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM golang:1.20-alpine3.17 AS build-env
2+
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2323
# Begin env-to-ini build
2424
RUN go build contrib/environment-to-ini/environment-to-ini.go
2525

26-
FROM alpine:3.17
26+
FROM docker.io/library/alpine:3.17
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 2222 3000

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ generate-go: $(TAGS_PREREQ)
747747

748748
.PHONY: security-check
749749
security-check:
750-
go run $(GOVULNCHECK_PACKAGE) -v ./...
750+
go run $(GOVULNCHECK_PACKAGE) ./...
751751

752752
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
753753
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

assets/go-licenses.json

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/generate-go-licenses.go

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ package main
77

88
import (
99
"encoding/json"
10+
"fmt"
1011
"io/fs"
1112
"os"
12-
goPath "path"
13+
"path"
1314
"path/filepath"
1415
"regexp"
1516
"sort"
@@ -27,9 +28,14 @@ type LicenseEntry struct {
2728
}
2829

2930
func main() {
31+
if len(os.Args) != 3 {
32+
fmt.Println("usage: go run generate-go-licenses.go <base-dir> <out-json-file>")
33+
os.Exit(1)
34+
}
35+
3036
base, out := os.Args[1], os.Args[2]
3137

32-
paths := []string{}
38+
var paths []string
3339
err := filepath.WalkDir(base, func(path string, entry fs.DirEntry, err error) error {
3440
if err != nil {
3541
return err
@@ -46,28 +52,27 @@ func main() {
4652

4753
sort.Strings(paths)
4854

49-
entries := []LicenseEntry{}
50-
for _, path := range paths {
51-
path := filepath.ToSlash(path)
52-
53-
licenseText, err := os.ReadFile(path)
55+
var entries []LicenseEntry
56+
for _, filePath := range paths {
57+
licenseText, err := os.ReadFile(filePath)
5458
if err != nil {
5559
panic(err)
5660
}
5761

58-
path = strings.Replace(path, base+"/", "", 1)
59-
name := goPath.Dir(path)
62+
pkgPath := filepath.ToSlash(filePath)
63+
pkgPath = strings.TrimPrefix(pkgPath, base+"/")
64+
pkgName := path.Dir(pkgPath)
6065

6166
// There might be a bug somewhere in go-licenses that sometimes interprets the
6267
// root package as "." and sometimes as "code.gitea.io/gitea". Workaround by
6368
// removing both of them for the sake of stable output.
64-
if name == "." || name == "code.gitea.io/gitea" {
69+
if pkgName == "." || pkgName == "code.gitea.io/gitea" {
6570
continue
6671
}
6772

6873
entries = append(entries, LicenseEntry{
69-
Name: name,
70-
Path: path,
74+
Name: pkgName,
75+
Path: pkgPath,
7176
LicenseText: string(licenseText),
7277
})
7378
}

contrib/backport/backport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strings"
1717
"syscall"
1818

19-
"github.com/google/go-github/v45/github"
19+
"github.com/google/go-github/v51/github"
2020
"github.com/urfave/cli"
2121
"gopkg.in/yaml.v3"
2222
)

docs/content/doc/administration/backup-and-restore.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: "2017-01-01T16:00:00+02:00"
3-
title: "Usage: Backup and Restore"
3+
title: "Backup and Restore"
44
slug: "backup-and-restore"
55
weight: 11
66
toc: false

docs/content/doc/administration/command-line.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: "2017-01-01T16:00:00+02:00"
3-
title: "Usage: Command Line"
3+
title: "Gitea Command Line"
44
slug: "command-line"
55
weight: 1
66
toc: false

docs/content/doc/administration/email-setup.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: "2019-10-15T10:10:00+05:00"
3-
title: "Usage: Email setup"
3+
title: "Email setup"
44
slug: "email-setup"
55
weight: 12
66
toc: false

0 commit comments

Comments
 (0)