Skip to content

Commit 1434f7a

Browse files
committed
Merge remote-tracking branch 'giteaoffical/main'
* giteaoffical/main: (23 commits) Search branches (go-gitea#27055) Fix wrong migration for email address (go-gitea#27106) [skip ci] Updated translations via Crowdin Support `.git-blame-ignore-revs` file (go-gitea#26395) Add `RemoteAddress` to mirrors (go-gitea#26952) Upgrading the actions/checkout@4 (go-gitea#27096) Next round of `db.DefaultContext` refactor (go-gitea#27089) Ui correction in mobile view nav bar left aligned items. (go-gitea#27046) Add missing deps to files-changed (go-gitea#27100) Use db.WithTx for AddTeamMember to avoid ctx abuse (go-gitea#27095) Drop Node.js 16 and update js dependencies (go-gitea#27094) Fix NPE when editing OAuth2 applications (go-gitea#27078) Use `print` instead of `printf` (go-gitea#27093) Add tests for db indexer in indexer_test.go (go-gitea#27087) [skip ci] Updated translations via Crowdin Allow empty Conan files (go-gitea#27092) Actions are no longer experimental, so enable them by default (go-gitea#27054) Update brew installation documentation since gitea moved to brew core package (go-gitea#27070) More refactoring of `db.DefaultContext` (go-gitea#27083) [skip ci] Updated translations via Crowdin ...
2 parents 78fb7f3 + 47b8788 commit 1434f7a

File tree

320 files changed

+2606
-2202
lines changed

Some content is hidden

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

320 files changed

+2606
-2202
lines changed

.github/workflows/cron-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'go-gitea/gitea'
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: actions/setup-go@v4
1515
with:
1616
go-version: "~1.21"

.github/workflows/cron-translations.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'go-gitea/gitea'
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: download from crowdin
1515
uses: docker://jonasfranz/crowdin
1616
env:
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
if: github.repository == 'go-gitea/gitea'
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: push translations to crowdin
4040
uses: docker://jonasfranz/crowdin
4141
env:

.github/workflows/files-changed.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
swagger: ${{ steps.changes.outputs.swagger }}
3535
yaml: ${{ steps.changes.outputs.yaml }}
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838
- uses: dorny/paths-filter@v2
3939
id: changes
4040
with:
@@ -64,9 +64,12 @@ jobs:
6464
- "**/*.md"
6565
- "docs/**"
6666
- ".markdownlint.yaml"
67+
- "package.json"
68+
- "package-lock.json"
6769
6870
actions:
6971
- ".github/workflows/*"
72+
- "Makefile"
7073
7174
templates:
7275
- "templates/**/*.tmpl"
@@ -90,3 +93,5 @@ jobs:
9093
- "**/*.yml"
9194
- "**/*.yaml"
9295
- ".yamllint.yaml"
96+
- "pyproject.toml"
97+
- "poetry.lock"

.github/workflows/pull-compliance.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
needs: files-changed
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v4
2121
with:
2222
go-version: "~1.21"
@@ -31,7 +31,7 @@ jobs:
3131
needs: files-changed
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- uses: actions/setup-python@v4
3636
with:
3737
python-version: "3.11"
@@ -44,7 +44,7 @@ jobs:
4444
needs: files-changed
4545
runs-on: ubuntu-latest
4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
- uses: actions/setup-python@v4
4949
with:
5050
python-version: "3.11"
@@ -57,7 +57,7 @@ jobs:
5757
needs: files-changed
5858
runs-on: ubuntu-latest
5959
steps:
60-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
6161
- uses: actions/setup-node@v3
6262
with:
6363
node-version: 20
@@ -69,7 +69,7 @@ jobs:
6969
needs: files-changed
7070
runs-on: ubuntu-latest
7171
steps:
72-
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v4
7373
- uses: actions/setup-go@v4
7474
with:
7575
go-version: "~1.21"
@@ -86,7 +86,7 @@ jobs:
8686
needs: files-changed
8787
runs-on: ubuntu-latest
8888
steps:
89-
- uses: actions/checkout@v3
89+
- uses: actions/checkout@v4
9090
- uses: actions/setup-go@v4
9191
with:
9292
go-version: "~1.21"
@@ -101,7 +101,7 @@ jobs:
101101
needs: files-changed
102102
runs-on: ubuntu-latest
103103
steps:
104-
- uses: actions/checkout@v3
104+
- uses: actions/checkout@v4
105105
- uses: actions/setup-go@v4
106106
with:
107107
go-version: "~1.21"
@@ -114,7 +114,7 @@ jobs:
114114
needs: files-changed
115115
runs-on: ubuntu-latest
116116
steps:
117-
- uses: actions/checkout@v3
117+
- uses: actions/checkout@v4
118118
- uses: actions/setup-node@v3
119119
with:
120120
node-version: 20
@@ -129,7 +129,7 @@ jobs:
129129
needs: files-changed
130130
runs-on: ubuntu-latest
131131
steps:
132-
- uses: actions/checkout@v3
132+
- uses: actions/checkout@v4
133133
- uses: actions/setup-go@v4
134134
with:
135135
go-version: "~1.21"
@@ -161,7 +161,7 @@ jobs:
161161
needs: files-changed
162162
runs-on: ubuntu-latest
163163
steps:
164-
- uses: actions/checkout@v3
164+
- uses: actions/checkout@v4
165165
- uses: actions/setup-node@v3
166166
with:
167167
node-version: 20
@@ -174,6 +174,6 @@ jobs:
174174
needs: files-changed
175175
runs-on: ubuntu-latest
176176
steps:
177-
- uses: actions/checkout@v3
177+
- uses: actions/checkout@v4
178178
- uses: actions/setup-go@v4
179179
- run: make lint-actions

.github/workflows/pull-db-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
ports:
3939
- "9000:9000"
4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
- uses: actions/setup-go@v4
4343
with:
4444
go-version: "~1.21"
@@ -63,7 +63,7 @@ jobs:
6363
needs: files-changed
6464
runs-on: ubuntu-latest
6565
steps:
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767
- uses: actions/setup-go@v4
6868
with:
6969
go-version: "~1.21"
@@ -128,7 +128,7 @@ jobs:
128128
ports:
129129
- "9000:9000"
130130
steps:
131-
- uses: actions/checkout@v3
131+
- uses: actions/checkout@v4
132132
- uses: actions/setup-go@v4
133133
with:
134134
go-version: "~1.21"
@@ -178,7 +178,7 @@ jobs:
178178
- "587:587"
179179
- "993:993"
180180
steps:
181-
- uses: actions/checkout@v3
181+
- uses: actions/checkout@v4
182182
- uses: actions/setup-go@v4
183183
with:
184184
go-version: "~1.21"
@@ -210,7 +210,7 @@ jobs:
210210
ports:
211211
- "3306:3306"
212212
steps:
213-
- uses: actions/checkout@v3
213+
- uses: actions/checkout@v4
214214
- uses: actions/setup-go@v4
215215
with:
216216
go-version: "~1.21"
@@ -241,7 +241,7 @@ jobs:
241241
ports:
242242
- "1433:1433"
243243
steps:
244-
- uses: actions/checkout@v3
244+
- uses: actions/checkout@v4
245245
- uses: actions/setup-go@v4
246246
with:
247247
go-version: "~1.21"

.github/workflows/pull-e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
needs: files-changed
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v4
2121
with:
2222
go-version: "~1.21"

.github/workflows/release-nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
nightly-binary:
1313
runs-on: actuated-4cpu-16gb
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
1717
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
1818
- run: git fetch --unshallow --quiet --tags --force
@@ -58,7 +58,7 @@ jobs:
5858
nightly-docker-rootful:
5959
runs-on: actuated-4cpu-16gb
6060
steps:
61-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
6262
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
6363
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
6464
- run: git fetch --unshallow --quiet --tags --force
@@ -95,7 +95,7 @@ jobs:
9595
nightly-docker-rootless:
9696
runs-on: actuated-4cpu-16gb
9797
steps:
98-
- uses: actions/checkout@v3
98+
- uses: actions/checkout@v4
9999
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
100100
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
101101
- run: git fetch --unshallow --quiet --tags --force

cmd/admin_user_create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func runCreateUser(c *cli.Context) error {
115115

116116
// If this is the first user being created.
117117
// Take it as the admin and don't force a password update.
118-
if n := user_model.CountUsers(nil); n == 0 {
118+
if n := user_model.CountUsers(ctx, nil); n == 0 {
119119
changePassword = false
120120
}
121121

@@ -146,7 +146,7 @@ func runCreateUser(c *cli.Context) error {
146146
IsRestricted: restricted,
147147
}
148148

149-
if err := user_model.CreateUser(u, overwriteDefault); err != nil {
149+
if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil {
150150
return fmt.Errorf("CreateUser: %w", err)
151151
}
152152

@@ -156,7 +156,7 @@ func runCreateUser(c *cli.Context) error {
156156
UID: u.ID,
157157
}
158158

159-
if err := auth_model.NewAccessToken(t); err != nil {
159+
if err := auth_model.NewAccessToken(ctx, t); err != nil {
160160
return err
161161
}
162162

cmd/admin_user_generate_access_token.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func runGenerateAccessToken(c *cli.Context) error {
6363
UID: user.ID,
6464
}
6565

66-
exist, err := auth_model.AccessTokenByNameExists(t)
66+
exist, err := auth_model.AccessTokenByNameExists(ctx, t)
6767
if err != nil {
6868
return err
6969
}
@@ -79,7 +79,7 @@ func runGenerateAccessToken(c *cli.Context) error {
7979
t.Scope = accessTokenScope
8080

8181
// create the token
82-
if err := auth_model.NewAccessToken(t); err != nil {
82+
if err := auth_model.NewAccessToken(ctx, t); err != nil {
8383
return err
8484
}
8585

cmd/admin_user_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func runListUsers(c *cli.Context) error {
3333
return err
3434
}
3535

36-
users, err := user_model.GetAllUsers()
36+
users, err := user_model.GetAllUsers(ctx)
3737
if err != nil {
3838
return err
3939
}
@@ -48,7 +48,7 @@ func runListUsers(c *cli.Context) error {
4848
}
4949
}
5050
} else {
51-
twofa := user_model.UserList(users).GetTwoFaStatus()
51+
twofa := user_model.UserList(users).GetTwoFaStatus(ctx)
5252
fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\t2FA\n")
5353
for _, u := range users {
5454
fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin, twofa[u.ID])

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ LEVEL = Info
25622562

25632563
; [actions]
25642564
;; Enable/Disable actions capabilities
2565-
;ENABLED = false
2565+
;ENABLED = true
25662566
;;
25672567
;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
25682568
;DEFAULT_ACTIONS_URL = github

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ PROXY_HOSTS = *.github.com
13841384

13851385
## Actions (`actions`)
13861386

1387-
- `ENABLED`: **false**: Enable/Disable actions capabilities
1387+
- `ENABLED`: **true**: Enable/Disable actions capabilities
13881388
- `DEFAULT_ACTIONS_URL`: **github**: Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
13891389
- `STORAGE_TYPE`: **local**: Storage type for actions logs, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`
13901390
- `MINIO_BASE_PATH`: **actions_log/**: Minio base path on the bucket only available when STORAGE_TYPE is `minio`

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ PROXY_HOSTS = *.github.com
13311331

13321332
## Actions (`actions`)
13331333

1334-
- `ENABLED`: **false**:启用/禁用操作功能
1334+
- `ENABLED`: **true**:启用/禁用操作功能
13351335
- `DEFAULT_ACTIONS_URL`: **github**:获取操作插件的默认平台,`github`表示`https://github.com``self`表示当前的 Gitea 实例。
13361336
- `STORAGE_TYPE`: **local**:用于操作日志的存储类型,`local`表示本地磁盘,`minio`表示与S3兼容的对象存储服务,默认为`local`,或者使用定义为`[storage.xxx]`的其他名称。
13371337
- `MINIO_BASE_PATH`: **actions_log/**:Minio存储桶上的基本路径,仅在`STORAGE_TYPE``minio`时可用。

docs/content/installation/from-package.en-us.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Following the [deployment from binary](installation/from-binary.md) guide may wo
2424
but is not supported. To install Gitea via `brew`:
2525

2626
```
27-
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
2827
brew install gitea
2928
```
3029

docs/content/installation/from-package.fr-fr.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jo
3030
Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes :
3131

3232
```
33-
brew tap go-gitea/gitea
3433
brew install gitea
3534
```
3635

docs/content/installation/from-package.zh-cn.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ menu:
2222
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装](installation/from-binary.md)。在你安装了 `brew` 之后, 你可以执行以下命令:
2323

2424
```
25-
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
2625
brew install gitea
2726
```
2827

docs/content/installation/from-package.zh-tw.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ choco install gitea
3636
目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝](installation/from-binary.md)方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令:
3737

3838
```
39-
brew tap go-gitea/gitea
4039
brew install gitea
4140
```
4241

0 commit comments

Comments
 (0)