Skip to content

Commit af97cab

Browse files
authored
Merge branch 'main' into lunny/catfile_batch_refactor
2 parents 2454ab6 + 8a53413 commit af97cab

File tree

1,465 files changed

+23900
-21122
lines changed

Some content is hidden

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

1,465 files changed

+23900
-21122
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"name": "Gitea DevContainer",
33
"image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
4+
"containerEnv": {
5+
// override "local" from packaged version
6+
"GOTOOLCHAIN": "auto"
7+
},
48
"features": {
59
// installs nodejs into container
610
"ghcr.io/devcontainers/features/node:1": {
711
"version": "lts"
812
},
913
"ghcr.io/devcontainers/features/git-lfs:1.2.2": {},
10-
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
14+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
1115
"ghcr.io/devcontainers/features/python:1": {
1216
"version": "3.12"
1317
},

.eslintrc.cjs

Lines changed: 5 additions & 3 deletions
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],
@@ -325,6 +326,7 @@ module.exports = {
325326
'@typescript-eslint/no-unnecessary-type-arguments': [0],
326327
'@typescript-eslint/no-unnecessary-type-assertion': [2],
327328
'@typescript-eslint/no-unnecessary-type-constraint': [2],
329+
'@typescript-eslint/no-unnecessary-type-conversion': [2],
328330
'@typescript-eslint/no-unsafe-argument': [0],
329331
'@typescript-eslint/no-unsafe-assignment': [0],
330332
'@typescript-eslint/no-unsafe-call': [0],
@@ -423,7 +425,7 @@ module.exports = {
423425
'github/no-useless-passive': [2],
424426
'github/prefer-observers': [2],
425427
'github/require-passive-events': [2],
426-
'github/unescaped-html-literal': [0],
428+
'github/unescaped-html-literal': [2],
427429
'grouped-accessor-pairs': [2],
428430
'guard-for-in': [0],
429431
'id-blacklist': [0],
@@ -482,7 +484,7 @@ module.exports = {
482484
'max-nested-callbacks': [0],
483485
'max-params': [0],
484486
'max-statements': [0],
485-
'multiline-comment-style': [2, 'separate-lines'],
487+
'multiline-comment-style': [0],
486488
'new-cap': [0],
487489
'no-alert': [0],
488490
'no-array-constructor': [0], // handled by @typescript-eslint/no-array-constructor
@@ -644,7 +646,7 @@ module.exports = {
644646
'no-multi-str': [2],
645647
'no-negated-condition': [0],
646648
'no-nested-ternary': [0],
647-
'no-new-func': [2],
649+
'no-new-func': [0], // handled by @typescript-eslint/no-implied-eval
648650
'no-new-native-nonconstructor': [2],
649651
'no-new-object': [2],
650652
'no-new-symbol': [2],

.github/labeler.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ modifies/dependencies:
6161
- "package.json"
6262
- "package-lock.json"
6363
- "pyproject.toml"
64-
- "poetry.lock"
64+
- "uv.lock"
6565
- "go.mod"
6666
- "go.sum"
6767

@@ -81,3 +81,13 @@ docs-update-needed:
8181
- changed-files:
8282
- any-glob-to-any-file:
8383
- "custom/conf/app.example.ini"
84+
85+
topic/code-linting:
86+
- changed-files:
87+
- any-glob-to-any-file:
88+
- ".eslintrc.cjs"
89+
- ".golangci.yml"
90+
- ".markdownlint.yaml"
91+
- ".spectral.yaml"
92+
- ".yamllint.yaml"
93+
- "stylelint.config.js"

.github/workflows/files-changed.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- "tools/lint-templates-*.js"
7878
- "templates/**/*.tmpl"
7979
- "pyproject.toml"
80-
- "poetry.lock"
80+
- "uv.lock"
8181
8282
docker:
8383
- "Dockerfile"
@@ -98,4 +98,3 @@ jobs:
9898
- "**/*.yaml"
9999
- ".yamllint.yaml"
100100
- "pyproject.toml"
101-
- "poetry.lock"

.github/workflows/pull-compliance.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,13 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v4
35-
- uses: actions/setup-python@v5
36-
with:
37-
python-version: "3.12"
35+
- uses: astral-sh/setup-uv@v6
36+
- run: uv python install 3.12
3837
- uses: actions/setup-node@v4
3938
with:
4039
node-version: 24
4140
cache: npm
4241
cache-dependency-path: package-lock.json
43-
- run: pip install poetry
4442
- run: make deps-py
4543
- run: make deps-frontend
4644
- run: make lint-templates
@@ -51,10 +49,8 @@ jobs:
5149
runs-on: ubuntu-latest
5250
steps:
5351
- uses: actions/checkout@v4
54-
- uses: actions/setup-python@v5
55-
with:
56-
python-version: "3.12"
57-
- run: pip install poetry
52+
- uses: astral-sh/setup-uv@v6
53+
- run: uv python install 3.12
5854
- run: make deps-py
5955
- run: make lint-yaml
6056

.github/workflows/release-nightly.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ jobs:
7575
- name: Get cleaned branch name
7676
id: clean_name
7777
run: |
78-
# if main then say nightly otherwise cleanup name
79-
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
80-
echo "branch=nightly" >> "$GITHUB_OUTPUT"
81-
exit 0
82-
fi
8378
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
8479
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
8580
- name: Login to Docker Hub
@@ -122,11 +117,6 @@ jobs:
122117
- name: Get cleaned branch name
123118
id: clean_name
124119
run: |
125-
# if main then say nightly otherwise cleanup name
126-
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
127-
echo "branch=nightly" >> "$GITHUB_OUTPUT"
128-
exit 0
129-
fi
130120
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
131121
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
132122
- name: Login to Docker Hub

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,15 @@ prime/
109109

110110
# Manpage
111111
/man
112+
113+
# Ignore AI/LLM instruction files
114+
/.claude/
115+
/.cursorrules
116+
/.cursor/
117+
/.goosehints
118+
/.windsurfrules
119+
/.github/copilot-instructions.md
120+
/AGENT.md
121+
/CLAUDE.md
122+
/llms.txt
123+

.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

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ be reviewed by two maintainers and must pass the automatic tests.
591591
## Releasing Gitea
592592

593593
- Let $vmaj, $vmin and $vpat be Major, Minor and Patch version numbers, $vpat should be rc1, rc2, 0, 1, ...... $vmaj.$vmin will be kept the same as milestones on github or gitea in future.
594-
- Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody against in about serval hours.
594+
- Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody is against it in about several hours.
595595
- If this is a big version first you have to create PR for changelog on branch `main` with PRs with label `changelog` and after it has been merged do following steps:
596596
- Create `-dev` tag as `git tag -s -F release.notes v$vmaj.$vmin.0-dev` and push the tag as `git push origin v$vmaj.$vmin.0-dev`.
597597
- When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`

0 commit comments

Comments
 (0)