Skip to content

Commit 6f0b317

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (23 commits) Avoid writing config file if not installed (go-gitea#26107) Implement auto-cancellation of concurrent jobs if the event is push (go-gitea#25716) [skip ci] Updated translations via Crowdin doc guide the user to create the appropriate level runner (go-gitea#26091) Fix handling of Debian files with trailing slash (go-gitea#26087) fix Missing 404 swagger response docs for /admin/users/{username} (go-gitea#26086) Allow the use of alternative net.Listener implementations by downstreams (go-gitea#25855) Add missing default value for some Bool cli flags (go-gitea#26082) Reduce unnecessary DB queries for Actions tasks (go-gitea#25199) Use stderr as fallback if the log file can't be opened (go-gitea#26074) Make organization redirect warning more clear (go-gitea#26077) Replace gogs/cron with go-co-op/gocron (go-gitea#25977) Remove `db.DefaultContext` in `routers/` and `cmd/` (go-gitea#26076) Categorize admin settings sidebar panel (go-gitea#26030) [skip ci] Updated translations via Crowdin Fix duplicated url prefix on issue context menu (go-gitea#26066) Add context parameter to some database functions (go-gitea#26055) Fix branch list auth (go-gitea#26041) Fix the truncate and alignment problem for some admin tables (go-gitea#26042) Update secrets.en-us.md (go-gitea#26057) ...
2 parents e1663fa + d0bdfbc commit 6f0b317

File tree

109 files changed

+1034
-566
lines changed

Some content is hidden

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

109 files changed

+1034
-566
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22
8+
9+
* SECURITY
10+
* Disallow dangerous URL schemes (#25960) (#25964)
11+
* ENHANCEMENTS
12+
* Show the mismatched ROOT_URL warning on the sign-in page if OAuth2 is enabled (#25947) (#25972)
13+
* Make pending commit status yellow again (#25935) (#25968)
14+
* BUGFIXES
15+
* Fix version in rpm repodata/primary.xml.gz (#26009) (#26048)
16+
* Fix env config parsing for "GITEA____APP_NAME" (#26001) (#26013)
17+
* ParseScope with owner/repo always sets owner to zero (#25987) (#25989)
18+
* Fix SSPI auth panic (#25955) (#25969)
19+
* Avoid creating directories when loading config (#25944) (#25957)
20+
* Make environment-to-ini work with INSTALL_LOCK=true (#25926) (#25937)
21+
* Ignore `runs-on` with expressions when warning no matched runners (#25917) (#25933)
22+
* Avoid opening/closing PRs which are already merged (#25883) (#25903)
23+
* DOCS
24+
* RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020)
25+
* Correctly refer to dev tags as nightly in the docker docs (#26004) (#26019)
26+
* Update path related documents (#25417) (#25982)
27+
* MISC
28+
* Adding remaining enum for migration repo model type. (#26021) (#26034)
29+
* Fix the route for pull-request's authors (#26016) (#26018)
30+
* Fix commit status color on dashboard repolist (#25993) (#25998)
31+
* Avoid hard-coding height in language dropdown menu (#25986) (#25997)
32+
* Add shutting down notice (#25920) (#25922)
33+
* Fix incorrect milestone count when provide a keyword (#25880) (#25904)
34+
735
## [1.20.0](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) - 2023-07-16
836

937
* BREAKING

assets/go-licenses.json

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

cmd/admin.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package cmd
66

77
import (
8+
"context"
89
"errors"
910
"fmt"
1011
"net/url"
@@ -297,10 +298,12 @@ var (
297298
&cli.BoolFlag{
298299
Name: "force-smtps",
299300
Usage: "SMTPS is always used on port 465. Set this to force SMTPS on other ports.",
301+
Value: true,
300302
},
301303
&cli.BoolFlag{
302304
Name: "skip-verify",
303305
Usage: "Skip TLS verify.",
306+
Value: true,
304307
},
305308
&cli.StringFlag{
306309
Name: "helo-hostname",
@@ -310,6 +313,7 @@ var (
310313
&cli.BoolFlag{
311314
Name: "disable-helo",
312315
Usage: "Disable SMTP helo.",
316+
Value: true,
313317
},
314318
&cli.StringFlag{
315319
Name: "allowed-domains",
@@ -319,10 +323,12 @@ var (
319323
&cli.BoolFlag{
320324
Name: "skip-local-2fa",
321325
Usage: "Skip 2FA to log on.",
326+
Value: true,
322327
},
323328
&cli.BoolFlag{
324329
Name: "active",
325330
Usage: "This Authentication Source is Activated.",
331+
Value: true,
326332
},
327333
}
328334

@@ -373,7 +379,7 @@ func runRepoSyncReleases(_ *cli.Context) error {
373379
continue
374380
}
375381

376-
oldnum, err := getReleaseCount(repo.ID)
382+
oldnum, err := getReleaseCount(ctx, repo.ID)
377383
if err != nil {
378384
log.Warn(" GetReleaseCountByRepoID: %v", err)
379385
}
@@ -385,7 +391,7 @@ func runRepoSyncReleases(_ *cli.Context) error {
385391
continue
386392
}
387393

388-
count, err = getReleaseCount(repo.ID)
394+
count, err = getReleaseCount(ctx, repo.ID)
389395
if err != nil {
390396
log.Warn(" GetReleaseCountByRepoID: %v", err)
391397
gitRepo.Close()
@@ -401,9 +407,9 @@ func runRepoSyncReleases(_ *cli.Context) error {
401407
return nil
402408
}
403409

404-
func getReleaseCount(id int64) (int64, error) {
410+
func getReleaseCount(ctx context.Context, id int64) (int64, error) {
405411
return repo_model.GetReleaseCountByRepoID(
406-
db.DefaultContext,
412+
ctx,
407413
id,
408414
repo_model.FindReleasesOptions{
409415
IncludeTags: true,

cmd/manager_logging.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ var (
117117
Name: "rotate",
118118
Aliases: []string{"r"},
119119
Usage: "Rotate logs",
120+
Value: true,
120121
},
121122
&cli.Int64Flag{
122123
Name: "max-size",
@@ -127,6 +128,7 @@ var (
127128
Name: "daily",
128129
Aliases: []string{"d"},
129130
Usage: "Rotate logs daily",
131+
Value: true,
130132
},
131133
&cli.IntFlag{
132134
Name: "max-days",
@@ -137,6 +139,7 @@ var (
137139
Name: "compress",
138140
Aliases: []string{"z"},
139141
Usage: "Compress rotated logs",
142+
Value: true,
140143
},
141144
&cli.IntFlag{
142145
Name: "compression-level",

docs/content/doc/usage/actions/act-runner.en-us.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ Note that the repository may still use instance-level or organization-level runn
110110

111111
The level of the runner determines where to obtain the registration token.
112112

113-
- Instance level: The admin settings page, like `<your_gitea.com>/admin/runners`.
114-
- Organization level: The organization settings page, like `<your_gitea.com>/<org>/settings/runners`.
115-
- Repository level: The repository settings page, like `<your_gitea.com>/<owner>/<repo>/settings/runners`.
113+
- Instance level: The admin settings page, like `<your_gitea.com>/admin/actions/runners`.
114+
- Organization level: The organization settings page, like `<your_gitea.com>/<org>/settings/actions/runners`.
115+
- Repository level: The repository settings page, like `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`.
116116

117117
If you cannot see the settings page, please make sure that you have the right permissions and that Actions have been enabled.
118118

docs/content/doc/usage/actions/act-runner.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ docker run -v $(pwd)/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ...
109109

110110
Runner级别决定了从哪里获取注册令牌。
111111

112-
- 实例级别:管理员设置页面,例如 `<your_gitea.com>/admin/runners`
113-
- 组织级别:组织设置页面,例如 `<your_gitea.com>/<org>/settings/runners`
114-
- 存储库级别:存储库设置页面,例如 `<your_gitea.com>/<owner>/<repo>/settings/runners`
112+
- 实例级别:管理员设置页面,例如 `<your_gitea.com>/admin/actions/runners`
113+
- 组织级别:组织设置页面,例如 `<your_gitea.com>/<org>/settings/actions/runners`
114+
- 存储库级别:存储库设置页面,例如 `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`
115115

116116
如果您无法看到设置页面,请确保您具有正确的权限并且已启用 Actions。
117117

docs/content/doc/usage/actions/quickstart.en-us.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ If you are unsure which address to use, the LAN address is usually the right cho
6666

6767
`token` is used for authentication and identification, such as `P2U1U0oB4XaRCi8azcngmPCLbRpUGapalhmddh23`.
6868
It is one-time use only and cannot be used to register multiple runners.
69-
You can obtain tokens from `<your_gitea.com>/admin/runners`.
69+
You can obtain different levels of 'tokens' from the following places to create the corresponding level of' runners':
70+
71+
- Instance level: The admin settings page, like `<your_gitea.com>/admin/actions/runners`.
72+
- Organization level: The organization settings page, like `<your_gitea.com>/<org>/settings/actions/runners`.
73+
- Repository level: The repository settings page, like `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`.
7074

7175
![register runner](/images/usage/actions/register-runner.png)
7276

docs/content/doc/usage/actions/quickstart.zh-cn.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ Runner和Job容器(由Runner启动以执行Job)将连接到此地址。
6666

6767
`token` 用于身份验证和标识,例如 `P2U1U0oB4XaRCi8azcngmPCLbRpUGapalhmddh23`
6868
它只能使用一次,并且不能用于注册多个Runner。
69-
您可以从 `<your_gitea.com>/admin/runners` 获取令牌。
69+
您可以从以下位置获取不同级别的`token`,从而创建出相应级别的`runner`
70+
71+
- 实例级别:管理员设置页面,例如 `<your_gitea.com>/admin/actions/runners`
72+
- 组织级别:组织设置页面,例如 `<your_gitea.com>/<org>/settings/actions/runners`
73+
- 存储库级别:存储库设置页面,例如 `<your_gitea.com>/<owner>/<repo>/settings/actions/runners`
7074

7175
![register runner](/images/usage/actions/register-runner.png)
7276

docs/content/doc/usage/secrets.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
# Secrets
1919

2020
Secrets allow you to store sensitive information in your user, organization or repository.
21-
Secrets are available on Gitea 1.19+.
21+
Secrets are available on Gitea 1.19+ and are only visible in 1.20+ when ACTIONS are enabled.
2222

2323
# Naming your secrets
2424

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ require (
4141
github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
4242
github.com/go-chi/chi/v5 v5.0.8
4343
github.com/go-chi/cors v1.2.1
44+
github.com/go-co-op/gocron v1.30.1
4445
github.com/go-enry/go-enry/v2 v2.8.4
4546
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
4647
github.com/go-git/go-billy/v5 v5.4.1
@@ -52,7 +53,6 @@ require (
5253
github.com/go-webauthn/webauthn v0.8.6
5354
github.com/gobwas/glob v0.2.3
5455
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
55-
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/v5 v5.0.0
5858
github.com/google/go-github/v53 v53.2.0
@@ -253,6 +253,7 @@ require (
253253
github.com/rhysd/actionlint v1.6.25 // indirect
254254
github.com/rivo/uniseg v0.4.4 // indirect
255255
github.com/robfig/cron v1.2.0 // indirect
256+
github.com/robfig/cron/v3 v3.0.1 // indirect
256257
github.com/rogpeppe/go-internal v1.11.0 // indirect
257258
github.com/rs/xid v1.5.0 // indirect
258259
github.com/russross/blackfriday/v2 v2.1.0 // indirect

0 commit comments

Comments
 (0)