Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork updates from go-gitea/gitea main #58 #59

Merged
merged 111 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
9607750
Replace fmt.Sprintf with hex.EncodeToString (#21960)
wolfogre Nov 28, 2022
f047ee0
Use random bytes to generate access token (#21959)
wolfogre Nov 28, 2022
715cf46
Normalize `AppURL` according to RFC 3986 (#21950)
SaswatPadhi Nov 29, 2022
fdfd77f
Fix typos (#21979)
luzpaz Nov 30, 2022
7020c4a
Fix leaving organization bug on user settings -> orgs (#21983)
Cosin Nov 30, 2022
67881ae
Skip initing disabled storages (#21985)
wolfogre Nov 30, 2022
b2c4870
Fix parallel creating commit status bug with tests (#21911)
lunny Nov 30, 2022
4e5d4d0
Skip initing LFS storage if disabled (#21996)
wolfogre Dec 1, 2022
f9cbf5a
Util type to parse ref name (#21969)
wolfogre Dec 1, 2022
f0bd219
Update chroma to v2.4.0 (#22000)
silverwind Dec 1, 2022
64973cf
Use path not filepath in template filenames (#21993)
zeripath Dec 1, 2022
f7ade6d
Fix generate index failure possibility on postgres (#21998)
lunny Dec 2, 2022
665d02e
Remove duplicate "Actions" label in mobile view (#21974)
markormesher Dec 2, 2022
df676a4
Remove session in api tests (#21984)
lunny Dec 2, 2022
d640632
Multiple improvements for comment edit diff (#21990)
silverwind Dec 2, 2022
f59a748
Update gitea-vet to check FSFE REUSE (#22004)
wolfogre Dec 2, 2022
350bc83
Update to Alpine 3.17 (#21904)
flynnnnnnnnnn Dec 2, 2022
21bcb92
Add pnpm to packages/overview (#22008)
xtexChooser Dec 2, 2022
8698458
Remove deprecated packages & staticcheck fixes (#22012)
harryzcy Dec 2, 2022
0a7d3ff
refactor some functions to support ctx as first parameter (#21878)
lunny Dec 3, 2022
181f4bf
docs: add `Edit this page` (#21981)
Dec 3, 2022
0e46499
Do not emit ambiguous character warning on rendered pages (#22016)
zeripath Dec 3, 2022
d084ce3
[skip ci] Updated licenses and gitignores
zeripath Dec 4, 2022
9eb9cf5
fix(web): reduce page jitter on browsers that support overlay scrollb…
kecrily Dec 4, 2022
36cbaec
Fix ListBranches to handle empty case (#21921)
lunny Dec 4, 2022
4648584
On tag/branch-exist check, dont panic if repo is nil (#21787)
6543 Dec 4, 2022
84d2a82
Add dumb-init to rootless docker (#21775)
viceice Dec 4, 2022
ea86c2b
Use GhostUser if needed for TrackedTimes (#22021)
zeripath Dec 4, 2022
a08584e
Ensure that Chinese punctuation is not ambiguous when locale is Chine…
zeripath Dec 4, 2022
77f5035
Remove useless "Cancel" buttons (#21872)
yardenshoham Dec 5, 2022
74874d0
Fix issue/PR numbers (#22037)
wolfogre Dec 6, 2022
e2fa84f
Release and Tag List tweaks (#21712)
silverwind Dec 6, 2022
0a85537
Support disabling database auto migration (#22053)
wolfogre Dec 7, 2022
cf27403
Round language stats percentage using largest remainder (#22026)
hr-98 Dec 8, 2022
0585ac3
Update go dev dependencies (#22064)
silverwind Dec 8, 2022
8fb1e53
Rename actions to operations on UI (#22067)
wolfogre Dec 8, 2022
3c59d31
Add API management for issue/pull and comment attachments (#21783)
KN4CK3R Dec 9, 2022
2779d47
Optimize html templates (#22080)
wolfogre Dec 9, 2022
097d4e3
Change ID pattern of raw content container for issue (#21966)
fsologureng Dec 9, 2022
6870453
Rename almost all Ctx functions (#22071)
lunny Dec 10, 2022
9745c33
Remove unnecessary whitespace in snapcraft.yaml (#22090)
yardenshoham Dec 10, 2022
0e2d046
Update xorm (#22094)
KN4CK3R Dec 10, 2022
601d126
[skip ci] Updated licenses and gitignores
KN4CK3R Dec 11, 2022
112e425
fix(config): remove context on config template (#22096)
restray Dec 11, 2022
c9ef03a
Fix wrong default value for update checker on app.example.ini (#22084)
lunny Dec 11, 2022
352a50d
Fix sorting admin user list by last login (#22081)
aceArt-GmbH Dec 12, 2022
3e8285b
Use multi reader instead to concat strings (#22099)
lunny Dec 12, 2022
003b4e2
Allow disable code tab (#20805)
lunny Dec 12, 2022
6398ca7
refactor bind functions based on generics (#22055)
lunny Dec 12, 2022
36a2d2f
Add a simple test for external renderer (#20033)
lunny Dec 12, 2022
87c64f6
Fix permission check on issue/pull lock (#22110)
lunny Dec 12, 2022
a95247b
Fix autofilled text visibility in dark mode (#22088)
harryzcy Dec 13, 2022
5aa8546
Fix markdown typo of an extra backtick in docs (#22123)
Yakov5776 Dec 14, 2022
4fb2006
Make gitea work using cmd.exe again (#22073)
zeripath Dec 14, 2022
07461e1
Fix condition for is_internal (#22095)
KN4CK3R Dec 14, 2022
1b32ed0
remove duplicated read file code (#22042)
lunny Dec 14, 2022
cdc4345
Correctly handle moved files in apply patch (#22118)
zeripath Dec 14, 2022
ae97197
Fixed Project view .board-column height for tall screens. (#22108)
gnat Dec 14, 2022
3243dbe
remove silentcode from MAINTAINERS (#22143)
silentcodeg Dec 15, 2022
651fe4b
Add doctor command for full GC of LFS (#21978)
zeripath Dec 15, 2022
84285a1
Do not list active repositories as unadopted (#22034)
chrullrich Dec 16, 2022
8400146
Update username (#22147)
Dec 16, 2022
c4c4151
Fix margin and alignment in dashboard repolist (#22120)
silverwind Dec 17, 2022
f3370ee
verify nodeinfo response by schema (#22137)
MFTabriz Dec 17, 2022
6e22605
Ensure that plain files are rendered correctly even when containing a…
zeripath Dec 17, 2022
998fe26
[skip ci] Updated licenses and gitignores
zeripath Dec 18, 2022
a89b399
Local storage should not store files as executable (#22162)
zeripath Dec 19, 2022
d6b9662
Add setting to disable the git apply step in test patch (#22130)
zeripath Dec 19, 2022
2774671
Fix heatmap first color being unused (#22157)
silverwind Dec 19, 2022
40ba750
Check for zero time instant in `TimeStamp.IsZero()` (#22171)
Gusted Dec 20, 2022
6590551
Secrets storage with SecretKey encrypted (#22142)
wolfogre Dec 20, 2022
495b8b3
Fix delete secret modal (#22187)
lunny Dec 20, 2022
e767b33
Update JS dependencies and eslint (#22190)
silverwind Dec 20, 2022
70d15e7
Fix misc whitespace issues in install docs (#22189)
h3xx Dec 20, 2022
c4df10d
Repair LFS web rendering. (#22195)
kousu Dec 21, 2022
90572c5
Specify ID in `TestAPITeam` (#22192)
Gusted Dec 21, 2022
fe6608f
Attempt to fix TestExportUserGPGKeys (#22159)
zeripath Dec 21, 2022
86ace4b
Normalize NuGet package version on upload (#22186)
KN4CK3R Dec 21, 2022
8e267af
Mobile fix for Project view: Add delay to Sortable.js on mobile, to e…
gnat Dec 21, 2022
c403e2f
Fixed colour transparency regex matching in project board sorting (#2…
MisterCavespider Dec 21, 2022
9914b21
fix: update libcurl in docs pipeline (#22203)
jolheiser Dec 21, 2022
48d71b7
Add Feed for Releases and Tags (#21696)
reopt999 Dec 21, 2022
b767182
Allow empty assignees on pull request edit (#22150)
KN4CK3R Dec 21, 2022
8e17fb5
Update bleve and zapx to fix unaligned atomic (#22031)
zeripath Dec 22, 2022
3affb02
Run hugo via `go run` and lock its version (#22206)
silverwind Dec 22, 2022
6037043
Fix container layer display overflow (#22208)
lafriks Dec 22, 2022
ac5b44b
Upgrade hugo to 0.82 (#22209)
silverwind Dec 22, 2022
8c1bb77
Remove test session cache to reduce possible concurrent problem (#22199)
lunny Dec 22, 2022
7bf7c13
Frontport 1.17.4 changelog (#22216)
lunny Dec 22, 2022
ea5a752
update docs latest to 1.17.4
techknowlogick Dec 22, 2022
a2779de
Test views of LFS files (#22196)
kousu Dec 22, 2022
41f0668
Hide file borders on sticky diff box (#22217)
silverwind Dec 23, 2022
71ca306
Check primary keys for all tables and drop ForeignReference (#21721)
wolfogre Dec 23, 2022
2cf0cf0
JS refactors (#22227)
silverwind Dec 23, 2022
2b0b563
Improve testing for pgsql empty repository (#22223)
lunny Dec 23, 2022
3bd49f7
[skip ci] Updated licenses and gitignores
lunny Dec 25, 2022
f5cd0d9
Add Mermaid copy button, avoid unnecessary tooltip hide (#22225)
silverwind Dec 25, 2022
814b44a
Fix typo of Asia/Shanghai (#22242)
wolfogre Dec 26, 2022
83640c4
Remove ReverseProxy authentication from the API (#22219)
zeripath Dec 27, 2022
b48cf03
Remove deadcode (#22245)
Gusted Dec 27, 2022
90237d8
Add more test directory to exclude dir of air, remove watching templa…
lunny Dec 27, 2022
6cf09cc
Use complete SHA to create and query commit status (#22244)
wolfogre Dec 27, 2022
d0c3d0b
Add the 'ui.user' section to the cheat sheet (#22249)
chrullrich Dec 27, 2022
22a6e97
Update standard copyright header to use a placeholder year (#22254)
yardenshoham Dec 27, 2022
7cc7db7
Add option to prohibit fork if user reached maximum limit of reposito…
Dec 27, 2022
ca67c5a
refactor auth interface to return error when verify failure (#22119)
lunny Dec 28, 2022
309e86a
Use dynamic package type list (#22263)
KN4CK3R Dec 28, 2022
a357498
Move `convert` package to services (#22264)
KN4CK3R Dec 29, 2022
47efba7
Support template for merge message description (#22248)
wolfogre Dec 29, 2022
a609cae
Correctly handle select on multiple channels in Queues (#22146)
zeripath Dec 30, 2022
205a392
Merge branch 'go-gitea/main'
AbdulrhmnGhanem Dec 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ tmp_dir = ".air"
cmd = "make backend"
bin = "gitea"
include_ext = ["go", "tmpl"]
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
exclude_regex = ["_test.go$", "_gen.go$"]
8 changes: 3 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ steps:

# TODO: We should probably build all dependencies into a test image
- name: test-e2e
image: mcr.microsoft.com/playwright:v1.28.0-focal
image: mcr.microsoft.com/playwright:v1.29.0-focal
commands:
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
Expand Down Expand Up @@ -600,7 +600,7 @@ steps:
from_secret: crowdin_key

- name: update
image: alpine:3.13
image: alpine:3.17
pull: always
commands:
- ./build/update-locales.sh
Expand Down Expand Up @@ -928,10 +928,8 @@ trigger:

steps:
- name: build-docs
image: plugins/hugo:latest
pull: always
image: golang:1.19
commands:
- apk add --no-cache make bash curl
- cd docs
- make trans-copy clean build

Expand Down
6 changes: 3 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ rules:
no-irregular-whitespace: [2]
no-iterator: [2]
no-label-var: [2]
no-labels: [0]
no-labels: [0] # handled by no-restricted-syntax
no-lone-blocks: [2]
no-lonely-if: [0]
no-loop-func: [0]
Expand Down Expand Up @@ -335,7 +335,7 @@ rules:
no-void: [2]
no-warning-comments: [0]
no-whitespace-before-property: [2]
no-with: [0]
no-with: [0] # handled by no-restricted-syntax
nonblock-statement-body-position: [2]
object-curly-newline: [0]
object-curly-spacing: [2, never]
Expand Down Expand Up @@ -495,7 +495,7 @@ rules:
unicorn/prefer-native-coercion-functions: [2]
unicorn/prefer-negative-index: [2]
unicorn/prefer-node-append: [0]
unicorn/prefer-node-protocol: [0]
unicorn/prefer-node-protocol: [2]
unicorn/prefer-node-remove: [0]
unicorn/prefer-number-properties: [0]
unicorn/prefer-object-from-entries: [2]
Expand Down
34 changes: 17 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
linters:
enable:
- gosimple
- deadcode
- typecheck
- govet
- errcheck
- staticcheck
- unused
- structcheck
- varcheck
- bidichk
# - deadcode # deprecated - https://github.com/golangci/golangci-lint/issues/1841
- depguard
- dupl
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- errcheck
- gocritic
- bidichk
- ineffassign
- revive
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- gofumpt
- depguard
- gosimple
- govet
- ineffassign
- nakedret
- unconvert
- wastedassign
- nolintlint
- revive
- staticcheck
# - structcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
- stylecheck
- typecheck
- unconvert
- unused
# - varcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
# - wastedassign # disabled - https://github.com/golangci/golangci-lint/issues/2649
enable-all: false
disable-all: true
fast: false
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,60 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io).

## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/1.17.4) - 2022-12-21

* SECURITY
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)
* Fix package access for admins and inactive users (#21580) (#21592)
* ENHANCEMENTS
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927)
* Fix vertical align of committer avatar rendered by email address (#21884) (#21919)
* Fix setting HTTP headers after write (#21833) (#21874)
* Ignore line anchor links with leading zeroes (#21728) (#21777)
* Enable Monaco automaticLayout (#21516)
* BUGFIXES
* Do not list active repositories as unadopted (#22034) (#22167)
* Correctly handle moved files in apply patch (#22118) (#22136)
* Fix condition for is_internal (#22095) (#22131)
* Fix permission check on issue/pull lock (#22114)
* Fix sorting admin user list by last login (#22081) (#22106)
* Workaround for container registry push/pull errors (#21862) (#22069)
* Fix issue/PR numbers (#22037) (#22045)
* Handle empty author names (#21902) (#22028)
* Fix ListBranches to handle empty case (#21921) (#22025)
* Fix enabling partial clones on 1.17 (#21809)
* Prevent panic in doctor command when running default checks (#21791) (#21808)
* Upgrade golang.org/x/crypto (#21792) (#21794)
* Init git module before database migration (#21764) (#21766)
* Set last login when activating account (#21731) (#21754)
* Add HEAD fix to gitea doctor (#21352) (#21751)
* Fix UI language switching bug (#21597) (#21748)
* Remove semver compatible flag and change pypi to an array of test cases (#21708) (#21729)
* Allow local package identifiers for PyPI packages (#21690) (#21726)
* Fix repository adoption on Windows (#21646) (#21651)
* Sync git hooks when config file path changed (#21619) (#21625)
* Added check for disabled Packages (#21540) (#21614)
* Fix `Timestamp.IsZero` (#21593) (#21604)
* Fix issues count bug (#21600)
* Support binary deploy in npm packages (#21589)
* Update milestone counters when issue is deleted (#21459) (#21586)
* SessionUser protection against nil pointer dereference (#21581)
* Case-insensitive NuGet symbol file GUID (#21409) (#21575)
* Suppress `ExternalLoginUserNotExist` error (#21504) (#21572)
* Prevent Authorization header for presigned LFS urls (#21531) (#21569)
* Update binding to fix bugs (#21560)
* Fix generating compare link (#21519) (#21530)
* Ignore error when retrieving changed PR review files (#21487) (#21524)
* Fix incorrect notification commit url (#21479) (#21483)
* Display total commit count in hook message (#21400) (#21481)
* Enforce grouped NuGet search results (#21442) (#21480)
* Return 404 when user is not found on avatar (#21476) (#21477)
* Normalize NuGet package version on upload (#22186) (#22201)
* MISC
* Check for zero time instant in TimeStamp.IsZero() (#22171) (#22173)
* Fix warn in database structs sync (#22111)
* Allow for resolution of NPM registry paths that match upstream (#21568) (#21723)

## [1.17.3](https://github.com/go-gitea/gitea/releases/tag/v1.17.3) - 2022-10-15

* SECURITY
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ To maintain understandable code and avoid circular dependencies it is important
- **templates:** Golang templates for generating the html output.
- **tests/e2e:** End to end tests
- **tests/integration:** Integration tests
- **tests/gitea-repositories-meta:** Sample repos used in integration tests. Adding a new repo requires editing `models/fixtures/repositories.yml` and `models/fixtures/repo_unit.yml` to match.
- **tests/gitea-lfs-meta:** Sample LFS objects used in integration tests. Adding a new object requires editing `models/fixtures/lfs_meta_object.yml` to match.
- **vendor:** External code that Gitea depends on.

## Documentation
Expand Down Expand Up @@ -439,7 +441,7 @@ be reviewed by two maintainers and must pass the automatic tests.
Code that you contribute should use the standard copyright header:

```
// Copyright 2022 The Gitea Authors. All rights reserved.
// Copyright <year> The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

```
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 golang:1.19-alpine3.16 AS build-env
FROM golang:1.19-alpine3.17 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand All @@ -26,7 +26,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 alpine:3.16
FROM alpine:3.17
LABEL maintainer="maintainers@gitea.io"

EXPOSE 22 3000
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.gitea.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.16
FROM golang:1.19-alpine3.17

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.rootless
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Build stage
FROM golang:1.19-alpine3.16 AS build-env
FROM golang:1.19-alpine3.17 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand All @@ -23,14 +23,15 @@ 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 alpine:3.16
FROM alpine:3.17
LABEL maintainer="maintainers@gitea.io"

EXPOSE 2222 3000

RUN apk --no-cache add \
bash \
ca-certificates \
dumb-init \
gettext \
git \
curl \
Expand Down Expand Up @@ -68,6 +69,6 @@ ENV HOME "/var/lib/gitea/git"
VOLUME ["/var/lib/gitea", "/etc/gitea"]
WORKDIR /var/lib/gitea

ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
CMD []

3 changes: 1 addition & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Janis Estelmann <admin@oldschoolhack.me> (@KN4CK3R)
Steven Kriegler <sk.bunsenbrenner@gmail.com> (@justusbunsi)
Jimmy Praet <jimmy.praet@telenet.be> (@jpraet)
Leon Hofmeister <dev.lh@web.de> (@delvh)
silentcode <silentcode@senga.org> (@silentcodeg)
Wim <wim@42.be> (@42wim)
xinyu <xinyu@nerv.org.cn> (@penlinux)
Xinyu Zhou <i@sourcehut.net> (@xin-u)
Jason Song <i@wolfogre.com> (@wolfogre)
Yarden Shoham <hrsi88@gmail.com> (@yardenshoham)
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ COMMA := ,
XGO_VERSION := go-1.19.x

AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.1
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.2
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.3
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.5.0
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest

DOCKER_IMAGE ?= gitea/gitea
Expand Down Expand Up @@ -359,7 +359,7 @@ watch-frontend: node-check node_modules

.PHONY: watch-backend
watch-backend: go-check
$(GO) run $(AIR_PACKAGE) -c .air.toml
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml

.PHONY: test
test: test-frontend test-backend
Expand Down
2 changes: 1 addition & 1 deletion build/generate-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import imageminZopfli from 'imagemin-zopfli';
import {optimize} from 'svgo';
import {fabric} from 'fabric';
import {readFile, writeFile} from 'fs/promises';
import {readFile, writeFile} from 'node:fs/promises';

function exit(err) {
if (err) console.error(err);
Expand Down
6 changes: 3 additions & 3 deletions build/generate-svg.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
import fastGlob from 'fast-glob';
import {optimize} from 'svgo';
import {parse} from 'path';
import {readFile, writeFile, mkdir} from 'fs/promises';
import {fileURLToPath} from 'url';
import {parse} from 'node:path';
import {readFile, writeFile, mkdir} from 'node:fs/promises';
import {fileURLToPath} from 'node:url';

const glob = (pattern) => fastGlob.sync(pattern, {
cwd: fileURLToPath(new URL('..', import.meta.url)),
Expand Down
3 changes: 2 additions & 1 deletion cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ func runDeleteUser(c *cli.Context) error {
} else if c.IsSet("username") {
user, err = user_model.GetUserByName(ctx, c.String("username"))
} else {
user, err = user_model.GetUserByID(c.Int64("id"))
user, err = user_model.GetUserByID(ctx, c.Int64("id"))
}
if err != nil {
return err
Expand Down Expand Up @@ -778,6 +778,7 @@ func runRepoSyncReleases(_ *cli.Context) error {

func getReleaseCount(id int64) (int64, error) {
return repo_model.GetReleaseCountByRepoID(
db.DefaultContext,
id,
repo_model.FindReleasesOptions{
IncludeTags: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/dump_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"os"
"strings"

"code.gitea.io/gitea/modules/convert"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
base "code.gitea.io/gitea/modules/migration"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/services/convert"
"code.gitea.io/gitea/services/migrations"

"github.com/urfave/cli"
Expand Down
Loading