Skip to content

Commit b2820d9

Browse files
authored
Merge branch 'main' into fix-wiki-editor-bug
2 parents 9a62bca + d151794 commit b2820d9

Some content is hidden

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

53 files changed

+838
-533
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

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
)

go.mod

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ require (
5454
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
5555
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
5656
github.com/golang-jwt/jwt/v4 v4.5.0
57-
github.com/google/go-github/v45 v45.2.0
57+
github.com/google/go-github/v51 v51.0.0
5858
github.com/google/pprof v0.0.0-20230222194610-99052d3372e7
5959
github.com/google/uuid v1.3.0
6060
github.com/gorilla/feeds v1.1.1
@@ -96,19 +96,18 @@ require (
9696
github.com/stretchr/testify v1.8.1
9797
github.com/syndtr/goleveldb v1.0.0
9898
github.com/tstranex/u2f v1.0.0
99-
github.com/unrolled/render v1.5.0
10099
github.com/urfave/cli v1.22.12
101100
github.com/xanzy/go-gitlab v0.80.2
102101
github.com/xeipuuv/gojsonschema v1.2.0
103102
github.com/yohcop/openid-go v1.0.0
104103
github.com/yuin/goldmark v1.5.4
105104
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87
106105
github.com/yuin/goldmark-meta v1.1.0
107-
golang.org/x/crypto v0.6.0
108-
golang.org/x/net v0.7.0
109-
golang.org/x/oauth2 v0.5.0
106+
golang.org/x/crypto v0.7.0
107+
golang.org/x/net v0.8.0
108+
golang.org/x/oauth2 v0.6.0
110109
golang.org/x/sys v0.6.0
111-
golang.org/x/text v0.7.0
110+
golang.org/x/text v0.8.0
112111
golang.org/x/tools v0.6.0
113112
google.golang.org/grpc v1.53.0
114113
google.golang.org/protobuf v1.28.1

0 commit comments

Comments
 (0)