Skip to content

Commit a30724d

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Remove the service worker (go-gitea#25010) Add user level action runners (go-gitea#24995) Update github.com/google/go-github to v52 (go-gitea#24004) various style fixes (go-gitea#25008) Add show timestamp/seconds and fullscreen options to action page (go-gitea#24876) Fix markdown link to awesome gitea (go-gitea#25009) Followup to pinned Issues (go-gitea#24945) revert the removed method to fix tmpl break on graph page (go-gitea#25005) Refactor diffFileInfo / DiffTreeStore (go-gitea#24998) Fix delete user account modal (go-gitea#25004) Clean up github actions (go-gitea#24984)
2 parents d37b097 + 50bd7d0 commit a30724d

Some content is hidden

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

57 files changed

+482
-385
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ cpu.out
7676
/yarn-error.log
7777
/npm-debug.log*
7878
/public/js
79-
/public/serviceworker.js
8079
/public/css
8180
/public/fonts
8281
/public/img/webpack

.github/file-filters.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/files-changed.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
1-
name: files changed
1+
name: files-changed
22

33
on:
44
workflow_call:
55
outputs:
6-
docs:
7-
description: "whether docs files changed"
8-
value: ${{ jobs.files-changed.outputs.docs }}
96
backend:
107
description: "whether backend files changed"
11-
value: ${{ jobs.files-changed.outputs.backend }}
8+
value: ${{ jobs.detect.outputs.backend }}
129
frontend:
1310
description: "whether frontend files changed"
14-
value: ${{ jobs.files-changed.outputs.frontend }}
11+
value: ${{ jobs.detect.outputs.frontend }}
12+
docs:
13+
description: "whether docs files changed"
14+
value: ${{ jobs.detect.outputs.docs }}
15+
actions:
16+
description: "whether actions files changed"
17+
value: ${{ jobs.detect.outputs.actions }}
1518

1619
jobs:
17-
files-changed:
20+
detect:
1821
name: detect which files changed
1922
runs-on: ubuntu-latest
2023
timeout-minutes: 3
2124
# Map a step output to a job output
2225
outputs:
23-
docs: ${{ steps.changes.outputs.docs }}
2426
backend: ${{ steps.changes.outputs.backend }}
2527
frontend: ${{ steps.changes.outputs.frontend }}
28+
docs: ${{ steps.changes.outputs.docs }}
29+
actions: ${{ steps.changes.outputs.actions }}
2630
steps:
2731
- uses: actions/checkout@v3
28-
- name: Check for backend file changes
29-
uses: dorny/paths-filter@v2
32+
- uses: dorny/paths-filter@v2
3033
id: changes
3134
with:
32-
filters: .github/file-filters.yml
35+
filters: |
36+
backend:
37+
- "**/*.go"
38+
- "**/*.tmpl"
39+
- "go.mod"
40+
- "go.sum"
41+
42+
frontend:
43+
- "**/*.js"
44+
- "web_src/**"
45+
- "package.json"
46+
- "package-lock.json"
47+
48+
docs:
49+
- "**/*.md"
50+
- "docs/**"
51+
52+
actions:
53+
- ".github/workflows/*"

.github/workflows/pull-compliance-docs.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/pull-compliance.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- run: make lint-backend
2626
env:
2727
TAGS: bindata sqlite sqlite_unlock_notify
28+
2829
lint-go-windows:
2930
if: needs.files-changed.outputs.backend == 'true'
3031
needs: files-changed
@@ -41,6 +42,7 @@ jobs:
4142
TAGS: bindata sqlite sqlite_unlock_notify
4243
GOOS: windows
4344
GOARCH: amd64
45+
4446
lint-go-gogit:
4547
if: needs.files-changed.outputs.backend == 'true'
4648
needs: files-changed
@@ -55,6 +57,7 @@ jobs:
5557
- run: make lint-go
5658
env:
5759
TAGS: bindata gogit sqlite sqlite_unlock_notify
60+
5861
checks-backend:
5962
if: needs.files-changed.outputs.backend == 'true'
6063
needs: files-changed
@@ -67,6 +70,7 @@ jobs:
6770
check-latest: true
6871
- run: make deps-backend deps-tools
6972
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
73+
7074
frontend:
7175
if: needs.files-changed.outputs.frontend == 'true'
7276
needs: files-changed
@@ -79,6 +83,7 @@ jobs:
7983
- run: make deps-frontend
8084
- run: make lint-frontend
8185
- run: make checks-frontend
86+
8287
backend:
8388
if: needs.files-changed.outputs.backend == 'true'
8489
needs: files-changed
@@ -113,3 +118,25 @@ jobs:
113118
env:
114119
GOOS: linux
115120
GOARCH: 386
121+
122+
docs:
123+
if: needs.files-changed.outputs.docs == 'true'
124+
needs: files-changed
125+
runs-on: ubuntu-latest
126+
steps:
127+
- uses: actions/checkout@v3
128+
- uses: actions/setup-node@v3
129+
with:
130+
node-version: 20
131+
- run: make deps-frontend
132+
- run: make lint-md
133+
- run: make docs # test if build could succeed
134+
135+
actions:
136+
if: needs.files-changed.outputs.actions == 'true'
137+
needs: files-changed
138+
runs-on: ubuntu-latest
139+
steps:
140+
- uses: actions/checkout@v3
141+
- uses: actions/setup-go@v4
142+
- run: make lint-actions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ cpu.out
7777
/yarn-error.log
7878
/npm-debug.log*
7979
/public/js
80-
/public/serviceworker.js
8180
/public/css
8281
/public/fonts
8382
/public/img/webpack

.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.min.css
22
*.min.js
3+
/assets/*.json
34
/modules/options/bindata.go
45
/modules/public/bindata.go
56
/modules/templates/bindata.go

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ FOMANTIC_WORK_DIR := web_src/fomantic
114114
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
115115
WEBPACK_CONFIGS := webpack.config.js
116116
WEBPACK_DEST := public/js/index.js public/css/index.css
117-
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js
117+
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack
118118

119119
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
120120
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))

assets/go-licenses.json

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

contrib/backport/backport.go

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

20-
"github.com/google/go-github/v51/github"
20+
"github.com/google/go-github/v52/github"
2121
"github.com/urfave/cli"
2222
"gopkg.in/yaml.v3"
2323
)

custom/conf/app.example.ini

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ LEVEL = Info
10441044
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10451045
;; List of reasons why a Pull Request or Issue can be locked
10461046
;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam
1047-
;; Maximum number of pinned Issues
1047+
;; Maximum number of pinned Issues per repo
10481048
;; Set to 0 to disable pinning Issues
10491049
;MAX_PINNED = 3
10501050

@@ -1208,9 +1208,6 @@ LEVEL = Info
12081208
;; Whether to search within description at repository search on explore page.
12091209
;SEARCH_REPO_DESCRIPTION = true
12101210
;;
1211-
;; Whether to enable a Service Worker to cache frontend assets
1212-
;USE_SERVICE_WORKER = false
1213-
;;
12141211
;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
12151212
;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
12161213
;ONLY_SHOW_RELEVANT_REPOS = false

docs/content/doc/administration/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build
141141
### Repository - Issue (`repository.issue`)
142142

143143
- `LOCK_REASONS`: **Too heated,Off-topic,Resolved,Spam**: A list of reasons why a Pull Request or Issue can be locked
144-
- `MAX_PINNED`: **3**: Maximum number of pinned Issues. Set to 0 to disable pinning Issues.
144+
- `MAX_PINNED`: **3**: Maximum number of pinned Issues per Repo. Set to 0 to disable pinning Issues.
145145

146146
### Repository - Upload (`repository.upload`)
147147

@@ -230,7 +230,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a
230230
add it to this config.
231231
- `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
232232
- `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page.
233-
- `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets.
234233
- `ONLY_SHOW_RELEVANT_REPOS`: **false** Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used.
235234
A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic).
236235

docs/content/page/index.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,4 @@ You can try it out using [the online demo](https://try.gitea.io/).
301301

302302
## Integrated support
303303

304-
Please visit [AWESOME GITEA] (https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support
304+
Please visit [Awesome Gitea](https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ require (
5555
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
5656
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
5757
github.com/golang-jwt/jwt/v4 v4.5.0
58-
github.com/google/go-github/v51 v51.0.0
58+
github.com/google/go-github/v52 v52.0.0
5959
github.com/google/pprof v0.0.0-20230502171905-255e3b9b56de
6060
github.com/google/uuid v1.3.0
6161
github.com/gorilla/feeds v1.1.1
@@ -107,10 +107,10 @@ require (
107107
github.com/yuin/goldmark v1.5.4
108108
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87
109109
github.com/yuin/goldmark-meta v1.1.0
110-
golang.org/x/crypto v0.8.0
110+
golang.org/x/crypto v0.9.0
111111
golang.org/x/image v0.7.0
112112
golang.org/x/net v0.10.0
113-
golang.org/x/oauth2 v0.7.0
113+
golang.org/x/oauth2 v0.8.0
114114
golang.org/x/sys v0.8.0
115115
golang.org/x/text v0.9.0
116116
golang.org/x/tools v0.8.0
@@ -136,7 +136,7 @@ require (
136136
github.com/Masterminds/semver/v3 v3.2.0 // indirect
137137
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
138138
github.com/Microsoft/go-winio v0.6.1 // indirect
139-
github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756 // indirect
139+
github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1 // indirect
140140
github.com/RoaringBitmap/roaring v1.2.3 // indirect
141141
github.com/acomagu/bufpipe v1.0.4 // indirect
142142
github.com/andybalholm/brotli v1.0.5 // indirect

go.sum

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq
105105
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
106106
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
107107
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
108-
github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756 h1:L6S7kR7SlhQKplIBpkra3s6yhcZV51lhRnXmYc4HohI=
109-
github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
108+
github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1 h1:JMDGhoQvXNTqH6Y3MC0IUw6tcZvaUdujNqzK2HYWZc8=
109+
github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
110110
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
111111
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
112112
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
@@ -227,6 +227,7 @@ github.com/bufbuild/connect-go v1.7.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrI
227227
github.com/buildkite/terminal-to-html/v3 v3.7.0 h1:chdLUSpiOj/A4v3dzxyOqixXI6aw7IDA6Dk77FXsvNU=
228228
github.com/buildkite/terminal-to-html/v3 v3.7.0/go.mod h1:g0ME1XqbkBSgXR9YmlIHcJIjzaMyWW+HbsG0rPb5puo=
229229
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
230+
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
230231
github.com/caddyserver/certmagic v0.17.2 h1:o30seC1T/dBqBCNNGNHWwj2i5/I/FMjBbTAhjADP3nE=
231232
github.com/caddyserver/certmagic v0.17.2/go.mod h1:ouWUuC490GOLJzkyN35eXfV8bSbwMwSf4bdhkIxtdQE=
232233
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
@@ -564,8 +565,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
564565
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
565566
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
566567
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
567-
github.com/google/go-github/v51 v51.0.0 h1:KCjsbgPV28VoRftdP+K2mQL16jniUsLAJknsOVKwHyU=
568-
github.com/google/go-github/v51 v51.0.0/go.mod h1:kZj/rn/c1lSUbr/PFWl2hhusPV7a5XNYKcwPrd5L3Us=
568+
github.com/google/go-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M=
569+
github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4=
569570
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
570571
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
571572
github.com/google/go-tpm v0.1.2-0.20190725015402-ae6dd98980d4/go.mod h1:H9HbmUG2YgV/PHITkO7p6wxEEj/v5nlsVWIwumwH2NI=
@@ -1318,10 +1319,11 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
13181319
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
13191320
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
13201321
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
1322+
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
13211323
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
13221324
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
1323-
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
1324-
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
1325+
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
1326+
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
13251327
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
13261328
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
13271329
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1430,8 +1432,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
14301432
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
14311433
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
14321434
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
1433-
golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
1434-
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
1435+
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
1436+
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
14351437
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
14361438
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
14371439
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

models/actions/runner.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ func (r *ActionRunner) BelongsToOwnerType() types.OwnerType {
6969
return types.OwnerTypeRepository
7070
}
7171
if r.OwnerID != 0 {
72-
return types.OwnerTypeOrganization
72+
if r.Owner.Type == user_model.UserTypeOrganization {
73+
return types.OwnerTypeOrganization
74+
} else if r.Owner.Type == user_model.UserTypeIndividual {
75+
return types.OwnerTypeIndividual
76+
}
7377
}
7478
return types.OwnerTypeSystemGlobal
7579
}

0 commit comments

Comments
 (0)