diff --git a/.changelog.yml b/.changelog.yml
index bfdee0c0ca..a7df8779de 100644
--- a/.changelog.yml
+++ b/.changelog.yml
@@ -22,20 +22,25 @@ groups:
name: FEATURES
labels:
- type/feature
- -
- name: API
- labels:
- - modifies/api
-
name: ENHANCEMENTS
labels:
- type/enhancement
- - type/refactoring
- - topic/ui
+ -
+ name: PERFORMANCE
+ labels:
+ - performance/memory
+ - performance/speed
+ - performance/bigrepo
+ - performance/cpu
-
name: BUGFIXES
labels:
- type/bug
+ -
+ name: API
+ labels:
+ - modifies/api
-
name: TESTING
labels:
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 9f9f6f27d1..ab30e1789d 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,6 +1,6 @@
{
"name": "Gitea DevContainer",
- "image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
+ "image": "mcr.microsoft.com/devcontainers/go:1.24-bookworm",
"features": {
// installs nodejs into container
"ghcr.io/devcontainers/features/node:1": {
diff --git a/.dockerignore b/.dockerignore
index b696e1603c..94aca6b8d3 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -79,18 +79,6 @@ cpu.out
/public/assets/fonts
/public/assets/img/avatar
/vendor
-/web_src/fomantic/node_modules
-/web_src/fomantic/build/*
-!/web_src/fomantic/build/semantic.js
-!/web_src/fomantic/build/semantic.css
-!/web_src/fomantic/build/themes
-/web_src/fomantic/build/themes/*
-!/web_src/fomantic/build/themes/default
-/web_src/fomantic/build/themes/default/assets/*
-!/web_src/fomantic/build/themes/default/assets/fonts
-/web_src/fomantic/build/themes/default/assets/fonts/*
-!/web_src/fomantic/build/themes/default/assets/fonts/icons.woff2
-!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
/VERSION
/.air
/.go-licenses
diff --git a/.editorconfig b/.editorconfig
index c0946ac997..13aa8d50f0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -12,11 +12,15 @@ insert_final_newline = true
[*.{go,tmpl,html}]
indent_style = tab
+[go.*]
+indent_style = tab
+
[templates/custom/*.tmpl]
insert_final_newline = false
[templates/swagger/v1_json.tmpl]
indent_style = space
+insert_final_newline = false
[templates/user/auth/oidc_wellknown.tmpl]
indent_style = space
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index abb9bde232..f9e1050240 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,3 +1,4 @@
+const vitestPlugin = require('@vitest/eslint-plugin');
const restrictedSyntax = ['WithStatement', 'ForInStatement', 'LabeledStatement', 'SequenceExpression'];
module.exports = {
@@ -37,8 +38,6 @@ module.exports = {
'eslint-plugin-regexp',
'eslint-plugin-sonarjs',
'eslint-plugin-unicorn',
- 'eslint-plugin-vitest',
- 'eslint-plugin-vitest-globals',
'eslint-plugin-wc',
],
env: {
@@ -46,6 +45,13 @@ module.exports = {
node: true,
},
overrides: [
+ {
+ files: ['**/*.cjs'],
+ rules: {
+ 'import-x/no-commonjs': [0],
+ '@typescript-eslint/no-require-imports': [0],
+ },
+ },
{
files: ['web_src/**/*'],
globals: {
@@ -82,59 +88,58 @@ module.exports = {
},
{
files: ['**/*.test.*', 'web_src/js/test/setup.ts'],
- env: {
- 'vitest-globals/env': true,
- },
+ plugins: ['@vitest/eslint-plugin'],
+ globals: vitestPlugin.environments.env.globals,
rules: {
- 'vitest/consistent-test-filename': [0],
- 'vitest/consistent-test-it': [0],
- 'vitest/expect-expect': [0],
- 'vitest/max-expects': [0],
- 'vitest/max-nested-describe': [0],
- 'vitest/no-alias-methods': [0],
- 'vitest/no-commented-out-tests': [0],
- 'vitest/no-conditional-expect': [0],
- 'vitest/no-conditional-in-test': [0],
- 'vitest/no-conditional-tests': [0],
- 'vitest/no-disabled-tests': [0],
- 'vitest/no-done-callback': [0],
- 'vitest/no-duplicate-hooks': [0],
- 'vitest/no-focused-tests': [0],
- 'vitest/no-hooks': [0],
- 'vitest/no-identical-title': [2],
- 'vitest/no-interpolation-in-snapshots': [0],
- 'vitest/no-large-snapshots': [0],
- 'vitest/no-mocks-import': [0],
- 'vitest/no-restricted-matchers': [0],
- 'vitest/no-restricted-vi-methods': [0],
- 'vitest/no-standalone-expect': [0],
- 'vitest/no-test-prefixes': [0],
- 'vitest/no-test-return-statement': [0],
- 'vitest/prefer-called-with': [0],
- 'vitest/prefer-comparison-matcher': [0],
- 'vitest/prefer-each': [0],
- 'vitest/prefer-equality-matcher': [0],
- 'vitest/prefer-expect-resolves': [0],
- 'vitest/prefer-hooks-in-order': [0],
- 'vitest/prefer-hooks-on-top': [2],
- 'vitest/prefer-lowercase-title': [0],
- 'vitest/prefer-mock-promise-shorthand': [0],
- 'vitest/prefer-snapshot-hint': [0],
- 'vitest/prefer-spy-on': [0],
- 'vitest/prefer-strict-equal': [0],
- 'vitest/prefer-to-be': [0],
- 'vitest/prefer-to-be-falsy': [0],
- 'vitest/prefer-to-be-object': [0],
- 'vitest/prefer-to-be-truthy': [0],
- 'vitest/prefer-to-contain': [0],
- 'vitest/prefer-to-have-length': [0],
- 'vitest/prefer-todo': [0],
- 'vitest/require-hook': [0],
- 'vitest/require-to-throw-message': [0],
- 'vitest/require-top-level-describe': [0],
- 'vitest/valid-describe-callback': [2],
- 'vitest/valid-expect': [2],
- 'vitest/valid-title': [2],
+ '@vitest/consistent-test-filename': [0],
+ '@vitest/consistent-test-it': [0],
+ '@vitest/expect-expect': [0],
+ '@vitest/max-expects': [0],
+ '@vitest/max-nested-describe': [0],
+ '@vitest/no-alias-methods': [0],
+ '@vitest/no-commented-out-tests': [0],
+ '@vitest/no-conditional-expect': [0],
+ '@vitest/no-conditional-in-test': [0],
+ '@vitest/no-conditional-tests': [0],
+ '@vitest/no-disabled-tests': [0],
+ '@vitest/no-done-callback': [0],
+ '@vitest/no-duplicate-hooks': [0],
+ '@vitest/no-focused-tests': [2],
+ '@vitest/no-hooks': [0],
+ '@vitest/no-identical-title': [2],
+ '@vitest/no-interpolation-in-snapshots': [0],
+ '@vitest/no-large-snapshots': [0],
+ '@vitest/no-mocks-import': [0],
+ '@vitest/no-restricted-matchers': [0],
+ '@vitest/no-restricted-vi-methods': [0],
+ '@vitest/no-standalone-expect': [0],
+ '@vitest/no-test-prefixes': [0],
+ '@vitest/no-test-return-statement': [0],
+ '@vitest/prefer-called-with': [0],
+ '@vitest/prefer-comparison-matcher': [0],
+ '@vitest/prefer-each': [0],
+ '@vitest/prefer-equality-matcher': [0],
+ '@vitest/prefer-expect-resolves': [0],
+ '@vitest/prefer-hooks-in-order': [0],
+ '@vitest/prefer-hooks-on-top': [2],
+ '@vitest/prefer-lowercase-title': [0],
+ '@vitest/prefer-mock-promise-shorthand': [0],
+ '@vitest/prefer-snapshot-hint': [0],
+ '@vitest/prefer-spy-on': [0],
+ '@vitest/prefer-strict-equal': [0],
+ '@vitest/prefer-to-be': [0],
+ '@vitest/prefer-to-be-falsy': [0],
+ '@vitest/prefer-to-be-object': [0],
+ '@vitest/prefer-to-be-truthy': [0],
+ '@vitest/prefer-to-contain': [0],
+ '@vitest/prefer-to-have-length': [0],
+ '@vitest/prefer-todo': [0],
+ '@vitest/require-hook': [0],
+ '@vitest/require-to-throw-message': [0],
+ '@vitest/require-top-level-describe': [0],
+ '@vitest/valid-describe-callback': [2],
+ '@vitest/valid-expect': [2],
+ '@vitest/valid-title': [2],
},
},
{
@@ -150,7 +155,7 @@ module.exports = {
'eslint-plugin-vue-scoped-css',
],
extends: [
- 'plugin:vue/vue3-recommended',
+ 'plugin:vue/recommended',
'plugin:vue-scoped-css/vue3-recommended',
],
rules: {
@@ -163,7 +168,7 @@ module.exports = {
{
files: ['tests/e2e/**'],
plugins: [
- 'eslint-plugin-playwright'
+ 'eslint-plugin-playwright',
],
extends: [
'plugin:playwright/recommended',
@@ -331,7 +336,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-unary-minus': [2],
'@typescript-eslint/no-unused-expressions': [0],
'@typescript-eslint/no-unused-vars': [2, {vars: 'all', args: 'all', caughtErrors: 'all', ignoreRestSiblings: false, argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}],
- '@typescript-eslint/no-use-before-define': [0],
+ '@typescript-eslint/no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true, typedefs: false, enums: false, ignoreTypeReferences: true}],
'@typescript-eslint/no-useless-constructor': [0],
'@typescript-eslint/no-useless-empty-export': [0],
'@typescript-eslint/no-wrapper-object-types': [2],
@@ -688,7 +693,7 @@ module.exports = {
'no-unused-labels': [2],
'no-unused-private-class-members': [2],
'no-unused-vars': [0], // handled by @typescript-eslint/no-unused-vars
- 'no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true}],
+ 'no-use-before-define': [0], // handled by @typescript-eslint/no-use-before-define
'no-use-extend-native/no-use-extend-native': [2],
'no-useless-backreference': [2],
'no-useless-call': [2],
diff --git a/.gitattributes b/.gitattributes
index 9fb4a4e83d..e218bbe25d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,8 +4,7 @@
/assets/*.json linguist-generated
/public/assets/img/svg/*.svg linguist-generated
/templates/swagger/v1_json.tmpl linguist-generated
+/options/fileicon/** linguist-generated
/vendor/** -text -eol linguist-vendored
-/web_src/fomantic/build/** linguist-generated
-/web_src/fomantic/_site/globals/site.variables linguist-language=Less
/web_src/js/vendor/** -text -eol linguist-vendored
Dockerfile.* linguist-language=Dockerfile
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 46efbcb194..0af43cd029 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -41,7 +41,7 @@ modifies/internal:
- ".dockerignore"
- "docker/**"
- ".editorconfig"
- - ".eslintrc.yaml"
+ - ".eslintrc.cjs"
- ".golangci.yml"
- ".gitpod.yml"
- ".markdownlint.yaml"
@@ -49,7 +49,7 @@ modifies/internal:
- "stylelint.config.js"
- ".yamllint.yaml"
- ".github/**"
- - ".gitea/"
+ - ".gitea/**"
- ".devcontainer/**"
- "build.go"
- "build/**"
@@ -73,9 +73,9 @@ modifies/go:
modifies/frontend:
- changed-files:
- any-glob-to-any-file:
- - "**/*.js"
- - "**/*.ts"
- - "**/*.vue"
+ - "*.js"
+ - "*.ts"
+ - "web_src/**"
docs-update-needed:
- changed-files:
diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml
index cd8386ecc5..c34066d318 100644
--- a/.github/workflows/cron-licenses.yml
+++ b/.github/workflows/cron-licenses.yml
@@ -1,8 +1,8 @@
name: cron-licenses
on:
- schedule:
- - cron: "7 0 * * 1" # every Monday at 00:07 UTC
+ # schedule:
+ # - cron: "7 0 * * 1" # every Monday at 00:07 UTC
workflow_dispatch:
jobs:
@@ -15,7 +15,7 @@ jobs:
with:
go-version-file: go.mod
check-latest: true
- - run: make generate-license generate-gitignore
+ - run: make generate-gitignore
timeout-minutes: 40
- name: push translations to repo
uses: appleboy/git-push-action@v0.0.3
diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml
index 7c1fb02442..be27537924 100644
--- a/.github/workflows/files-changed.yml
+++ b/.github/workflows/files-changed.yml
@@ -51,14 +51,16 @@ jobs:
- "options/locale/locale_en-US.ini"
frontend:
- - "**/*.js"
+ - "*.js"
+ - "*.ts"
- "web_src/**"
+ - "tools/*.js"
+ - "tools/*.ts"
- "assets/emoji.json"
- "package.json"
- "package-lock.json"
- "Makefile"
- - ".eslintrc.yaml"
- - "stylelint.config.js"
+ - ".eslintrc.cjs"
- ".npmrc"
docs:
@@ -85,6 +87,7 @@ jobs:
swagger:
- "templates/swagger/v1_json.tmpl"
+ - "templates/swagger/v1_input.json"
- "Makefile"
- "package.json"
- "package-lock.json"
diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml
index 7e988e0449..64090d6490 100644
--- a/.github/workflows/pull-compliance.yml
+++ b/.github/workflows/pull-compliance.yml
@@ -95,7 +95,7 @@ jobs:
go-version-file: go.mod
check-latest: true
- run: make deps-backend deps-tools
- - run: make lint-go-windows lint-go-vet
+ - run: make lint-go-windows lint-go-gitea-vet
env:
TAGS: bindata sqlite sqlite_unlock_notify
GOOS: windows
diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml
index 0b23de0a66..a3fd8ca621 100644
--- a/.github/workflows/pull-db-tests.yml
+++ b/.github/workflows/pull-db-tests.yml
@@ -98,7 +98,7 @@ jobs:
ports:
- "9200:9200"
meilisearch:
- image: getmeili/meilisearch:v1.2.0
+ image: getmeili/meilisearch:v1
env:
MEILI_ENV: development # disable auth
ports:
@@ -202,12 +202,10 @@ jobs:
test-mssql:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
- # specifying the version of ubuntu in use as mssql fails on newer kernels
- # pending resolution from vendor
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
services:
mssql:
- image: mcr.microsoft.com/mssql/server:2017-latest
+ image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
MSSQL_PID: Standard
diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml
index 2264c9e822..2558a16a71 100644
--- a/.github/workflows/release-nightly.yml
+++ b/.github/workflows/release-nightly.yml
@@ -59,6 +59,8 @@ jobs:
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
nightly-docker-rootful:
runs-on: namespace-profile-gitea-release-docker
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -85,17 +87,27 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: fetch go modules
run: make vendor
- name: build rootful docker image
uses: docker/build-push-action@v5
with:
context: .
- platforms: linux/amd64,linux/arm64
+ platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
- tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}
+ tags: |-
+ gitea/gitea:${{ steps.clean_name.outputs.branch }}
+ ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}
nightly-docker-rootless:
runs-on: namespace-profile-gitea-release-docker
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -122,6 +134,12 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: fetch go modules
run: make vendor
- name: build rootless docker image
@@ -131,4 +149,6 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
file: Dockerfile.rootless
- tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
+ tags: |-
+ gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
+ ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml
index a406602dc0..37b3ff57d2 100644
--- a/.github/workflows/release-tag-rc.yml
+++ b/.github/workflows/release-tag-rc.yml
@@ -69,6 +69,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
docker-rootful:
runs-on: namespace-profile-gitea-release-docker
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -79,7 +81,9 @@ jobs:
- uses: docker/metadata-action@v5
id: meta
with:
- images: gitea/gitea
+ images: |-
+ gitea/gitea
+ ghcr.io/go-gitea/gitea
flavor: |
latest=false
# 1.2.3-rc0
@@ -90,16 +94,24 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: build rootful docker image
uses: docker/build-push-action@v5
with:
context: .
- platforms: linux/amd64,linux/arm64
+ platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-rootless:
runs-on: namespace-profile-gitea-release-docker
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -110,7 +122,9 @@ jobs:
- uses: docker/metadata-action@v5
id: meta
with:
- images: gitea/gitea
+ images: |-
+ gitea/gitea
+ ghcr.io/go-gitea/gitea
# each tag below will have the suffix of -rootless
flavor: |
latest=false
@@ -123,11 +137,17 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: build rootless docker image
uses: docker/build-push-action@v5
with:
context: .
- platforms: linux/amd64,linux/arm64
+ platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
file: Dockerfile.rootless
tags: ${{ steps.meta.outputs.tags }}
diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml
index f67b76f408..4250623da0 100644
--- a/.github/workflows/release-tag-version.yml
+++ b/.github/workflows/release-tag-version.yml
@@ -14,6 +14,8 @@ concurrency:
jobs:
binary:
runs-on: namespace-profile-gitea-release-binary
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -71,6 +73,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
docker-rootful:
runs-on: namespace-profile-gitea-release-docker
+ permissions:
+ packages: write # to publish to ghcr.io
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -81,26 +85,34 @@ jobs:
- uses: docker/metadata-action@v5
id: meta
with:
- images: gitea/gitea
+ images: |-
+ gitea/gitea
+ ghcr.io/go-gitea/gitea
# this will generate tags in the following format:
# latest
# 1
# 1.2
# 1.2.3
tags: |
+ type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- type=semver,pattern={{version}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: build rootful docker image
uses: docker/build-push-action@v5
with:
context: .
- platforms: linux/amd64,linux/arm64
+ platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@@ -116,7 +128,9 @@ jobs:
- uses: docker/metadata-action@v5
id: meta
with:
- images: gitea/gitea
+ images: |-
+ gitea/gitea
+ ghcr.io/go-gitea/gitea
# each tag below will have the suffix of -rootless
flavor: |
suffix=-rootless,onlatest=true
@@ -126,19 +140,25 @@ jobs:
# 1.2
# 1.2.3
tags: |
+ type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- type=semver,pattern={{version}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GHCR using PAT
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: build rootless docker image
uses: docker/build-push-action@v5
with:
context: .
- platforms: linux/amd64,linux/arm64
+ platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
file: Dockerfile.rootless
tags: ${{ steps.meta.outputs.tags }}
diff --git a/.gitignore b/.gitignore
index d215468377..703be8f681 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,18 +84,6 @@ cpu.out
/public/assets/fonts
/public/assets/licenses.txt
/vendor
-/web_src/fomantic/node_modules
-/web_src/fomantic/build/*
-!/web_src/fomantic/build/semantic.js
-!/web_src/fomantic/build/semantic.css
-!/web_src/fomantic/build/themes
-/web_src/fomantic/build/themes/*
-!/web_src/fomantic/build/themes/default
-/web_src/fomantic/build/themes/default/assets/*
-!/web_src/fomantic/build/themes/default/assets/fonts
-/web_src/fomantic/build/themes/default/assets/fonts/*
-!/web_src/fomantic/build/themes/default/assets/fonts/icons.woff2
-!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
/VERSION
/.air
/.go-licenses
diff --git a/.golangci.yml b/.golangci.yml
index c39d7ac5f2..c176d2115c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,7 +1,9 @@
+version: "2"
+output:
+ sort-order:
+ - file
linters:
- enable-all: false
- disable-all: true
- fast: false
+ default: none
enable:
- bidichk
- depguard
@@ -9,139 +11,162 @@ linters:
- errcheck
- forbidigo
- gocritic
- - gofmt
- - gofumpt
- - gosimple
- govet
- ineffassign
+ - mirror
- nakedret
- nolintlint
+ - perfsprint
- revive
- staticcheck
- - stylecheck
- - tenv
- testifylint
- - typecheck
- unconvert
- - unused
- unparam
+ - unused
+ - usestdlibvars
+ - usetesting
- wastedassign
-
-run:
- timeout: 10m
-
-output:
- sort-results: true
- sort-order: [file]
- show-stats: true
-
-linters-settings:
- testifylint:
- disable:
- - go-require
- - require-error
- stylecheck:
- checks: ["all", "-ST1005", "-ST1003"]
- nakedret:
- max-func-lines: 0
- gocritic:
- disabled-checks:
- - ifElseChain
- - singleCaseSwitch # Every time this occurred in the code, there was no other way.
- revive:
- severity: error
+ settings:
+ depguard:
+ rules:
+ main:
+ deny:
+ - pkg: encoding/json
+ desc: use gitea's modules/json instead of encoding/json
+ - pkg: github.com/unknwon/com
+ desc: use gitea's util and replacements
+ - pkg: io/ioutil
+ desc: use os or io instead
+ - pkg: golang.org/x/exp
+ desc: it's experimental and unreliable
+ - pkg: code.gitea.io/gitea/modules/git/internal
+ desc: do not use the internal package, use AddXxx function instead
+ - pkg: gopkg.in/ini.v1
+ desc: do not use the ini package, use gitea's config system instead
+ - pkg: gitea.com/go-chi/cache
+ desc: do not use the go-chi cache package, use gitea's cache system
+ gocritic:
+ disabled-checks:
+ - ifElseChain
+ - singleCaseSwitch # Every time this occurred in the code, there was no other way.
+ revive:
+ severity: error
+ rules:
+ - name: atomic
+ - name: bare-return
+ - name: blank-imports
+ - name: constant-logical-expr
+ - name: context-as-argument
+ - name: context-keys-type
+ - name: dot-imports
+ - name: duplicated-imports
+ - name: empty-lines
+ - name: error-naming
+ - name: error-return
+ - name: error-strings
+ - name: errorf
+ - name: exported
+ - name: identical-branches
+ - name: if-return
+ - name: increment-decrement
+ - name: indent-error-flow
+ - name: modifies-value-receiver
+ - name: package-comments
+ - name: range
+ - name: receiver-naming
+ - name: redefines-builtin-id
+ - name: string-of-int
+ - name: superfluous-else
+ - name: time-naming
+ - name: unconditional-recursion
+ - name: unexported-return
+ - name: unreachable-code
+ - name: var-declaration
+ - name: var-naming
+ staticcheck:
+ checks:
+ - all
+ - -ST1003
+ - -ST1005
+ - -QF1001
+ - -QF1006
+ - -QF1008
+ testifylint:
+ disable:
+ - go-require
+ - require-error
+ usetesting:
+ os-temp-dir: true
+ exclusions:
+ generated: lax
+ presets:
+ - comments
+ - common-false-positives
+ - legacy
+ - std-error-handling
rules:
- - name: atomic
- - name: bare-return
- - name: blank-imports
- - name: constant-logical-expr
- - name: context-as-argument
- - name: context-keys-type
- - name: dot-imports
- - name: duplicated-imports
- - name: empty-lines
- - name: error-naming
- - name: error-return
- - name: error-strings
- - name: errorf
- - name: exported
- - name: identical-branches
- - name: if-return
- - name: increment-decrement
- - name: indent-error-flow
- - name: modifies-value-receiver
- - name: package-comments
- - name: range
- - name: receiver-naming
- - name: redefines-builtin-id
- - name: string-of-int
- - name: superfluous-else
- - name: time-naming
- - name: unconditional-recursion
- - name: unexported-return
- - name: unreachable-code
- - name: var-declaration
- - name: var-naming
- gofumpt:
- extra-rules: true
- depguard:
- rules:
- main:
- deny:
- - pkg: encoding/json
- desc: use gitea's modules/json instead of encoding/json
- - pkg: github.com/unknwon/com
- desc: use gitea's util and replacements
- - pkg: io/ioutil
- desc: use os or io instead
- - pkg: golang.org/x/exp
- desc: it's experimental and unreliable
- - pkg: code.gitea.io/gitea/modules/git/internal
- desc: do not use the internal package, use AddXxx function instead
- - pkg: gopkg.in/ini.v1
- desc: do not use the ini package, use gitea's config system instead
- - pkg: gitea.com/go-chi/cache
- desc: do not use the go-chi cache package, use gitea's cache system
-
+ - linters:
+ - dupl
+ - errcheck
+ - gocyclo
+ - gosec
+ - staticcheck
+ - unparam
+ path: _test\.go
+ - linters:
+ - dupl
+ - errcheck
+ - gocyclo
+ - gosec
+ path: models/migrations/v
+ - linters:
+ - forbidigo
+ path: cmd
+ - linters:
+ - dupl
+ text: (?i)webhook
+ - linters:
+ - gocritic
+ text: (?i)`ID' should not be capitalized
+ - linters:
+ - deadcode
+ - unused
+ text: (?i)swagger
+ - linters:
+ - staticcheck
+ text: (?i)argument x is overwritten before first use
+ - linters:
+ - gocritic
+ text: '(?i)commentFormatting: put a space between `//` and comment text'
+ - linters:
+ - gocritic
+ text: '(?i)exitAfterDefer:'
+ paths:
+ - node_modules
+ - public
+ - web_src
+ - third_party$
+ - builtin$
+ - examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
- exclude-dirs: [node_modules, public, web_src]
- exclude-case-sensitive: true
- exclude-rules:
- - path: _test\.go
- linters:
- - gocyclo
- - errcheck
- - dupl
- - gosec
- - unparam
- - staticcheck
- - path: models/migrations/v
- linters:
- - gocyclo
- - errcheck
- - dupl
- - gosec
- - path: cmd
- linters:
- - forbidigo
- - text: "webhook"
- linters:
- - dupl
- - text: "`ID' should not be capitalized"
- linters:
- - gocritic
- - text: "swagger"
- linters:
- - unused
- - deadcode
- - text: "argument x is overwritten before first use"
- linters:
- - staticcheck
- - text: "commentFormatting: put a space between `//` and comment text"
- linters:
- - gocritic
- - text: "exitAfterDefer:"
- linters:
- - gocritic
+formatters:
+ enable:
+ - gofmt
+ - gofumpt
+ settings:
+ gofumpt:
+ extra-rules: true
+ exclusions:
+ generated: lax
+ paths:
+ - node_modules
+ - public
+ - web_src
+ - third_party$
+ - builtin$
+ - examples$
+
+run:
+ timeout: 10m
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000000..88ff1591a4
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,2 @@
+Unknwon Looking for an overview of the interface? Check it out!
-||||
-|:---:|:---:|:---:|
-||||
-||||
-||||
+### Login/Register Page
+
+
+
+
+### User Dashboard
+
+
+
+
+
+
+### User Profile
+
+
+
+### Explore
+
+
+
+
+
+### Repository
+
+
+
+
+
+
+
+
+
+#### Repository Issue
+
+
+
+
+#### Repository Pull Requests
+
+
+
+
+
+
+#### Repository Actions
+
+
+
+
+#### Repository Activity
+
+
+
+
+
+
+### Organization
+
+
+
+## 赞助商
+
+通过成为赞助商来支持这个项目。您的标志将显示在这里,并带有链接到您的网站。 [[成为赞助商](https://opencollective.com/gitea#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+## 常见问题
+
+**Gitea 怎么发音?**
+
+Gitea 的发音是 [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY),就像 "gi-tea" 一样,g 是硬音。
+
+**为什么这个项目没有托管在 Gitea 实例上?**
+
+我们正在 [努力](https://github.com/go-gitea/gitea/issues/1029)。
+
+**在哪里可以找到安全补丁?**
+
+在 [发布日志](https://github.com/go-gitea/gitea/releases) 或 [变更日志](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md) 中,搜索关键词 `SECURITY` 以找到安全补丁。
+
+## 许可证
+
+这个项目是根据 MIT 许可证授权的。
+请参阅 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件以获取完整的许可证文本。
+
+## 进一步信息
+
+
寻找界面概述?查看这里!
+
+### 登录/注册页面
+
+
+
+
+### 用户仪表板
+
+
+
+
+
+
+### 用户资料
+
+
+
+### 探索
+
+
+
+
+
+### 仓库
+
+
+
+
+
+
+
+
+
+#### 仓库问题
+
+
+
+
+#### 仓库拉取请求
+
+
+
+
+
+
+#### 仓库操作
+
+
+
+
+#### 仓库活动
+
+
+
+
+
+
+### 组织
+
+
+
+
+
+## 贊助商
+
+通過成為贊助商來支持這個項目。您的標誌將顯示在這裡,並帶有鏈接到您的網站。 [[成為贊助商](https://opencollective.com/gitea#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+## 常見問題
+
+**Gitea 怎麼發音?**
+
+Gitea 的發音是 [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY),就像 "gi-tea" 一樣,g 是硬音。
+
+**為什麼這個項目沒有託管在 Gitea 實例上?**
+
+我們正在 [努力](https://github.com/go-gitea/gitea/issues/1029)。
+
+**在哪裡可以找到安全補丁?**
+
+在 [發佈日誌](https://github.com/go-gitea/gitea/releases) 或 [變更日誌](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md) 中,搜索關鍵詞 `SECURITY` 以找到安全補丁。
+
+## 許可證
+
+這個項目是根據 MIT 許可證授權的。
+請參閱 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件以獲取完整的許可證文本。
+
+## 進一步信息
+
+
尋找界面概述?查看這裡!
+
+### 登錄/註冊頁面
+
+
+
+
+### 用戶儀表板
+
+
+
+
+
+
+### 用戶資料
+
+
+
+### 探索
+
+
+
+
+
+### 倉庫
+
+
+
+
+
+
+
+
+
+#### 倉庫問題
+
+
+
+
+#### 倉庫拉取請求
+
+
+
+
+
+
+#### 倉庫操作
+
+
+
+
+#### 倉庫活動
+
+
+
+
+
+
+### 組織
+
+
+
+截图
-
-||||
-|:---:|:---:|:---:|
-||||
-||||
-||||
-
-
+
/test
-