Skip to content

Commit a296667

Browse files
author
Gusted
committed
Merge branch 'main' into publickey-auth-push-mirror
2 parents 41dcf87 + 65e0688 commit a296667

File tree

550 files changed

+11800
-9279
lines changed

Some content is hidden

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

550 files changed

+11800
-9279
lines changed

.drone.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ steps:
235235
image: docker:git
236236
pull: always
237237
commands:
238+
- git config --global --add safe.directory /drone/src
238239
- git fetch --tags --force
239240
when:
240241
event:
@@ -427,6 +428,7 @@ steps:
427428
image: docker:git
428429
pull: always
429430
commands:
431+
- git config --global --add safe.directory /drone/src
430432
- git fetch --tags --force
431433
when:
432434
event:
@@ -628,6 +630,7 @@ steps:
628630
image: docker:git
629631
pull: always
630632
commands:
633+
- git config --global --add safe.directory /drone/src
631634
- git fetch --tags --force
632635

633636
- name: deps-frontend
@@ -746,6 +749,7 @@ steps:
746749
image: docker:git
747750
pull: always
748751
commands:
752+
- git config --global --add safe.directory /drone/src
749753
- git fetch --tags --force
750754

751755
- name: deps-frontend
@@ -891,6 +895,7 @@ steps:
891895
image: docker:git
892896
pull: always
893897
commands:
898+
- git config --global --add safe.directory /drone/src
894899
- git fetch --tags --force
895900

896901
- name: publish
@@ -954,6 +959,7 @@ steps:
954959
image: docker:git
955960
pull: always
956961
commands:
962+
- git config --global --add safe.directory /drone/src
957963
- git fetch --tags --force
958964

959965
- name: publish
@@ -1016,6 +1022,7 @@ steps:
10161022
image: docker:git
10171023
pull: always
10181024
commands:
1025+
- git config --global --add safe.directory /drone/src
10191026
- git fetch --tags --force
10201027

10211028
- name: publish
@@ -1112,6 +1119,7 @@ steps:
11121119
image: docker:git
11131120
pull: always
11141121
commands:
1122+
- git config --global --add safe.directory /drone/src
11151123
- git fetch --tags --force
11161124

11171125
- name: publish
@@ -1175,6 +1183,7 @@ steps:
11751183
image: docker:git
11761184
pull: always
11771185
commands:
1186+
- git config --global --add safe.directory /drone/src
11781187
- git fetch --tags --force
11791188

11801189
- name: publish
@@ -1237,6 +1246,7 @@ steps:
12371246
image: docker:git
12381247
pull: always
12391248
commands:
1249+
- git config --global --add safe.directory /drone/src
12401250
- git fetch --tags --force
12411251

12421252
- name: publish

.eslintrc

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ plugins:
1313
- eslint-plugin-import
1414
- eslint-plugin-vue
1515
- eslint-plugin-html
16+
- eslint-plugin-jquery
1617

1718
extends:
1819
- plugin:vue/recommended
1920

2021
env:
21-
es2021: true
22+
es2022: true
2223
node: true
2324

2425
globals:
@@ -140,6 +141,55 @@ rules:
140141
import/unambiguous: [0]
141142
indent: [2, 2, {SwitchCase: 1}]
142143
init-declarations: [0]
144+
jquery/no-ajax-events: [2]
145+
jquery/no-ajax: [0]
146+
jquery/no-animate: [2]
147+
jquery/no-attr: [0]
148+
jquery/no-bind: [2]
149+
jquery/no-class: [0]
150+
jquery/no-clone: [2]
151+
jquery/no-closest: [0]
152+
jquery/no-css: [0]
153+
jquery/no-data: [0]
154+
jquery/no-deferred: [2]
155+
jquery/no-delegate: [2]
156+
jquery/no-each: [0]
157+
jquery/no-extend: [2]
158+
jquery/no-fade: [0]
159+
jquery/no-filter: [0]
160+
jquery/no-find: [0]
161+
jquery/no-global-eval: [2]
162+
jquery/no-grep: [2]
163+
jquery/no-has: [2]
164+
jquery/no-hide: [0]
165+
jquery/no-html: [0]
166+
jquery/no-in-array: [2]
167+
jquery/no-is-array: [2]
168+
jquery/no-is-function: [2]
169+
jquery/no-is: [0]
170+
jquery/no-load: [2]
171+
jquery/no-map: [0]
172+
jquery/no-merge: [2]
173+
jquery/no-param: [2]
174+
jquery/no-parent: [0]
175+
jquery/no-parents: [0]
176+
jquery/no-parse-html: [2]
177+
jquery/no-prop: [0]
178+
jquery/no-proxy: [2]
179+
jquery/no-ready: [0]
180+
jquery/no-serialize: [2]
181+
jquery/no-show: [0]
182+
jquery/no-size: [2]
183+
jquery/no-sizzle: [0]
184+
jquery/no-slide: [0]
185+
jquery/no-submit: [0]
186+
jquery/no-text: [0]
187+
jquery/no-toggle: [0]
188+
jquery/no-trigger: [0]
189+
jquery/no-trim: [2]
190+
jquery/no-val: [0]
191+
jquery/no-when: [2]
192+
jquery/no-wrap: [2]
143193
key-spacing: [2]
144194
keyword-spacing: [2]
145195
line-comment-position: [0]
@@ -174,6 +224,7 @@ rules:
174224
no-confusing-arrow: [0]
175225
no-console: [1, {allow: [info, warn, error]}]
176226
no-const-assign: [2]
227+
no-constant-binary-expression: [2]
177228
no-constant-condition: [0]
178229
no-constructor-return: [2]
179230
no-continue: [0]
@@ -384,12 +435,14 @@ rules:
384435
unicorn/no-thenable: [2]
385436
unicorn/no-this-assignment: [2]
386437
unicorn/no-unreadable-array-destructuring: [0]
438+
unicorn/no-unreadable-iife: [2]
387439
unicorn/no-unsafe-regex: [0]
388440
unicorn/no-unused-properties: [2]
389441
unicorn/no-useless-fallback-in-spread: [2]
390442
unicorn/no-useless-length-check: [2]
391443
unicorn/no-useless-promise-resolve-reject: [2]
392444
unicorn/no-useless-spread: [2]
445+
unicorn/no-useless-switch-case: [2]
393446
unicorn/no-useless-undefined: [0]
394447
unicorn/no-zero-fractions: [2]
395448
unicorn/number-literal-case: [0]
@@ -411,7 +464,9 @@ rules:
411464
unicorn/prefer-json-parse-buffer: [0]
412465
unicorn/prefer-math-trunc: [2]
413466
unicorn/prefer-modern-dom-apis: [0]
467+
unicorn/prefer-modern-math-apis: [2]
414468
unicorn/prefer-module: [2]
469+
unicorn/prefer-native-coercion-functions: [2]
415470
unicorn/prefer-negative-index: [2]
416471
unicorn/prefer-node-append: [0]
417472
unicorn/prefer-node-protocol: [0]

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
33
- name: Security Concern
44
url: https://tinyurl.com/security-gitea

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,3 @@ issues:
162162
- path: models/user/openid.go
163163
linters:
164164
- golint
165-
- linters:
166-
- staticcheck
167-
text: "strings.Title is deprecated: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead."

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,46 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.16.8](https://github.com/go-gitea/gitea/releases/tag/v1.16.8) - 2022-05-16
8+
9+
* ENHANCEMENTS
10+
* Add doctor check/fix for bogus action rows (#19656) (#19669)
11+
* Make .cs highlighting legible on dark themes. (#19604) (#19605)
12+
* BUGFIXES
13+
* Fix oauth setting list bug (#19681)
14+
* Delete user related oauth stuff on user deletion too (#19677) (#19680)
15+
* Fix new release from tags list UI (#19670) (#19673)
16+
* Prevent NPE when checking repo units if the user is nil (#19625) (#19630)
17+
* GetFeeds must always discard actions with dangling repo_id (#19598) (#19629)
18+
* Call MultipartForm.RemoveAll when request finishes (#19606) (#19607)
19+
* Avoid MoreThanOne error when creating a branch whose name conflicts with other ref names (#19557) (#19591)
20+
* Fix sending empty notifications (#19589) (#19590)
21+
* Ignore DNS error when doing migration allow/block check (#19566) (#19567)
22+
* Fix issue overview for teams (#19652) (#19653)
23+
24+
## [1.16.7](https://github.com/go-gitea/gitea/releases/tag/v1.16.7) - 2022-05-02
25+
26+
* SECURITY
27+
* Escape git fetch remote (#19487) (#19490)
28+
* BUGFIXES
29+
* Don't overwrite err with nil (#19572) (#19574)
30+
* On Migrations, only write commit-graph if wiki clone was successful (#19563) (#19568)
31+
* Respect DefaultUserIsRestricted system default when creating new user (#19310) (#19560)
32+
* Don't error when branch's commit doesn't exist (#19547) (#19548)
33+
* Support `hostname:port` to pass host matcher's check (#19543) (#19544)
34+
* Prevent intermittent race in attribute reader close (#19537) (#19539)
35+
* Fix 64-bit atomic operations on 32-bit machines (#19531) (#19532)
36+
* Prevent dangling archiver goroutine (#19516) (#19526)
37+
* Fix migrate release from github (#19510) (#19523)
38+
* When view _Siderbar or _Footer, just display once (#19501) (#19522)
39+
* Fix blame page select range error and some typos (#19503)
40+
* Fix name of doctor fix "authorized-keys" in hints (#19464) (#19484)
41+
* User specific repoID or xorm builder conditions for issue search (#19475) (#19476)
42+
* Prevent dangling cat-file calls (goroutine alternative) (#19454) (#19466)
43+
* RepoAssignment ensure to close before overwrite (#19449) (#19460)
44+
* Set correct PR status on 3way on conflict checking (#19457) (#19458)
45+
* Mark TemplateLoading error as "UnprocessableEntity" (#19445) (#19446)
46+
747
## [1.16.6](https://github.com/go-gitea/gitea/releases/tag/v1.16.6) - 2022-04-20
848

949
* ENHANCEMENTS

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM golang:1.18-alpine3.15 AS build-env
2+
FROM golang:1.18-alpine3.16 AS build-env
33

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

26-
FROM alpine:3.15
26+
FROM alpine:3.16
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 22 3000

Dockerfile.rootless

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM golang:1.18-alpine3.15 AS build-env
2+
FROM golang:1.18-alpine3.16 AS build-env
33

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

26-
FROM alpine:3.15
26+
FROM alpine:3.16
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 2222 3000

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ Jimmy Praet <[email protected]> (@jpraet)
4646
Leon Hofmeister <[email protected]> (@delvh)
4747
Gusted <[email protected]) (@Gusted)
4848
singuliere <[email protected]> (@singuliere)
49+
silentcode <[email protected]> (@silentcodeg)

Makefile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ XGO_VERSION := go-1.18.x
2929
AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
3030
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
3131
ERRCHECK_PACKAGE ?= github.com/kisielk/[email protected]
32-
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected].0
33-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.2
32+
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected].1
33+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.0
3434
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3535
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
3636
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
@@ -195,6 +195,7 @@ help:
195195
@echo " - swagger-validate check if the swagger spec is valid"
196196
@echo " - golangci-lint run golangci-lint linter"
197197
@echo " - vet examines Go source code and reports suspicious constructs"
198+
@echo " - tidy run go mod tidy"
198199
@echo " - test[\#TestSpecificName] run unit test"
199200
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
200201
@echo " - pr#<index> build and start gitea from a PR with integration test data loaded"
@@ -369,16 +370,20 @@ unit-test-coverage:
369370
@echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
370371
@$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
371372

373+
.PHONY: tidy
374+
tidy:
375+
$(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2))
376+
$(GO) mod tidy -compat=$(MIN_GO_VERSION)
377+
372378
.PHONY: vendor
373-
vendor:
374-
$(GO) mod tidy && $(GO) mod vendor
379+
vendor: tidy
380+
$(GO) mod vendor
375381

376382
.PHONY: gomod-check
377-
gomod-check:
378-
@$(GO) mod tidy
383+
gomod-check: tidy
379384
@diff=$$(git diff go.sum); \
380385
if [ -n "$$diff" ]; then \
381-
echo "Please run '$(GO) mod tidy' and commit the result:"; \
386+
echo "Please run 'make tidy' and commit the result:"; \
382387
echo "$${diff}"; \
383388
exit 1; \
384389
fi

assets/favicon.svg

Lines changed: 31 additions & 0 deletions
Loading

build/generate-images.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {fileURLToPath} from 'url';
88
const {readFile, writeFile} = fs.promises;
99
const __dirname = dirname(fileURLToPath(import.meta.url));
1010
const logoFile = resolve(__dirname, '../assets/logo.svg');
11+
const faviconFile = resolve(__dirname, '../assets/favicon.svg');
1112

1213
function exit(err) {
1314
if (err) console.error(err);
@@ -68,15 +69,17 @@ async function generate(svg, outputFile, {size, bg}) {
6869

6970
async function main() {
7071
const gitea = process.argv.slice(2).includes('gitea');
71-
const svg = await readFile(logoFile, 'utf8');
72+
const logoSvg = await readFile(logoFile, 'utf8');
73+
const faviconSvg = await readFile(faviconFile, 'utf8');
7274

7375
await Promise.all([
74-
generate(svg, resolve(__dirname, '../public/img/logo.svg'), {size: 32}),
75-
generate(svg, resolve(__dirname, '../public/img/logo.png'), {size: 512}),
76-
generate(svg, resolve(__dirname, '../public/img/favicon.png'), {size: 180}),
77-
generate(svg, resolve(__dirname, '../public/img/avatar_default.png'), {size: 200}),
78-
generate(svg, resolve(__dirname, '../public/img/apple-touch-icon.png'), {size: 180, bg: true}),
79-
gitea && generate(svg, resolve(__dirname, '../public/img/gitea.svg'), {size: 32}),
76+
generate(logoSvg, resolve(__dirname, '../public/img/logo.svg'), {size: 32}),
77+
generate(logoSvg, resolve(__dirname, '../public/img/logo.png'), {size: 512}),
78+
generate(faviconSvg, resolve(__dirname, '../public/img/favicon.svg'), {size: 32}),
79+
generate(faviconSvg, resolve(__dirname, '../public/img/favicon.png'), {size: 180}),
80+
generate(logoSvg, resolve(__dirname, '../public/img/avatar_default.png'), {size: 200}),
81+
generate(logoSvg, resolve(__dirname, '../public/img/apple-touch-icon.png'), {size: 180, bg: true}),
82+
gitea && generate(logoSvg, resolve(__dirname, '../public/img/gitea.svg'), {size: 32}),
8083
]);
8184
}
8285

0 commit comments

Comments
 (0)