mirror of
1
Fork 0
Commit Graph

557 Commits

Author SHA1 Message Date
Renovate Bot fbe464309b Update renovate to v38.52.3 2024-08-26 04:05:34 +00:00
Earl Warren 9fee7ea763
chore(license): clarify the API swagger file is and stays MIT (take 2)
Override the swagger default.
2024-08-23 19:17:07 +02:00
Renovate Bot cbee178245 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.3 2024-08-23 02:05:38 +00:00
Twenty Panda 94631ccef6
Forgejo v9.0 is GPLv3+
* display Forgejo license first
* do not send go-license in a loop because Gitea & Forgejo have
  different licenses

Refs: 62ac0cc334/AGREEMENTS.md
2024-08-22 09:09:29 +02:00
Renovate Bot 63faeb365c Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.2 2024-08-21 02:03:34 +00:00
Gusted 5b81cab0ed Merge pull request '[CHORE] Support reproducible builds' (#4970) from gusted/forgejo-reproducible-builds into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4970
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Radosław Piliszek <radek@piliszek.it>
2024-08-20 18:14:33 +00:00
Gusted be46795975
[CHORE] Support reproducible builds
This is a step towards making Forgejo's binaries (the one listed in the
release tab) reproducible.

In order to make the actual binary reproducible, we have to ensure that
the release workflow has the correct configuration to produce such
reproducible binaries. The release workflow currently uses the
Dockerfile to produce binaries, as this is one of the easiest ways to do
cross-compiling for Go binaries with CGO enabled (due to SQLite). In the
Dockerfile, two new arguments are being given to the build command.
`-trimpath` ensures that the workpath directory doesn't get included in
the binary; this means that file names (such as for panics) are
relative (to the workpath) and not absolute, which shouldn't impact
debugging. `-buildid=` is added to the linker flag; it sets the BuildID
of the Go linker to be empty; the `-buildid` hashes the input actions
and output content; these vary from build to build for unknown reasons,
but likely because of the involvement of temporary file names, this
doesn't have any effect on the behavior of the resulting binary.

The Makefile receives a new command, `reproduce-build#$VERSION` which
can be used by people to produce a reproducible Forgejo binary of a
particular release; it roughly does what the release workflow also does.
Build the Dockerfile and extract the Forgejo binary from it. This
doesn't allow to produce a reproducible version for every release, only
for those that include this patch, as it needs to call the makefile of
that version in order to make a reproducible binary.

There's one thing left to do: the Dockerfile pins the Go version to a
minor level and not to a patch level. This means that if a new Go patch
version is released, that will be used instead and will result in a
different binary that isn't bit to bit the same as the one that Forgejo
has released.
2024-08-19 17:31:57 +02:00
Otto 3b8ac4388a Merge pull request 'Refactor grouped forms to semantic HTML' (#4995) from fnetx/refactor-grouped-forms into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4995
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-19 14:53:35 +00:00
Earl Warren 51620ab0f3 Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.1 (forgejo)' (#4953) from renovate/forgejo-github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4953
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-19 07:38:14 +00:00
Renovate Bot 1b9222f6e2 Update renovate to v38.39.6 2024-08-19 02:03:33 +00:00
Otto Richter c9e402afdc feat(tmpl): Introduce semantic HTML in forms
Modifies forms:

- (new) org team
- (new) repo webhook
- (new) repo protected branch

The forms are not completely rewritten to semantic HTML yet. The focus
of this change was on standard elements, some custom solutions were left
untouched for now.

- swaps the order fo permission radio buttons as per https://codeberg.org/forgejo/forgejo/issues/4983
- uses fieldsets to group related inputs
  - ensures consistent styling across forms
  - can be improved later, e.g. using horizontal lines between sections
- fixes: previous font size of labels was smaller than the font size of the help text
- help text are now part of the label, clicking them now also activates the input
- drop unused CSS (no required checkboxes in grouped class remain)
- playwright testing:
  - move login boilerplate to utils
  - automated form accessibility checking
    - allow defining the scope, because legacy parts of the forms are not yet accessible
  - assert some CSS properties that should not be overriden
- the Makefile adjustment was necessary, because eslint scanned some internal files in the tests/e2e/reports directory
2024-08-19 01:14:18 +02:00
Gusted 22d57cfc6b Merge pull request 'chore(make): structure and clean up Makefile a little' (#4979) from fnetx/makefile-structure into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4979
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-18 15:27:02 +00:00
Renovate Bot 674689af4a
Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.1 2024-08-18 16:03:29 +02:00
Otto Richter 7e0cebecb0 Drop docker target from Makefile
as per https://codeberg.org/forgejo/forgejo/pulls/4979#issuecomment-2181764
2024-08-18 15:14:34 +02:00
Renovate Bot 1b8a79f820 Update module mvdan.cc/gofumpt to v0.7.0 2024-08-17 00:02:59 +00:00
Otto Richter b390641478 Drop vendor filter (dir is gone), left-align help messages 2024-08-16 15:28:48 +02:00
Otto Richter ac5d4f68d1 Comments for structure, moving things around, drop Gitea mentions 2024-08-16 15:04:25 +02:00
Otto Richter f2ab8c8ea7 Drop legacy update-translation target 2024-08-16 14:54:55 +02:00
Gusted a21128a734
[CHORE] Drop `go-git` support
See https://codeberg.org/forgejo/discussions/issues/164 for the
rationale and discussion of this change.

Everything related to the `go-git` dependency is dropped (Only a single
instance is left in a test file to test for an XSS, it requires crafting
an commit that Git itself refuses to craft). `_gogit` files have
been removed entirely, `go:build: !gogit` is removed, `XXX_nogogit.go` files
either have been renamed or had their code being merged into the
`XXX.go` file.
2024-08-12 19:11:09 +02:00
Renovate Bot eb6afae1c0 Update renovate to v38.25.0 2024-08-12 00:04:22 +00:00
Renovate Bot 8039240c26
Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 2024-08-09 21:03:37 +02:00
Renovate Bot 99d78fb9e7 Update x/tools to v0.24.0 2024-08-09 10:25:53 +00:00
Renovate Bot 52666d4a8a Update renovate to v38.21.3 2024-08-08 08:05:32 +00:00
Renovate Bot 00ae44129d Update renovate to v38.18.12 2024-08-05 00:02:57 +00:00
Michael Kriese 707318fcc8
chore(renovate): use mirror image 2024-07-30 09:23:44 +02:00
Renovate Bot 5e3d4b001c Update renovate to v38.9.0 2024-07-29 08:02:14 +00:00
Renovate Bot 5da7b3ae1f Update renovate to v38 2024-07-26 20:01:43 +00:00
Renovate Bot 20de7e5fdf Update renovate to v37.438.2 2024-07-22 00:04:06 +00:00
Gusted 984d0127f1
Enable multiStatements for MySQL 2024-07-16 23:16:03 +02:00
Renovate Bot 20161546d5 Update renovate to v37.431.4 2024-07-15 04:03:33 +00:00
Earl Warren 4f6c823ae7 Merge pull request '[gitea] week 2024-28 cherry pick (gitea/main -> forgejo)' (#4391) from earl-warren/wcp/2024-28 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4391
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-09 05:37:52 +00:00
Renovate Bot a86380419e Update module golang.org/x/tools/cmd/deadcode to v0.23.0 2024-07-09 00:03:39 +00:00
Renovate Bot faaf03a44a Update renovate to v37.425.2 2024-07-08 13:01:21 +00:00
silverwind e1b90212e4
Use stable version of fabric (#31526)
Fabric 6 is [now
stable](https://github.com/fabricjs/fabric.js/releases/tag/v6.0.0-rc5),
use it.

(cherry picked from commit 5821d22891cb3aa1e1c9590d8b921728b4969c5f)
2024-07-07 07:27:53 +02:00
Michael Kriese b31e21d80e
build(go-licenses): support go toolchain mismatch 2024-07-04 14:42:26 +02:00
Renovate Bot 75966ddef6 Update module golang.org/x/tools/gopls to v0.16.1 2024-07-03 16:03:58 +00:00
Renovate Bot db8fb0021f Update renovate to v37.421.2 2024-07-01 00:01:26 +00:00
Renovate Bot 6f423143ea
Update module golang.org/x/tools/gopls to v0.16.0 2024-06-28 15:35:02 +02:00
Michael Kriese 28abbcc858
chore(renovate): sync renovate versions 2024-06-25 08:27:54 +02:00
Earl Warren 536efeb26e
test(js): make test-frontend-coverage displays vitest coverage 2024-06-24 10:03:42 +02:00
Renovate Bot 24915f4df5 Update dependency renovate to v37.413.4 2024-06-21 02:02:15 +00:00
Earl Warren 7e0ab55e5f
fix(renovate): add renovate.json validation to lint-backend
Also catch the warning about JSON5 as an error because it will fail
the renovate run.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3619
2024-06-18 19:26:17 +02:00
Elias Elwyn abde31148f Integration test for redis alternatives - garnet, redict (#4138)
For #4082.

~~Per the discussion in the issue, the current plan will likely involve duplicating the redis library calling code once for each cacher, as neither garnet nor redict guarantee continued compatibility with redis.~~

See discussion below for details.

## Tasklist

- [x] Write workflow to run cache-specific unit test(s) only (cache, session, queue, nosql) for each cacher
- [x] Check whether garnet and redict pass unit tests with no code modification (gauge required work)
  - both passed, but that is because there were very few tests that test the remote cache store

### Out of scope for this PR

- Improve test coverage
  - `modules/cache` against a server
  - `modules/session` against a server (also needs tests in general)
- _(?) Duplicate implementation for each cacher_
  - _Restructure redis usage in `modules/cache` and `modules/settings/cache`_
  - _Restructure `modules/session` and its settings_
  - _Restructure `modules/queue` and its settings_
  - _Restructure `modules/nosql` and its settings_

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4138
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Elias Elwyn <a@jthv.ai>
Co-committed-by: Elias Elwyn <a@jthv.ai>
2024-06-18 12:31:15 +00:00
Earl Warren df373c9f7e Merge pull request '[gitea] week 2024-24 cherry pick (gitea/main -> forgejo)' (#4083) from earl-warren/wcp/2024-24 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4083
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-11 10:37:26 +00:00
Renovate Bot 0f4d617887 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.59.1 2024-06-10 06:02:35 +00:00
silverwind eaa2fef868
Enable poetry non-package mode (#31282)
[Poetry
1.8.0](https://github.com/python-poetry/poetry/releases/tag/1.8.0) added
support for [non-package
mode](https://python-poetry.org/docs/basic-usage/#operating-modes), e.g.
projects that are not python packages themselves like we are. Make use
of that and remove the previous workaround via `--no-root`.

(cherry picked from commit 15debbbe4eb94c1855a0178e379b7e3d19bd07ad)

Conflicts:
	Makefile
	pyproject.toml
	trivial context conflict
2024-06-09 16:04:57 +02:00
silverwind 6582f0029b
Add `lint-go-gopls` (#30729)
Uses `gopls check <files>` as a linter. Tested locally and brings up 149
errors currently for me. I don't think I want to fix them in this PR,
but I would like at least to get this analysis running on CI.

List of errors:
```
modules/indexer/code/indexer.go:181:11: impossible condition: nil != nil
routers/private/hook_post_receive.go:120:15: tautological condition: nil == nil
services/auth/source/oauth2/providers.go:185:9: tautological condition: nil == nil
services/convert/issue.go:216:11: tautological condition: non-nil != nil
tests/integration/git_test.go:332:9: impossible condition: nil != nil
services/migrations/migrate.go:179:24-43: unused parameter: ctx
services/repository/transfer.go:288:48-69: unused parameter: doer
tests/integration/api_repo_tags_test.go:75:41-61: unused parameter: session
tests/integration/git_test.go:696:64-74: unused parameter: baseBranch
tests/integration/gpg_git_test.go:265:27-39: unused parameter: t
tests/integration/gpg_git_test.go:284:23-29: unused parameter: tmpDir
tests/integration/gpg_git_test.go:284:31-35: unused parameter: name
tests/integration/gpg_git_test.go:284:37-42: unused parameter: email
```

(cherry picked from commit 816222243af523316041692622be6f48ef068693)

Conflicts:
	Makefile
	trivial context conflict and also ask renovate to watch over it
	do not include it in lint-backend because the errors are not fixed
2024-06-09 11:13:39 +02:00
Earl Warren 9464d51b2b
chore(deadcode): restore the previous format
While the newer default format is machine parsable, it also contains
line numbers which makes it sensitive to any change unrelated to deadcode.
2024-06-08 22:04:04 +02:00
Renovate Bot d14bfc5586 Update module github.com/golangci/misspell/cmd/misspell to v0.6.0 2024-06-08 00:02:59 +00:00
0ko bd4ee91a19 Upgrade deadcode package to a new name (#4048)
We're stuck on an old version of golang deadcode. Renovate is confused by it's rename in https://codeberg.org/forgejo/forgejo/pulls/4043.

I don't remember how to use this tool to test it, let's see how the CI reacts to this PR.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4048
Reviewed-by: Victoria <efertone@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2024-06-07 05:42:59 +00:00