Skip to content

Commit

Permalink
Merge branch 'main' into milestone-labels
Browse files Browse the repository at this point in the history
* main: (90 commits)
  Refactor rename user and rename organization (go-gitea#24052)
  Use `CommentList` instead of `[]*Comment` (go-gitea#24828)
  Fix topics deleted via API not being deleted in org page (go-gitea#24825)
  Return `404` in the API if the requested webhooks were not found (go-gitea#24823)
  Decouple the different contexts from each other (go-gitea#24786)
  [skip ci] Updated translations via Crowdin
  Add RTL rendering support to Markdown (go-gitea#24816)
  [skip ci] Updated translations via Crowdin
  Update JS dependencies (go-gitea#24815)
  Fix duplicate tooltip hiding (go-gitea#24814)
  Mute repo names in dashboard repo list (go-gitea#24811)
  Rework label colors (go-gitea#24790)
  Fix max width and margin of comment box on conversation page (go-gitea#24809)
  Allow all URL schemes in Markdown links by default (go-gitea#24805)
  Some refactors for issues stats (go-gitea#24793)
  Implement actions artifacts (go-gitea#22738)
  Fix Actions being enabled accidentally (go-gitea#24802)
  Change `add_on` in `keys_ssh.tmpl` (go-gitea#24803)
  replace `drone exec` to `act_runner exec` in test README.md (go-gitea#24791)
  Fix OAuth loading state (go-gitea#24788)
  ...
  • Loading branch information
silverwind committed May 21, 2023
2 parents c71bbd8 + c59a057 commit e336a1e
Show file tree
Hide file tree
Showing 326 changed files with 10,413 additions and 6,443 deletions.
35 changes: 32 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ parserOptions:
ecmaVersion: latest

plugins:
- eslint-plugin-unicorn
- "@eslint-community/eslint-plugin-eslint-comments"
- eslint-plugin-array-func
- eslint-plugin-custom-elements
- eslint-plugin-import
- eslint-plugin-jquery
- eslint-plugin-no-jquery
- eslint-plugin-sonarjs
- eslint-plugin-custom-elements
- eslint-plugin-no-use-extend-native
- eslint-plugin-regexp
- eslint-plugin-sonarjs
- eslint-plugin-unicorn
- eslint-plugin-wc

env:
es2022: true
Expand Down Expand Up @@ -43,11 +47,26 @@ overrides:
import/no-unused-modules: [0]

rules:
"@eslint-community/eslint-comments/disable-enable-pair": [2]
"@eslint-community/eslint-comments/no-aggregating-enable": [2]
"@eslint-community/eslint-comments/no-duplicate-disable": [2]
"@eslint-community/eslint-comments/no-restricted-disable": [0]
"@eslint-community/eslint-comments/no-unlimited-disable": [2]
"@eslint-community/eslint-comments/no-unused-disable": [2]
"@eslint-community/eslint-comments/no-unused-enable": [2]
"@eslint-community/eslint-comments/no-use": [0]
"@eslint-community/eslint-comments/require-description": [0]
accessor-pairs: [2]
array-bracket-newline: [0]
array-bracket-spacing: [2, never]
array-callback-return: [2, {checkForEach: true}]
array-element-newline: [0]
array-func/avoid-reverse: [2]
array-func/from-map: [2]
array-func/no-unnecessary-this-arg: [2]
array-func/prefer-array-from: [2]
array-func/prefer-flat-map: [0] # handled by unicorn/prefer-array-flat-map
array-func/prefer-flat: [0] # handled by unicorn/prefer-array-flat
arrow-body-style: [0]
arrow-parens: [2, always]
arrow-spacing: [2, {before: true, after: true}]
Expand Down Expand Up @@ -433,6 +452,7 @@ rules:
no-unused-private-class-members: [2]
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
no-use-extend-native/no-use-extend-native: [2]
no-useless-backreference: [2]
no-useless-call: [2]
no-useless-catch: [2]
Expand Down Expand Up @@ -717,6 +737,15 @@ rules:
use-isnan: [2]
valid-typeof: [2, {requireStringLiterals: true}]
vars-on-top: [0]
wc/attach-shadow-constructor: [2]
wc/guard-super-call: [2]
wc/no-closed-shadow-root: [2]
wc/no-constructor-attributes: [2]
wc/no-constructor-params: [2]
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
wc/no-self-class: [2]
wc/no-typos: [2]
wc/require-listener-teardown: [2]
wrap-iife: [2, inside]
wrap-regex: [0]
yield-star-spacing: [2, after]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:
cron-licenses:
if: github.repository == "go-gitea/gitea"
runs-on: ubuntu-latest
if: github.repository == 'go-gitea/gitea'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cron-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
jobs:
action:
runs-on: ubuntu-latest
if: github.repository == 'go-gitea/gitea'
steps:
- uses: dessant/lock-threads@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cron-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
crowdin-pull:
runs-on: ubuntu-latest
if: github.repository == 'go-gitea/gitea'
steps:
- uses: actions/checkout@v3
- name: download from crowdin
Expand All @@ -31,13 +32,15 @@ jobs:
ssh_key: ${{ secrets.DEPLOY_KEY }}
crowdin-push:
runs-on: ubuntu-latest
if: github.repository == 'go-gitea/gitea'
steps:
- uses: actions/checkout@v3
- name: push translations to crowdin
uses: docker://jonasfranz/crowdin
env:
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
PLUGIN_UPLOAD: true
PLUGIN_EXPORT_DIR: options/locale/
PLUGIN_IGNORE_BRANCH: true
PLUGIN_PROJECT_IDENTIFIER: gitea
PLUGIN_FILES: |
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/pull-compliance-docsignore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: compliance

on:
pull_request:
paths:
- "docs/**"
- "*.md"

jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

lint-backend:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

lint-go-windows:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

lint-go-gogit:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

checks-backend:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

frontend:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

backend:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"
6 changes: 5 additions & 1 deletion .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: compliance

on: [pull_request]
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/pull-db-tests-docsignore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: db-tests

on:
pull_request:
paths:
- "docs/**"
- "*.md"

jobs:
test-pgsql:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

test-sqlite:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

test-unit:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

test-mysql5:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

test-mysql8:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"

test-mssql:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"
23 changes: 17 additions & 6 deletions .github/workflows/pull-db-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: db-tests

on: [pull_request]
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -37,7 +41,7 @@ jobs:
with:
go-version: ">=1.20.0"
- name: Add hosts to /etc/hosts
run: echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: make backend
env:
Expand Down Expand Up @@ -102,13 +106,20 @@ jobs:
--health-retries 10
ports:
- 6379:6379
minio:
image: bitnami/minio:2021.3.17
env:
MINIO_ACCESS_KEY: 123456
MINIO_SECRET_KEY: 12345678
ports:
- "9000:9000"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ">=1.20.0"
- name: Add hosts to /etc/hosts
run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: make backend
env:
Expand Down Expand Up @@ -155,7 +166,7 @@ jobs:
with:
go-version: ">=1.20.0"
- name: Add hosts to /etc/hosts
run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: make backend
env:
Expand Down Expand Up @@ -184,7 +195,7 @@ jobs:
with:
go-version: ">=1.20.0"
- name: Add hosts to /etc/hosts
run: echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: make backend
env:
Expand Down Expand Up @@ -212,7 +223,7 @@ jobs:
with:
go-version: ">=1.20.0"
- name: Add hosts to /etc/hosts
run: echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: make backend
env:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/pull-docker-dryrun-docsignore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: docker-dryrun

on:
pull_request:
paths:
- "docs/**"
- "*.md"

jobs:
docker-dryrun:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"
6 changes: 5 additions & 1 deletion .github/workflows/pull-docker-dryrun.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: docker-dryrun

on: [pull_request]
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/pull-e2e-tests-docsignore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: e2e-tests

on:
pull_request:
paths:
- "docs/**"
- "*.md"

jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- run: echo "No build required"
6 changes: 5 additions & 1 deletion .github/workflows/pull-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: e2e-tests

on: [pull_request]
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ignoreFiles:
- "**/*.go"

overrides:
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console.css"]
rules:
scale-unlimited/declaration-strict-value: null
- files: ["**/chroma/*", "**/codemirror/*"]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Build stage
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand All @@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
# Begin env-to-ini build
RUN go build contrib/environment-to-ini/environment-to-ini.go

FROM docker.io/library/alpine:3.17
FROM docker.io/library/alpine:3.18
LABEL maintainer="maintainers@gitea.io"

EXPOSE 22 3000
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.rootless
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Build stage
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand All @@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
# Begin env-to-ini build
RUN go build contrib/environment-to-ini/environment-to-ini.go

FROM docker.io/library/alpine:3.17
FROM docker.io/library/alpine:3.18
LABEL maintainer="maintainers@gitea.io"

EXPOSE 2222 3000
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ Eddie Yang <576951401@qq.com> (@yp05327)
Dong Ge <gedong_1994@163.com> (@sillyguodong)
Xinyi Gong <hestergong@gmail.com> (@HesterG)
wxiaoguang <wxiaoguang@gmail.com> (@wxiaoguang)
Gary Moon <gary@garymoon.net> (@garymoon)
Loading

0 comments on commit e336a1e

Please sign in to comment.