Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaofficial/main'
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
zjjhot committed Jul 25, 2023
2 parents e1663fa + d0bdfbc commit 6f0b317
Show file tree
Hide file tree
Showing 109 changed files with 1,034 additions and 566 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,34 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io).

## [1.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22

* SECURITY
* Disallow dangerous URL schemes (#25960) (#25964)
* ENHANCEMENTS
* Show the mismatched ROOT_URL warning on the sign-in page if OAuth2 is enabled (#25947) (#25972)
* Make pending commit status yellow again (#25935) (#25968)
* BUGFIXES
* Fix version in rpm repodata/primary.xml.gz (#26009) (#26048)
* Fix env config parsing for "GITEA____APP_NAME" (#26001) (#26013)
* ParseScope with owner/repo always sets owner to zero (#25987) (#25989)
* Fix SSPI auth panic (#25955) (#25969)
* Avoid creating directories when loading config (#25944) (#25957)
* Make environment-to-ini work with INSTALL_LOCK=true (#25926) (#25937)
* Ignore `runs-on` with expressions when warning no matched runners (#25917) (#25933)
* Avoid opening/closing PRs which are already merged (#25883) (#25903)
* DOCS
* RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020)
* Correctly refer to dev tags as nightly in the docker docs (#26004) (#26019)
* Update path related documents (#25417) (#25982)
* MISC
* Adding remaining enum for migration repo model type. (#26021) (#26034)
* Fix the route for pull-request's authors (#26016) (#26018)
* Fix commit status color on dashboard repolist (#25993) (#25998)
* Avoid hard-coding height in language dropdown menu (#25986) (#25997)
* Add shutting down notice (#25920) (#25922)
* Fix incorrect milestone count when provide a keyword (#25880) (#25904)

## [1.20.0](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) - 2023-07-16

* BREAKING
Expand Down
15 changes: 10 additions & 5 deletions assets/go-licenses.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions cmd/admin.go
Expand Up @@ -5,6 +5,7 @@
package cmd

import (
"context"
"errors"
"fmt"
"net/url"
Expand Down Expand Up @@ -297,10 +298,12 @@ var (
&cli.BoolFlag{
Name: "force-smtps",
Usage: "SMTPS is always used on port 465. Set this to force SMTPS on other ports.",
Value: true,
},
&cli.BoolFlag{
Name: "skip-verify",
Usage: "Skip TLS verify.",
Value: true,
},
&cli.StringFlag{
Name: "helo-hostname",
Expand All @@ -310,6 +313,7 @@ var (
&cli.BoolFlag{
Name: "disable-helo",
Usage: "Disable SMTP helo.",
Value: true,
},
&cli.StringFlag{
Name: "allowed-domains",
Expand All @@ -319,10 +323,12 @@ var (
&cli.BoolFlag{
Name: "skip-local-2fa",
Usage: "Skip 2FA to log on.",
Value: true,
},
&cli.BoolFlag{
Name: "active",
Usage: "This Authentication Source is Activated.",
Value: true,
},
}

Expand Down Expand Up @@ -373,7 +379,7 @@ func runRepoSyncReleases(_ *cli.Context) error {
continue
}

oldnum, err := getReleaseCount(repo.ID)
oldnum, err := getReleaseCount(ctx, repo.ID)
if err != nil {
log.Warn(" GetReleaseCountByRepoID: %v", err)
}
Expand All @@ -385,7 +391,7 @@ func runRepoSyncReleases(_ *cli.Context) error {
continue
}

count, err = getReleaseCount(repo.ID)
count, err = getReleaseCount(ctx, repo.ID)
if err != nil {
log.Warn(" GetReleaseCountByRepoID: %v", err)
gitRepo.Close()
Expand All @@ -401,9 +407,9 @@ func runRepoSyncReleases(_ *cli.Context) error {
return nil
}

func getReleaseCount(id int64) (int64, error) {
func getReleaseCount(ctx context.Context, id int64) (int64, error) {
return repo_model.GetReleaseCountByRepoID(
db.DefaultContext,
ctx,
id,
repo_model.FindReleasesOptions{
IncludeTags: true,
Expand Down
3 changes: 3 additions & 0 deletions cmd/manager_logging.go
Expand Up @@ -117,6 +117,7 @@ var (
Name: "rotate",
Aliases: []string{"r"},
Usage: "Rotate logs",
Value: true,
},
&cli.Int64Flag{
Name: "max-size",
Expand All @@ -127,6 +128,7 @@ var (
Name: "daily",
Aliases: []string{"d"},
Usage: "Rotate logs daily",
Value: true,
},
&cli.IntFlag{
Name: "max-days",
Expand All @@ -137,6 +139,7 @@ var (
Name: "compress",
Aliases: []string{"z"},
Usage: "Compress rotated logs",
Value: true,
},
&cli.IntFlag{
Name: "compression-level",
Expand Down
6 changes: 3 additions & 3 deletions docs/content/doc/usage/actions/act-runner.en-us.md
Expand Up @@ -110,9 +110,9 @@ Note that the repository may still use instance-level or organization-level runn

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

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

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

Expand Down
6 changes: 3 additions & 3 deletions docs/content/doc/usage/actions/act-runner.zh-cn.md
Expand Up @@ -109,9 +109,9 @@ docker run -v $(pwd)/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ...

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

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

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

Expand Down
6 changes: 5 additions & 1 deletion docs/content/doc/usage/actions/quickstart.en-us.md
Expand Up @@ -66,7 +66,11 @@ If you are unsure which address to use, the LAN address is usually the right cho

`token` is used for authentication and identification, such as `P2U1U0oB4XaRCi8azcngmPCLbRpUGapalhmddh23`.
It is one-time use only and cannot be used to register multiple runners.
You can obtain tokens from `<your_gitea.com>/admin/runners`.
You can obtain different levels of 'tokens' from the following places to create the corresponding level of' runners':

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

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

Expand Down
6 changes: 5 additions & 1 deletion docs/content/doc/usage/actions/quickstart.zh-cn.md
Expand Up @@ -66,7 +66,11 @@ Runner和Job容器(由Runner启动以执行Job)将连接到此地址。

`token` 用于身份验证和标识,例如 `P2U1U0oB4XaRCi8azcngmPCLbRpUGapalhmddh23`
它只能使用一次,并且不能用于注册多个Runner。
您可以从 `<your_gitea.com>/admin/runners` 获取令牌。
您可以从以下位置获取不同级别的`token`,从而创建出相应级别的`runner`

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

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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/usage/secrets.en-us.md
Expand Up @@ -18,7 +18,7 @@ menu:
# Secrets

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

# Naming your secrets

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Expand Up @@ -41,6 +41,7 @@ require (
github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
github.com/go-chi/chi/v5 v5.0.8
github.com/go-chi/cors v1.2.1
github.com/go-co-op/gocron v1.30.1
github.com/go-enry/go-enry/v2 v2.8.4
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
github.com/go-git/go-billy/v5 v5.4.1
Expand All @@ -52,7 +53,6 @@ require (
github.com/go-webauthn/webauthn v0.8.6
github.com/gobwas/glob v0.2.3
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/google/go-github/v53 v53.2.0
Expand Down Expand Up @@ -253,6 +253,7 @@ require (
github.com/rhysd/actionlint v1.6.25 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand Down

0 comments on commit 6f0b317

Please sign in to comment.