Skip to content

Commit 0081ef8

Browse files
committed
Merge branch 'main' into patch3
2 parents c8b64c7 + 6b42ea1 commit 0081ef8

File tree

687 files changed

+5525
-4893
lines changed

Some content is hidden

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

687 files changed

+5525
-4893
lines changed

.eslintrc.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module.exports = {
9191
plugins: ['@vitest/eslint-plugin'],
9292
globals: vitestPlugin.environments.env.globals,
9393
rules: {
94+
'github/unescaped-html-literal': [0],
9495
'@vitest/consistent-test-filename': [0],
9596
'@vitest/consistent-test-it': [0],
9697
'@vitest/expect-expect': [0],
@@ -423,7 +424,7 @@ module.exports = {
423424
'github/no-useless-passive': [2],
424425
'github/prefer-observers': [2],
425426
'github/require-passive-events': [2],
426-
'github/unescaped-html-literal': [0],
427+
'github/unescaped-html-literal': [2],
427428
'grouped-accessor-pairs': [2],
428429
'guard-for-in': [0],
429430
'id-blacklist': [0],

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ linters:
4545
desc: do not use the ini package, use gitea's config system instead
4646
- pkg: gitea.com/go-chi/cache
4747
desc: do not use the go-chi cache package, use gitea's cache system
48+
nolintlint:
49+
allow-unused: false
50+
require-explanation: true
51+
require-specific: true
4852
gocritic:
53+
enabled-checks:
54+
- equalFold
4955
disabled-checks:
5056
- ifElseChain
5157
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
@@ -83,6 +89,10 @@ linters:
8389
- name: unreachable-code
8490
- name: var-declaration
8591
- name: var-naming
92+
arguments:
93+
- [] # AllowList - do not remove as args for the rule are positional and won't work without lists first
94+
- [] # DenyList
95+
- - skip-package-name-checks: true # supress errors from underscore in migration packages
8696
staticcheck:
8797
checks:
8898
- all

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ These are the values to which people in the Gitea community should aspire.
3030
- **Be constructive.**
3131
- Avoid derailing: stay on topic; if you want to talk about something else, start a new conversation.
3232
- Avoid unconstructive criticism: don't merely decry the current state of affairs; offer—or at least solicit—suggestions as to how things may be improved.
33-
- Avoid snarking (pithy, unproductive, sniping comments)
33+
- Avoid snarking (pithy, unproductive, sniping comments).
3434
- Avoid discussing potentially offensive or sensitive issues; this all too often leads to unnecessary conflict.
3535
- Avoid microaggressions (brief and commonplace verbal, behavioral and environmental indignities that communicate hostile, derogatory or negative slights and insults to a person or group).
3636
- **Be responsible.**
@@ -42,7 +42,7 @@ People are complicated. You should expect to be misunderstood and to misundersta
4242

4343
### Our Pledge
4444

45-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
45+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
4646

4747
### Our Standards
4848

Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ COMMA := ,
2626
XGO_VERSION := go-1.24.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
29-
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.2.1
30-
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2
29+
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3
30+
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.8.0
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.12
33-
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.6.0
34-
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0
33+
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.7.0
34+
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.32.3
3535
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
3636
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
3737
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
3838
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1
39-
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.19.0
40-
GOPLS_MODERNIZE_PACKAGE ?= golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.19.0
39+
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.19.1
40+
GOPLS_MODERNIZE_PACKAGE ?= golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.19.1
4141

4242
DOCKER_IMAGE ?= gitea/gitea
4343
DOCKER_TAG ?= latest
@@ -81,7 +81,6 @@ ifeq ($(RACE_ENABLED),true)
8181
endif
8282

8383
STORED_VERSION_FILE := VERSION
84-
HUGO_VERSION ?= 0.111.3
8584

8685
GITHUB_REF_TYPE ?= branch
8786
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Expected workflow is: Fork -> Patch -> Push -> Pull Request
8080

8181
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://translate.gitea.com)
8282

83-
Translations are done through [Crowdin](https://translate.gitea.com). If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
83+
Translations are done through [Crowdin](https://translate.gitea.com). If you want to translate to a new language, ask one of the managers in the Crowdin project to add a new language there.
8484

85-
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
85+
You can also just create an issue for adding a language or ask on Discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty, but we hope to fill it as questions pop up.
8686

8787
Get more information from [documentation](https://docs.gitea.com/contributing/localization).
8888

SECURITY.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Please **DO NOT** file a public issue, instead send your report privately to `se
1414

1515
Due to the sensitive nature of security information, you can use the below GPG public key to encrypt your mail body.
1616

17-
The PGP key is valid until July 9, 2025.
17+
The PGP key is valid until July 4, 2026.
1818

1919
```
2020
Key ID: 6FCD2D5B
2121
Key Type: RSA
22-
Expires: 7/9/2025
22+
Expires: 7/4/2026
2323
Key Size: 4096/4096
2424
Fingerprint: 3DE0 3D1E 144A 7F06 9359 99DC AAFD 2381 6FCD 2D5B
2525
```
@@ -42,18 +42,18 @@ lzpAjnN9/KLtQroutrm+Ft0mdjDiJUeFVl1cOHDhoyfCsQh62HumoyZoZvqzQd6e
4242
AbN11nq6aViMe2Q3je1AbiBnRnQSHxt1Tc8X4IshO3MQK1Sk7oPI6LA5oQARAQAB
4343
tCJHaXRlYSBTZWN1cml0eSA8c2VjdXJpdHlAZ2l0ZWEuaW8+iQJXBBMBCABBAhsD
4444
BQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAFiEEPeA9HhRKfwaTWZncqv0jgW/N
45-
LVsFAmaMse0FCQW4fW8ACgkQqv0jgW/NLVtXLg/+PF4G9Jhlui15BTNlEBJAV2P/
46-
1QlAV2krk0fP7tykn0FR9RfGIfVV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74+
bwLYa3JmPgj2rEv4993dvrJbQhpGd082HOxOsllCs8pgNq1SnXpWYfcGTgGKC3ts
75+
U8YZUUJUQ7mi2L8Tv3ix20c9EiGmA30JAmA8eZTC3cWup91ZkkVBFRml2czTXajd
76+
RWZ6GbHV5503ueDQcB8yBVgF3CSixs67+dGSbD3p86OqGrjAcJzM5TFbNKcnGLdE
77+
kGbZpNwAISy750lXzXKmyrh5RTCeTOQerbwCMBvHZO+HAevA/LXDTw2OAiSIQlP5
78+
sYA4sFYLQ30OAkgJcmdp/pSgVj/erNtSN07ClrOpDb/uFpQymO6K2h0Pst3feNVK
79+
9M2VbqL9C51z/wyHLg==
80+
=SfZA
8181
-----END PGP PUBLIC KEY BLOCK-----
8282
8383
```

cmd/embedded.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,14 @@ func collectAssetFilesByPattern(c *cli.Command, globs []glob.Glob, path string,
295295
}
296296
}
297297

298-
func compileCollectPatterns(args []string) ([]glob.Glob, error) {
298+
func compileCollectPatterns(args []string) (_ []glob.Glob, err error) {
299299
if len(args) == 0 {
300300
args = []string{"**"}
301301
}
302302
pat := make([]glob.Glob, len(args))
303303
for i := range args {
304-
if g, err := glob.Compile(args[i], '/'); err != nil {
305-
return nil, fmt.Errorf("'%s': Invalid glob pattern: %w", args[i], err)
306-
} else { //nolint:revive
307-
pat[i] = g
304+
if pat[i], err = glob.Compile(args[i], '/'); err != nil {
305+
return nil, fmt.Errorf("invalid glob patterh %q: %w", args[i], err)
308306
}
309307
}
310308
return pat, nil

contrib/backport/backport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2023 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
//nolint:forbidigo
4+
//nolint:forbidigo // use of print functions is allowed in cli
55
package main
66

77
import (

models/actions/run_job.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ func AggregateJobStatus(jobs []*ActionRunJob) Status {
185185
return StatusSuccess
186186
case hasCancelled:
187187
return StatusCancelled
188-
case hasFailure:
189-
return StatusFailure
190188
case hasRunning:
191189
return StatusRunning
190+
case hasFailure:
191+
return StatusFailure
192192
case hasWaiting:
193193
return StatusWaiting
194194
case hasBlocked:

models/actions/run_job_status_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ func TestAggregateJobStatus(t *testing.T) {
5858
{[]Status{StatusCancelled, StatusRunning}, StatusCancelled},
5959
{[]Status{StatusCancelled, StatusBlocked}, StatusCancelled},
6060

61-
// failure with other status, fail fast
62-
// Should "running" win? Maybe no: old code does make "running" win, but GitHub does fail fast.
61+
// failure with other status, usually fail fast, but "running" wins to match GitHub's behavior
62+
// another reason that we can't make "failure" wins over "running": it would cause a weird behavior that user cannot cancel a workflow or get current running workflows correctly by filter after a job fail.
6363
{[]Status{StatusFailure}, StatusFailure},
6464
{[]Status{StatusFailure, StatusSuccess}, StatusFailure},
6565
{[]Status{StatusFailure, StatusSkipped}, StatusFailure},
6666
{[]Status{StatusFailure, StatusCancelled}, StatusCancelled},
6767
{[]Status{StatusFailure, StatusWaiting}, StatusFailure},
68-
{[]Status{StatusFailure, StatusRunning}, StatusFailure},
68+
{[]Status{StatusFailure, StatusRunning}, StatusRunning},
6969
{[]Status{StatusFailure, StatusBlocked}, StatusFailure},
7070

7171
// skipped with other status

0 commit comments

Comments
 (0)