Compare commits

...

1818 commits

Author SHA1 Message Date
049b585345
Add tudbut-rebuild.sh
Some checks failed
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (map[image:docker.io/bitnami/redis:7.2 port:6379]) (push) Has been skipped
testing / test-remote-cacher (map[image:docker.io/bitnami/valkey:7.2 port:6379]) (push) Has been skipped
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Has been skipped
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
/ release (push) Has been cancelled
2024-11-11 12:21:38 +01:00
76449a989d
allow everyone to see full heatmap 2024-11-11 12:21:36 +01:00
Michael Kriese
1e7b368ccf Merge pull request 'chore: set recommend vscode settings for golangci-lint' (#5913) from viceice/chore/vscode-lint into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5913
2024-11-11 10:32:49 +00:00
Michael Kriese
b4ceadce1c
chore: set recommend vscode settings for golangci-lint 2024-11-11 10:53:47 +01:00
Gusted
49f9bc716a Merge pull request 'fix: Re-add least recently updated as sort order' (#5909) from fnetx/sortoption-regression into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5909
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-11 08:46:10 +00:00
Gusted
5f25351d48 Merge pull request 'Update dependency @vitejs/plugin-vue to v5.1.5 (forgejo)' (#5910) from renovate/forgejo-vitejs-plugin-vue-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5910
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-11 08:45:48 +00:00
Renovate Bot
ff1a084fa3 Update renovate to v39.9.0 (forgejo) (#5907)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-11 05:57:44 +00:00
Gusted
2fd6a31f02 Merge pull request 'Update dependency postcss to v8.4.48 (forgejo)' (#5908) from renovate/forgejo-postcss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5908
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-11 04:59:41 +00:00
Renovate Bot
ecff6b5850 Update dependency @vitejs/plugin-vue to v5.1.5 2024-11-11 02:03:25 +00:00
Otto Richter
c92b4b12c8 fix: Re-add least recently updated as sort order
Regression from https://codeberg.org/forgejo/forgejo/pulls/5819
Integration test added (my first! 🎉)
2024-11-11 01:37:20 +01:00
Renovate Bot
10f8468637 Update dependency postcss to v8.4.48 2024-11-11 00:05:25 +00:00
Otto
50ded8da59 [skip ci] Merge pull request 'document sqlite3 as suggested database' (#5415) from Dirk/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5415
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-10 23:53:35 +00:00
Gusted
b1481b8e54 Merge pull request 'chore: improve database docker instructions' (#5906) from gusted/forgejo-db-docker into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5906
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-10 22:03:55 +00:00
Earl Warren
8f6dfe29da Merge pull request 'chore: improve test quality' (#5904) from gusted/forgejo-improve-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5904
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-10 20:35:50 +00:00
Gusted
582ab21bc3
chore: improve test quality
- Merge tests together.
- Remove unecessary usage of `onGiteaRun`.
- Make proper use of `unittest`.
- Make proper use of `test.MockVariable`.
- I have not checked all of the testing files yet.
2024-11-10 20:34:14 +01:00
Gusted
f352d6db81
chore: improve database docker instructions
- Do not require minio for mariadb docker.
- Do not require elasticsearch for mysql.
- Fix postgress password parameter.
- Add the multistatement query for mysql (this is not optimal but adding
Makefile code doesn't seem to work really well either)
2024-11-10 19:41:04 +01:00
Gusted
1a8f86cc0b Merge pull request 'chore: simplify CopyDir' (#5903) from gusted/forgejo-simplify-copydir into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5903
Reviewed-by: Otto <otto@codeberg.org>
2024-11-10 17:15:25 +00:00
Gusted
cdf3636ae7
chore: simplify CopyDir
Use the standard library function [`os.CopyFS`](https://pkg.go.dev/os#CopyFS) to copy directories.
This also should be slightly faster.
2024-11-10 17:21:57 +01:00
Otto
ab36ab57e4 Merge pull request 'enh(issue search): sort by score and term based query for fuzzy search' (#5819) from snematoda/enh-issue-search into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5819
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-10 12:51:55 +00:00
Earl Warren
2cfd59cb30 Merge pull request 'chore(ci): Enforce test label with CI check' (#5886) from fnetx/test-label-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5886
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-10 12:21:08 +00:00
Earl Warren
542a9d2529 Merge pull request 'fix(ci): only trigger end-to-end tests when the label is set' (#5896) from earl-warren/forgejo:wip-label-end-to-end into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5896
Reviewed-by: Otto <otto@codeberg.org>
2024-11-10 12:09:46 +00:00
Earl Warren
493175e6fd
fix(ci): only trigger end-to-end tests when the label is set
Use event.label instead of event.pull_request.labels.*.name

Prior to Forgejo v9.0.2 it was not set and that was the only workaround.
2024-11-10 11:44:59 +01:00
Shiny Nematoda
b6e6a2c36e test: add for issue indexer sort by score 2024-11-10 07:17:27 +00:00
Shiny Nematoda
a265574821 enh(search): improve issue search
- new sort by relevency option for issue search
- rework bleve fuzzy search to consider each term rather than matching the entire phrase
2024-11-10 07:17:27 +00:00
Gusted
d51847103d Merge pull request 'Update module golang.org/x/net to v0.31.0 (forgejo)' (#5890) from renovate/forgejo-golang.org-x-net-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5890
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-10 03:49:16 +00:00
Otto
6712ff6fa2 Merge pull request 'chore: lazy-loaded version of goccy/go-json' (#5888) from gusted/forgejo-better-json into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5888
Reviewed-by: Otto <otto@codeberg.org>
2024-11-10 03:23:34 +00:00
Renovate Bot
b462351933 Update module golang.org/x/net to v0.31.0 2024-11-10 02:13:04 +00:00
Otto
888a0c022e Merge pull request 'fix(ui): Details icon in repo settings sidebar' (#5885) from fnetx/repo-settings-sidebar-details-icon into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5885
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-10 02:03:20 +00:00
Gusted
11667f07c5
chore: lazy-loaded version of goccy/go-json
- This uses a forked version of https://github.com/goccy/go-json, that
has [this pull request](https://github.com/goccy/go-json/pull/490)
applied. It reduces the heap memory usage by 8MiB (idle heap usage from
startup: 40126.59kB -> 32073.56kB). This should be generally safe to
replace as goccy/go-json doesn't see frequent updates and the other user
of this fork is grafana which is another big Go project.
- The only user of this library is minio, but having a configuration
with minio is not a common setup, AFAIK, so this is essentialy wasted
memory for most Forgejo instances. Having it lazy-loaded solves that
problem.
2024-11-10 02:32:35 +01:00
Otto Richter
2483dbc694 chore(ci): Enforce test label with CI check
Re-add the test after bugfixes have been deployed to Codeberg
2024-11-10 02:16:21 +01:00
Gusted
d2ba9806f3 Merge pull request 'Update module golang.org/x/crypto to v0.29.0 (forgejo)' (#5883) from renovate/forgejo-golang.org-x-crypto-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5883
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-10 00:50:01 +00:00
Otto Richter
5932b86af4 fix(ui): Details icon in repo settings sidebar
Consistent classes between both details/summary constructs in the sidebar, ensuring they have the same style.
2024-11-10 01:44:37 +01:00
Renovate Bot
71d3e4c317 Update module golang.org/x/crypto to v0.29.0 2024-11-10 00:03:52 +00:00
Gusted
ea1ff23f36 Merge pull request 'fix: Move "forgot_password"-link to fix login tab order' (#5838) from mrsmoer/fix-login-taborder into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5838
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-09 22:59:50 +00:00
MrSmoer
8587d49979 Remove unused css class "form-field-content-aside-label"
This css class was used to display the "forgot password"-link right and above the password field.
cd75519a0b moves this link, so this class is now unused
2024-11-09 22:59:50 +00:00
MrSmoer
506ed7f43f fix: Move "forgot_password"-link to fix login tab order
Previously hitting tab in the username field set the focus to the "forgot password" link. Only on the next hit the password field was selected.
This is an issue for some password managers (keepassdx android keyboard) and not as nice for accessibility.
Now the forgot link is below the sign up link at the bottom of the page.
Using "tabindex" didn't work properly with the templating engine because many elements get assigned a tabindex of "0" by default disrupting the tab selection sequence.
2024-11-09 22:59:50 +00:00
Gusted
265fb6bd1d Merge pull request '[THEME] Copy ansi terminal colours from gitea to forgejo themes' (#5881) from RagnarGrootKoerkamp/forgejo:fix-terminal-colours into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5881
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-09 21:24:30 +00:00
Ragnar Groot Koerkamp
e58d5d46c1 [THEME] Copy ansi terminal colours from gitea to forgejo themes 2024-11-09 21:14:31 +01:00
Gusted
59926daf7f Merge pull request '[PORT] Fix code owners will not be mentioned when a pull request comes from a forked repository (gitea#30476)' (#5850) from gusted/forgejo-fix-cond-codeowners into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5850
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-09 18:41:50 +00:00
Gusted
536e1923b4
chore: add extra integration test 2024-11-09 19:13:08 +01:00
Earl Warren
8852f2c0ee Merge pull request 'fix(ci): slow runners may need more than 50 minutes for a test' (#5878) from earl-warren/forgejo:wip-ci-timeout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5878
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-09 17:50:24 +00:00
Earl Warren
39f4018d87
fix(ci): slow runners may need more than 50 minutes for a test 2024-11-09 18:16:38 +01:00
Renovate Bot
dffee135f8 Update module code.forgejo.org/go-chi/captcha to v1 (forgejo) (#5864)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5864
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-09 07:28:23 +00:00
Lunny Xiao
2efc1f5686
[PORT] Fix code owners will not be mentioned when a pull request comes from a forked repository (gitea#30476)
Fix #30277
Caused by #29783

---

- Resolves #5842
- Regression from #2855

(cherry picked from commit c63060b130d34e3f03f28f4dccbf04d381a95c17)
2024-11-09 00:46:48 +01:00
Earl Warren
9a15b2be43 Merge pull request 'bug: require.Eventually must not test with assert' (#5869) from earl-warren/forgejo:wip-race-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5869
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-08 23:41:27 +00:00
Renovate Bot
5ab832ba87 Update module code.forgejo.org/go-chi/session to v1 (forgejo) (#5865)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5865
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-08 23:37:13 +00:00
Earl Warren
2541a943ce
bug: require.Eventually must not test with assert
Otherwise it fails the test instead of retrying if the condition fails
at least once.
2024-11-09 00:07:18 +01:00
Renovate Bot
bf69683df6 Update module code.forgejo.org/go-chi/cache to v1 (forgejo) (#5863)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5863
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-08 21:12:20 +00:00
Renovate Bot
d2a3eefcd0 Update module code.forgejo.org/go-chi/binding to v1 (forgejo) (#5862)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5862
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-08 17:43:48 +00:00
Otto
10b90aa2d2 Merge pull request 'chore(renovate): only run if renovate workflow changed' (#5858) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5858
Reviewed-by: Otto <otto@codeberg.org>
2024-11-08 12:40:00 +00:00
Michael Kriese
2eeb2fcd35
chore(renovate): only run if renovate workflow changed 2024-11-08 13:05:43 +01:00
Earl Warren
765405ea2a Merge pull request 'chore(renovate): update settings' (#5857) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5857
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-08 11:22:23 +00:00
Michael Kriese
669b4b46e6
chore(renovate): pin to single actions runner 2024-11-08 12:18:29 +01:00
Michael Kriese
4f336e589d
chore(renovate): group forgejo go-chi packages 2024-11-08 12:17:00 +01:00
Otto
30f795d925 Merge pull request '[PORT] Refactor tests to prevent from unnecessary preparations (gitea#32398)' (#5790) from gusted/forgejo-port-32398 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5790
Reviewed-by: Otto <otto@codeberg.org>
2024-11-07 23:26:22 +00:00
wxiaoguang
3c4153b195
[PORT] Refactor tests to prevent from unnecessary preparations (gitea#32398)
Some preparations are only used by a few tests, so to make the tests fast, they should only be prepared when they are used.

By the way, this PR splits PrepareTestEnv into small functions to make it simple.

---

Conflict resolution: Mostly magical and just re-pasting the code into
the right places.
Done differently: use `require.NoError` instead of `assert.NoError`.

(cherry picked from commit ec2d1593c269e06655525deb96f74b8094221b6f)
2024-11-07 23:02:10 +01:00
Earl Warren
5e777a43a1 Merge pull request 'fix: issue labels are not set after deleting one label' (#5843) from earl-warren/forgejo:wip-unlabeled into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5843
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-07 10:36:45 +00:00
Earl Warren
f06bdb0552
chore(refactor): split ReloadLabels out of LoadLabels in issue model
Functions modifying the labels in the database (DeleteIssueLabel,
NewIssueLabels, NewIssueLabel, ReplaceIssueLabels) need to force
reload them. Instead of:

	issue.isLabelsLoaded = false
	issue.Labels = nil
	if err = issue.LoadLabels(ctx); err != nil {
		return err
	}

They can now use:

	if err = issue.ReloadLabels(ctx); err != nil {
		return err
	}
2024-11-07 11:05:38 +01:00
Earl Warren
db899c19d8
fix: issue labels are not set after deleting one label
Because issue.isLabelsLoaded = false is missing, LoadLabels is a noop
and the issue.Labels is nil.
2024-11-07 10:38:01 +01:00
Renovate Bot
7da6778ce1 Update dependency eslint-plugin-playwright to v2.0.1 (forgejo) (#5837)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-07 07:52:50 +00:00
Codeberg Translate
600be26638 i18n: update of translations from Codeberg Translate (#5754)
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: Edgarsons <Edgarsons@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: Atalanttore <Atalanttore@users.noreply.translate.codeberg.org>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: artnay <artnay@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: dobrvlskyi <dobrvlskyi@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5754
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-11-07 07:22:37 +00:00
Renovate Bot
ee5d1cf876 Update dependency happy-dom to v15.11.0 (forgejo) (#5840)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-07 06:40:27 +00:00
Earl Warren
18cf8adc71 Merge pull request 'Update dependency go to v1.23.3 (forgejo)' (#5836) from renovate/forgejo-patch-golang-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5836
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-07 06:38:35 +00:00
Renovate Bot
94650c27a8 Update dependency go to v1.23.3 2024-11-07 00:03:28 +00:00
Otto
019083ed5a Merge pull request 'Make direnv optional to let developers use their own direnv configuration' (#5835) from psentee/forgejo:psentee/make-envrc-optional into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5835
Reviewed-by: Otto <otto@codeberg.org>
2024-11-06 20:31:09 +00:00
Maciej Pasternacki
ffcf80c3a5 Make direnv optional to let developers use their own direnv configuration 2024-11-06 20:34:49 +01:00
Earl Warren
a97ec9bd83 Merge pull request 'fix: labels are missing in the pull request payload removing a label' (#5831) from earl-warren/forgejo:wip-unlabeled into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5831
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-06 17:37:07 +00:00
Earl Warren
c801838690
fix: labels are missing in the pull request payload removing a label
When ReplaceIssueLabels calls issue.LoadLabels it was a noop because
issue.isLabelsLoaded is still set to true because of the call  to
issue.LoadLabels that was done at the beginning of the function.
2024-11-06 16:43:14 +01:00
Earl Warren
85ff5ecafd Merge pull request 'chore(renovate): fix regex' (#5832) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5832
Reviewed-by: Otto <otto@codeberg.org>
2024-11-06 15:41:13 +00:00
Michael Kriese
968ca15f06
chore(renovate): fix regex 2024-11-06 15:58:44 +01:00
Otto
4e009474e0 Merge pull request 'chore(renovate): use squash for automerge' (#5830) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5830
Reviewed-by: Otto <otto@codeberg.org>
2024-11-06 14:44:48 +00:00
Michael Kriese
8bb33b2c4c
chore(renovate): use squash for automerge
We don't sign commits, so no benefit for a merge commit.
2024-11-06 15:42:07 +01:00
Renovate Bot
8b27dcb3b6 Update renovate to v39 (forgejo) (major) (#5829)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5829
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-06 14:39:53 +00:00
Otto
0fb48872ac Merge pull request '[FEAT] Trim spaces from repo names on form submission' (#5822) from gusted/forgejo-trim-spaces-form into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5822
Reviewed-by: Otto <otto@codeberg.org>
2024-11-06 09:16:17 +00:00
Earl Warren
36b18fb6cc Merge pull request '[gitea] week 2024-45 cherry pick (gitea/main -> forgejo)' (#5789) from algernon/wcp/2024-45 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5789
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-06 08:57:43 +00:00
forgejo-renovate-action
b68c98ff3e Merge pull request 'Update dependency happy-dom to v15.10.0 (forgejo)' (#5825) from renovate/forgejo-happy-dom-15.x into forgejo 2024-11-06 08:03:09 +00:00
Renovate Bot
104a1b6fca Update dependency happy-dom to v15.10.1 2024-11-06 02:03:49 +00:00
forgejo-renovate-action
473270bbdb Merge pull request 'Update dependency djlint to v1.36.0 (forgejo)' (#5824) from renovate/forgejo-djlint-1.x into forgejo 2024-11-06 00:52:31 +00:00
Renovate Bot
329650a9b4 Update dependency djlint to v1.36.0 2024-11-06 00:03:27 +00:00
Gusted
4952747699
[FEAT] Trim spaces from repository name
- This uses the `TrimSpace` preprocessing of the binding library to
remove any accidental spaces from the input.
- Integration test added.
- Resolves #4309
2024-11-05 23:13:17 +01:00
Gusted
310376525b
[CHORE] Use forked binding library
- Use the forked [binding](https://code.forgejo.org/go-chi/binding)
library. This library has two benefits, it removes the usage of
`github.com/goccy/go-json` (has no benefit as the minimo library is also
using it). It adds the `TrimSpace` feature, which will during the
binding part trim the spaces around the value it got from the form, this
is done before validation.
2024-11-05 22:47:34 +01:00
Otto
f28e728317 Merge pull request '[PORT] Replace DateTime with proper functions (gitea#32402)' (#5796) from gusted/forgejo-port-dateutils into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5796
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 21:46:29 +00:00
Otto
cd0ac4181e Merge pull request 'chore(ci): deprecate legacy infrastructure supporting v*.next' (#5820) from earl-warren/forgejo:wip-next-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5820
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 21:42:34 +00:00
Gusted
2f8e7a2c67
[CHORE] Add extra testing
- Do more property testing for null values.
- Add test for `AbsoluteLong`.
2024-11-05 21:20:55 +01:00
Gusted
25c7c531f5 Merge pull request '[PORT] Refactor the DB migration system slightly (gitea#32344)' (#5793) from gusted/forgejo-port-32344 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5793
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 20:15:11 +00:00
Gusted
d5a1188086 Merge pull request 'feat: add partial quoting' (#5677) from gusted/forgejo-partial-qouting into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5677
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 20:13:04 +00:00
Earl Warren
ece87d0569
chore(ci): deprecate legacy infrastructure supporting v*.next
https://code.forgejo.org/infrastructure/k8s/ was replaced with
https://code.forgejo.org/infrastructure/k8s-cluster/
2024-11-05 16:18:06 +01:00
Michael Kriese
c8ba330833 Merge pull request 'test: enable gitea migration tests' (#5817) from viceice/test/migrations/gitea into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5817
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-05 10:55:30 +00:00
Michael Kriese
f6dbb97a30 Merge pull request 'test: enable github migration tests' (#5816) from viceice/test/migrations/github into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5816
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-05 10:54:05 +00:00
Gusted
7252445b4c Merge pull request '[PORT] Fix toAbsoluteLocaleDate and add more tests (gitea#32387)' (#5792) from gusted/forgejo-port-data-time into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5792
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 10:46:14 +00:00
Otto
ae8e8f388c Merge pull request 'i18n: Add dummy language for checking translation keys (#5785)' (#5786) from xtex/forgejo:dummy-lang into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5786
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-05 10:41:15 +00:00
Michael Kriese
64bf7f3696
test: enable gitea migration tests 2024-11-05 11:16:19 +01:00
xtex
42eed7dbea i18n: Add dummy language for checking translation keys (#5785) 2024-11-05 09:59:04 +00:00
Michael Kriese
c68fcaf53d
test: enable github migration tests 2024-11-05 10:37:28 +01:00
Gergely Nagy
cc03ac9e8f
chore(release-notes): notes for the week 2024-45 weekly cherry pick 2024-11-05 09:39:24 +01:00
Gergely Nagy
597f83c735
fix(tests): Fix TestMigrateActionsArtifacts()
Since we have artifact fixtures now, some ids are in use. To avoid
reusing IDs, start them at 42, rather than 0. That's past the ids used
by the fixtures.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-11-05 09:39:24 +01:00
Gergely Nagy
ae6292ba38
chore: Fix a few lint errors
- Adjust `PrepareArtifactsStorage` to use `require.NoError` instead of
  `assert.NoError`
- Adjust `TestActionsArtifactDownload` to have the proper order of
  `assert.Equal` arguments.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-11-05 09:39:24 +01:00
Lunny Xiao
268276d4a7
Fix created_unix for mirroring (#32342)
Fix #32233

(cherry picked from commit 13a203828c40f9ad1005b16b4ae26256a7df8263)
2024-11-05 09:39:23 +01:00
Rowan Bohde
befafe9a05
improve performance of diffs (#32393)
This has two major changes that significantly reduce the amount of work
done for large diffs:

* Kill a running git process when reaching the maximum number of files
in a diff, preventing it from processing the entire diff.
* When loading a diff with the URL param `file-only=true`, skip loading
stats. This speeds up loading both hidden files of a diff and sections
of a diff when clicking the "Show More" button.

A couple of minor things from profiling are also included:

* Reuse existing repo in `PrepareViewPullInfo` if head and base are the
same.

The performance impact is going to depend heavily on the individual diff
and the hardware it runs on, but when testing locally on a diff changing
100k+ lines over hundreds of files, I'm seeing a roughly 75% reduction
in time to load the result of "Show More"

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 7dcccc3bb19655a6f83dd495ffc332708d0c8678)
2024-11-05 09:39:21 +01:00
Kyle D.
748ae10e7c
Add artifacts test fixture (#30300)
Closes https://github.com/go-gitea/gitea/issues/30296

- Adds a DB fixture for actions artifacts
- Adds artifacts test files
- Clears artifacts test files between each run
- Note: I initially initialized the artifacts only for artifacts tests,
but because the files are small it only takes ~8ms, so I changed it to
always run in test setup for simplicity
- Fix some otherwise flaky tests by making them not depend on previous
tests

(cherry picked from commit 66971e591e5dddd5b6dc1572ac48f4e4ab29b8e0)

Conflicts:
	- tests/integration/api_actions_artifact_test.go
	  Conflict resolved by manually changing the tested artifact
	  name from "artifact" to "artifact-download"
	- tests/integration/api_actions_artifact_v4_test.go
	  Conflict resolved by manually updating the tested artifact
	  names, and adjusting the test case only present in our tree.
	- tests/test_utils.go
	  Resolved by manually copying the added function.
2024-11-05 09:33:15 +01:00
Zettat123
6b74043b85
Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365)
Fix #28121

I did some tests and found that the `missing signature key` error is
caused by an incorrect `Content-Type` header. Gitea correctly sets the
`Content-Type` header when serving files.

348d1d0f32/routers/api/packages/container/container.go (L712-L717)
However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may
be set to an incorrect value by the storage service. To fix this issue,
we can use query parameters to override response header values.

https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
<img width="600px"
src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555"
/>

In this PR, I introduced a new parameter to the `URL` method to support
additional parameters.

```
URL(path, name string, reqParams url.Values) (*url.URL, error)
```

---

Most S3-like services support specifying the content type when storing
objects. However, Gitea always use `application/octet-stream`.
Therefore, I believe we also need to improve the `Save` method to
support storing objects with the correct content type.

b7fb20e73e/modules/storage/minio.go (L214-L221)
(cherry picked from commit 0690cb076bf63f71988a709f62a9c04660b51a4f)

Conflicts:
	- modules/storage/azureblob.go
	  Dropped the change, as we do not support Azure blob storage.
	- modules/storage/helper.go
	  Resolved by adjusting their `discardStorage` to our
	  `DiscardStorage`
	- routers/api/actions/artifacts.go
	  routers/api/actions/artifactsv4.go
	  routers/web/repo/actions/view.go
	  routers/web/repo/download.go
	  Resolved the conflicts by manually adding the new `nil`
	  parameter to the `storage.Attachments.URL()` calls.

	  Originally conflicted due to differences in the if expression
	  above these calls.
2024-11-05 09:33:15 +01:00
Oleksandr Redko
4aa61601c3
refactor: remove redundant err declarations (#32381)
(cherry picked from commit f4d3aaeeb9e1b11c5495e4608a3f52f316c35758)

Conflicts:
	- modules/charset/charset_test.go
	  Resolved by manually changing a `=` to `:=`, as per the
	  original patch. Conflict was due to `require.NoError`.
2024-11-05 09:33:15 +01:00
yp05327
2a38208004
Fix the missing menu in organization project view page (#32313)
#29248 didn't modify the view page.
The class name is not good enough, so this is a quick fix.

Before:
org:

![image](https://github.com/user-attachments/assets/3e26502d-66b4-4043-ab03-003ba7391487)
user:

![image](https://github.com/user-attachments/assets/9b22b90c-d63c-4228-acad-4d9fb20590ac)

After:
org:

![image](https://github.com/user-attachments/assets/21bf98a7-8a5b-4dc6-950a-88f529e36450)
user: (no change)

![image](https://github.com/user-attachments/assets/fea0dcae-3625-44e8-bb9e-4c3733da8764)

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit dd1f67491f5e2f798a537a61c082b1bf12e47635)
2024-11-05 09:33:15 +01:00
Royce Remer
fe5adbbbdc
Add new [lfs_client].BATCH_SIZE and [server].LFS_MAX_BATCH_SIZE config settings. (#32307)
This contains two backwards-compatible changes:
* in the lfs http_client, the number of lfs oids requested per batch is
loaded from lfs_client#BATCH_SIZE and defaulted to the previous value of
20
* in the lfs server/service, the max number of lfs oids allowed in a
batch api request is loaded from server#LFS_MAX_BATCH_SIZE and defaults
to 'nil' which equates to the previous behavior of 'infinite'

This fixes #32306

---------

Signed-off-by: Royce Remer <royceremer@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit c60e4dc1095ef90a790582cacfad27c972637bb2)

Conflicts:
	- services/lfs/server.go
	  Conflict due to our Quota implementation. Resolved by manually
	  adding the change after the quota check.
2024-11-05 09:33:15 +01:00
Rowan Bohde
e426ce257c
remove unused call to $.HeadRepo in view_title template (#32317)
This is only populated in
[`ParseCompareInfo`](https://github.com/search?q=repo%3Ago-gitea%2Fgitea%20%20.Data%5B%22HeadRepo%22%5D&type=code)
which is called in two handlers:

*
[`CompareAndPullRequestPost`](9206fbb55f/routers/web/repo/pull.go (L1246))
- a JSON post handler that doesn't render templates
*
[`CompareDiff`](9206fbb55f/routers/web/repo/compare.go (L706))
- which can render `diff/box.tmpl` and `diff/compare.tmpl`

(cherry picked from commit 1cd3f698591edf4fba7880a150b05855cdf40d47)
2024-11-05 09:33:15 +01:00
Lunny Xiao
42724b09c1
Fix clean tmp dir (#32360)
Try to fix #31792

Credit to @jeroenlaylo
Copied from
https://github.com/go-gitea/gitea/issues/31792#issuecomment-2311920520

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit feca8802b85dd75090c533ebdb92835d3d529f17)
2024-11-05 09:33:15 +01:00
6543
643f476e35
Optimize branch protection rule loading (#32280)
before if it was nonglob each load would try to glob it and the check
that is not glob ... now we only do that once and no future loading will
trigger it

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit 5d43801b72790ce5862aefdc4520edb06bb4cbba)
2024-11-05 09:33:15 +01:00
forgejo-renovate-action
e40c8f0d21 Merge pull request 'Update linters to v8.13.0 (forgejo)' (#5815) from renovate/forgejo-linters into forgejo 2024-11-05 07:53:47 +00:00
forgejo-renovate-action
69eeb8369f Merge pull request 'Update dependency happy-dom to v15.8.5 (forgejo)' (#5813) from renovate/forgejo-happy-dom-15.x into forgejo 2024-11-05 07:53:08 +00:00
Renovate Bot
557612c4c1 Update linters to v8.13.0 2024-11-05 06:03:59 +00:00
Renovate Bot
8838f010b9 Update dependency happy-dom to v15.9.0 2024-11-05 06:03:49 +00:00
Renovate Bot
0f394fd9e4 Update dependency globals to v15.12.0 (forgejo) (#5814)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5814
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-05 05:56:49 +00:00
Earl Warren
407396cde0 Merge pull request 'Add label to Forgejo Actions PR labeled/unlabeled events and update the commit status' (#5778) from earl-warren/forgejo:wip-label-status into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5778
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-04 14:09:23 +00:00
Earl Warren
f56fc51c74
chore(release-notes): related pull requests workflow fixes 2024-11-04 12:10:15 +01:00
Otto
1418ac176d Merge pull request '[PORT] Fix git error handling (gitea#32401)' (#5794) from gusted/forgejo-port-32401 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5794
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-04 10:40:07 +00:00
Earl Warren
66c85b7d8b
fix: Actions PR workflows must update the commit status
When a workflow has

on:
  pull_request:
    types:
      - labeled
      - unlabeled

The outcome of the workflow (success or failure) must be associated
with the head sha commit status. Otherwise it cannot be used as a
requirement for merging the pull request (branch protections).
2024-11-04 11:27:14 +01:00
Earl Warren
58e3c1fbdb
fix: add label to issues and PR labeled/unlabeled events
When a workflow has

on:
  pull_request:
    types:
      - labeled
      - unlabeled

The payload misses the label field describing the added or removed
label.

The unlabeled event type was also incorrectly mapped to the labeled
event type.
2024-11-04 10:41:11 +01:00
Gusted
14fe3c36bf Merge pull request '[PORT] Fix a number of typescript issues (gitea#32308)' (#5791) from gusted/forgejo-port-32308 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5791
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-04 08:44:57 +00:00
silverwind
3bdca4615c
[PORT] Fix a number of typescript issues (gitea#32308)
- Prefer
[window.location.assign](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign)
over assigning to
[window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location)
which typescript does not like. This works in all browsers including
PaleMoon.
- Fix all typescript issues in `web_src/js/webcomponents`, no behaviour
changes.
- ~~Workaround bug in `@typescript-eslint/no-unnecessary-type-assertion`
rule.~~
- Omit vendored file from type checks.
- `tsc` error count is reduce by 53 with these changes.

---
Conflict resolution: Choose our version.
Done differently: Everything related to typescript types isn't ported.
Use `window.location.href` instead of `String(window.location)`, thanks
@viceice!

(cherry picked from commit 810782302652d73c4f7249c4c3df8a7e85bae5f0)
2024-11-04 09:15:06 +01:00
forgejo-renovate-action
a32d6bf768 Merge pull request 'Update linters (forgejo)' (#5774) from renovate/forgejo-linters into forgejo 2024-11-04 07:00:49 +00:00
forgejo-renovate-action
9dfd73fcc5 Merge pull request 'Update dependency happy-dom to v15.8.3 (forgejo)' (#5803) from renovate/forgejo-happy-dom-15.x into forgejo 2024-11-04 07:00:08 +00:00
Renovate Bot
2266e14f38 Update linters 2024-11-04 06:04:10 +00:00
Renovate Bot
fbfb804b29 Update dependency happy-dom to v15.8.3 2024-11-04 06:03:59 +00:00
Renovate Bot
6e1c0e4cb0 Lock file maintenance (forgejo) (#5804)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5804
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-04 05:54:02 +00:00
Renovate Bot
fb1b3e2c6d Update renovate to v38.142.5 (forgejo) (#5802)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5802
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-04 05:52:26 +00:00
Earl Warren
cea08caea3 Merge pull request 'fix: support www.github.com for migrations' (#5795) from viceice/fix/github-migration into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5795
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-03 17:27:35 +00:00
wxiaoguang
fddde93759
[PORT] Replace DateTime with proper functions (gitea#32402)
Follow https://github.com/go-gitea/gitea/pull/32383

This PR cleans up the "Deadline" usages in templates, make them call
`ParseLegacy` first to get a `Time` struct then display by `DateUtils`.

Now it should be pretty clear how "deadline string" works, it makes it
possible to do further refactoring and correcting.

(cherry picked from commit 259811617ba15c77ddd89360178a59251d611af2)
2024-11-03 17:03:14 +01:00
wxiaoguang
498b5f9867
[PORT] Refactor the DB migration system slightly (gitea#32344)
Introduce "idNumber" for each migration, and clarify the difference
between the migration ID number and database version.

---
Conflict resolution: trivial

(cherry picked from commit d70af38447a759d4a935e315e18efa4dd625f655)
2024-11-03 17:00:48 +01:00
wxiaoguang
171de4d107
[PORT] Fix git error handling (gitea#32401)
---
Conflict resolution: Trivial, for `repo_attributes.go` move where the
`IsErrCanceledOrKilled` needs to happen because of other changes that
happened in this file.

To add some words to this change: It seems to be mostly simplifying the
error handling of git operations.

(cherry picked from commit e524f63d58900557d7d57fc3bcd19d9facc8b8ee)
2024-11-03 16:47:44 +01:00
wxiaoguang
f2eabf6308
[PORT] Replace DateTime with DateUtils (gitea#32383)
(cherry picked from commit fec6b3d50072e48bb51c18c5c4ea682dc6319573)
2024-11-03 16:37:01 +01:00
Michael Kriese
284ffe4e00
fix: support www.github.com for migrations 2024-11-03 16:08:58 +01:00
wxiaoguang
9b442172fb
[PORT] Fix toAbsoluteLocaleDate and add more tests (gitea#32387)
---
Conflict resolution: None
Done differently: Removed typescript types.

(cherry picked from commit aee9801d468997ab3cce32978416b697d9df77a7)
2024-11-03 15:55:05 +01:00
wxiaoguang
bdd75c4b55
[PORT] Fix absolute-date (gitea#32375)
---
Conflict resolution: Trivial (package.json package-lock.json)
Done differently: Removed typescript types.

(cherry picked from commit ce4d909bd693fe903761eb835f7661e476a937ca)
2024-11-03 15:55:02 +01:00
Gusted
20c0a2a381 Merge pull request 'chore(cleanup): remove unused TestCreateFile' (#5788) from earl-warren/forgejo:wip-create-file-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5788
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-03 13:29:04 +00:00
forgejo-renovate-action
019f3b038a Merge pull request 'Update dependency eslint-plugin-array-func to v5 (forgejo)' (#5784) from renovate/forgejo-eslint-plugin-array-func-5.x into forgejo 2024-11-03 11:38:50 +00:00
Renovate Bot
60f8a12877 Update dependency eslint-plugin-array-func to v5 2024-11-03 10:03:24 +00:00
Earl Warren
c5c1d593ad
chore(cleanup): remove unused TestCreateFile
Since CreateDeclarativeRepoWithOptions it is more convenient to create
a file by providing arguments.
2024-11-03 10:00:58 +01:00
Earl Warren
ca3ff29068 Merge pull request 'Update module github.com/gorilla/sessions to v1.4.0 (forgejo)' (#5783) from renovate/forgejo-github.com-gorilla-sessions-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5783
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-03 08:35:13 +00:00
Earl Warren
792c85cf9b Merge pull request 'Update actions/git-backporting action to v4.8.4 (forgejo)' (#5782) from renovate/forgejo-actions-git-backporting-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5782
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-03 08:08:21 +00:00
Earl Warren
a04dfb041e
chore(license): Update module github.com/gorilla/sessions to v1.4.0 2024-11-03 09:00:22 +01:00
Renovate Bot
2f8d502541 Update module github.com/gorilla/sessions to v1.4.0 2024-11-03 00:04:40 +00:00
Renovate Bot
c56c49adeb Update actions/git-backporting action to v4.8.4 2024-11-03 00:03:53 +00:00
Gusted
d5426b0626 Merge pull request 'feat: Add Search to Releases Page' (#5777) from JakobDev/forgejo:releasesearch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5777
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-11-02 22:33:30 +00:00
Gusted
a729384dfd Merge pull request 'Update module github.com/yuin/goldmark to v1.7.8 (forgejo)' (#5780) from renovate/forgejo-github.com-yuin-goldmark-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5780
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-02 16:48:05 +00:00
Gusted
e2fddcf681
chore: fix deprecation 2024-11-02 16:39:27 +01:00
Renovate Bot
370dbbc579 Update module github.com/yuin/goldmark to v1.7.8 2024-11-02 14:04:01 +00:00
Gusted
55ee92d162 Merge pull request 'feat: support color dots for 4 character hex.' (#5779) from gusted/forgejo-4-character-hex into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5779
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-11-02 13:08:53 +00:00
Gusted
3d0dc2e81a
feat: support color dots for 4 character hex.
- Support color dot for 4-letter hex (`#fffa` which is equal to `#ffffffaa`).
- Unit test added.
2024-11-02 13:37:14 +01:00
Gusted
3f1f19865d Merge pull request 'Update module github.com/fsnotify/fsnotify to v1.8.0 (forgejo)' (#5775) from renovate/forgejo-github.com-fsnotify-fsnotify-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5775
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-02 11:41:37 +00:00
0ko
add6bc1ec8 i18n(en): improvements to some strings (#5767)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5767
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-11-02 11:06:35 +00:00
JakobDev
86546fe63e
feat: Add Search to Releases Page 2024-11-02 10:24:35 +01:00
Renovate Bot
bd58136c5d Update module github.com/meilisearch/meilisearch-go to v0.29.0 (forgejo) (#5738)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5738
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-11-02 07:32:05 +00:00
forgejo-renovate-action
bedecfb4c8 Merge pull request 'Update dependency djlint to v1.35.4 (forgejo)' (#5772) from renovate/forgejo-djlint-1.x into forgejo 2024-11-02 07:30:59 +00:00
forgejo-renovate-action
e7c3e53309 Merge pull request 'Update dependency happy-dom to v15.8.0 (forgejo)' (#5773) from renovate/forgejo-happy-dom-15.x into forgejo 2024-11-02 07:28:07 +00:00
Renovate Bot
71b3081e4d Update module github.com/fsnotify/fsnotify to v1.8.0 2024-11-02 02:04:39 +00:00
Renovate Bot
9c76cac02a Update dependency happy-dom to v15.8.0 2024-11-02 00:03:45 +00:00
Renovate Bot
847d219e8a Update dependency djlint to v1.35.4 2024-11-02 00:03:16 +00:00
Earl Warren
1bb0e4fbd1 Merge pull request 'tests: improve actvititypub integration test code' (#5771) from gusted/forgejo-activity-integration-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5771
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-01 22:29:47 +00:00
Gusted
4c67023c7e
tests: improve actvititypub integration test code
- Make use of `test.MockVariableValue` to override variables for the
duration of the test.
- Don't needlessly call `onGiteaRun`, its only needed when a HTTP server
needs to be called by the code.
- When `onGiteaRun` is used, make use of the passed parameters, such as
the passed `*testing.T` variable and `*url.URL` (this also avoids
needing to serve the routers in the test code again).
- Use `(*url.URL).JoinPath` to craft new URLs.
- Don't override `setting.AppURL` & `setting.Database.LogSQL` when its
does not affect the test.
- Add empty fixture files for `FederatedUser` & `FederationHost` so they
are truncated and do not persist between tests.
2024-11-01 22:39:49 +01:00
Gusted
66f67e17bb Merge pull request 'Update dependency mini-css-extract-plugin to v2.9.2 (forgejo)' (#5763) from renovate/forgejo-mini-css-extract-plugin-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5763
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-01 20:10:42 +00:00
Gusted
7768769dc0 Merge pull request 'Update dependency webpack to v5.96.1 (forgejo)' (#5764) from renovate/forgejo-webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5764
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-11-01 20:10:19 +00:00
Renovate Bot
f96b304779 Update dependency webpack to v5.96.1 2024-11-01 16:37:41 +00:00
JakobDev
4615891b9d feat: add button to create Markdown table (#5589)
This adds a new button to the Markdown toolbar, which allows creating the structure of a Markdown table. This makes it easier to wok with tables, as creating the structure by hand is annoying.

Screenshots:
https://codeberg.org/attachments/8bb00059-caa7-4453-b26c-15e4b7b93c83
https://codeberg.org/attachments/581e695c-33eb-4b81-9c63-a944aab443d9

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5589
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-committed-by: JakobDev <jakobdev@gmx.de>
2024-11-01 16:05:48 +00:00
Earl Warren
e5e2860221 Merge pull request 'chore(ci): more debug output for merge requirements' (#5769) from fnetx/pr-requirements into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5769
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-01 14:06:08 +00:00
Otto Richter
2f7f3834b6 Revert "chore(ci): Enforce test label with CI check"
This reverts commit 5da7f07fbe.

The status check patterns are not updated correctly, so this change adds
mainly confusion and little value.

See https://codeberg.org/forgejo/forgejo/pulls/5769
2024-11-01 14:36:37 +01:00
Michael Kriese
d81758d517 Merge pull request 'chore(renovate): explicit base branches' (#5768) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5768
2024-11-01 13:04:38 +00:00
Michael Kriese
2322fdd7cd
chore(renovate): explicit base branches
So we can easier skip versions and renovate requires less runtime.
2024-11-01 13:00:55 +01:00
Earl Warren
c2452e17ca Merge pull request 'Update infrastructure/next-digest action to v1.1.0 (forgejo)' (#5766) from renovate/forgejo-infrastructure-next-digest-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5766
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-01 11:21:35 +00:00
Renovate Bot
ab936de02d Update infrastructure/next-digest action to v1.1.0 2024-11-01 10:40:13 +00:00
forgejo-renovate-action
dbcd1eb426 Merge pull request 'Update linters (forgejo)' (#5705) from renovate/forgejo-linters into forgejo 2024-11-01 10:29:03 +00:00
Michael Kriese
cdefcdb8fb
chore: downgrade stylelint
the newer version has blocking issues
2024-11-01 10:55:36 +01:00
Renovate Bot
41d949c73b Update linters 2024-11-01 08:19:28 +00:00
Earl Warren
d49cc052aa Merge pull request 'Update module code.forgejo.org/forgejo/act to v1.21.5 (forgejo)' (#5762) from renovate/forgejo-code.forgejo.org-forgejo-act-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5762
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-11-01 06:25:00 +00:00
Renovate Bot
216c0279be Update dependency mini-css-extract-plugin to v2.9.2 2024-11-01 02:03:40 +00:00
Renovate Bot
4764e17580 Update module code.forgejo.org/forgejo/act to v1.21.5 2024-11-01 00:03:59 +00:00
Otto
0e3d1e2d49 Merge pull request 'chore(ci): Enforce test label with CI check' (#5756) from fnetx/pr-requirements into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5756
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-31 20:27:36 +00:00
Earl Warren
1ff8e1d409 Merge pull request 'fix: git-grep for code search when git version is below 2.38' (#5746) from snematoda/git-grep-checkver-2 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5746
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-31 15:56:48 +00:00
Otto Richter
5da7f07fbe chore(ci): Enforce test label with CI check
- test label needs to be set and either present, not-needed or manual
- if manual test label is set, PR description needs to contain a heading
  (defined by '#') starting with "Test" (e.g. "Test instructions",
"Testing" etc)
2024-10-31 16:39:53 +01:00
Shiny Nematoda
f2ab4ff83a fix(grep): fix git-grep for code search when git version is below 2.38 2024-10-31 15:24:53 +00:00
Earl Warren
9152c1d037 Merge pull request 'chore(ci): use rootless for the container images sent to k8s' (#5755) from earl-warren/forgejo:wip-next-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5755
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-31 12:32:02 +00:00
Earl Warren
b087cdc002
chore(ci): use rootless for the container images sent to k8s
The input to the action is not image_suffix but tag_suffix. It finds
an image and does not error. But it is the root image and the k8s
cluster needs the rootless image.
2024-10-31 12:24:40 +01:00
Earl Warren
adcc8d2f8d Merge pull request 'Update dependency mermaid to v11.4.0 (forgejo)' (#5751) from renovate/forgejo-mermaid-11.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5751
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-31 06:45:31 +00:00
Earl Warren
745b1e778e Merge pull request 'feat: add branch deletion for scheduled PRs' (#5689) from Tom3201/forgejo:tn-fix-branch-deletion into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5689
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-31 06:41:50 +00:00
Earl Warren
2d13cd4a47
chore(release-notes): Update dependency mermaid to v11.4.0 2024-10-31 07:15:14 +01:00
Tom Neuber
fc06763371
tests/integration: add integration tests for automerge pull requests 2024-10-31 03:49:15 +01:00
Tom Neuber
68d5cf0e92
Add branch auto deletion for scheduled PRs 2024-10-31 03:49:15 +01:00
Tom Neuber
3f01fb31d9
create "shared" package to workaround import loop issues 2024-10-31 03:49:14 +01:00
Otto
30838da15e Merge pull request 'fix: reset history.scrollRestoration if set to manual and no issue anchor in url' (#5684) from viceice/fix/ui/scroll-restoration into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5684
Reviewed-by: Otto <otto@codeberg.org>
2024-10-31 02:35:15 +00:00
Otto
698b1c07c4 Merge pull request 'fix: regression from #4125' (#5560) from JakobDev/forgejo:linkfix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5560
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-31 02:30:38 +00:00
forgejo-renovate-action
f2b4d90aee Merge pull request 'Update dependency djlint to v1.35.3 (forgejo)' (#5750) from renovate/forgejo-djlint-1.x into forgejo 2024-10-31 02:05:51 +00:00
Otto
099efe2bdd Merge pull request 'Add typescript support' (#5690) from anbraten/forgejo:ts into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5690
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-31 02:02:44 +00:00
Renovate Bot
78a7596454 Update dependency mermaid to v11.4.0 2024-10-31 00:04:49 +00:00
Renovate Bot
e467fe36dc Update dependency djlint to v1.35.3 2024-10-31 00:04:20 +00:00
Earl Warren
f3ecc81a1b Merge pull request 'chore(ci): notify the k8s cluster about experimental releases' (#5747) from earl-warren/forgejo:wip-release-next-sync into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5747
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-30 20:16:47 +00:00
Earl Warren
dab156b452
chore(ci): notify the k8s cluster about experimental releases
This is in preparation of the migration of the v*.next.forgejo.org
instances currently managed at https://code.forgejo.org/infrastructure/k8s

The key difference is that the former system relies on ad-hoc scripts
and creates one k8s cluster for each instance, sharing nothing between
them.

The newer k8s cluster is used for all and requires significantly less
ad-hoc tooling.

See also:

* https://code.forgejo.org/infrastructure/next-digest
* https://code.forgejo.org/infrastructure/k8s-cluster/src/branch/main/k8s.md#updating-v-next-forgejo-org
2024-10-30 19:44:55 +01:00
Gusted
dfe3ffc581 feat: harden localization against malicious HTML (#5703)
- Add a new script that proccess the localization files and verify that
they only contain HTML according to our strictly defined rules.
- This should make adding malicious HTML near-impossible.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5703
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2024-10-30 15:59:48 +00:00
Codeberg Translate
031451e740 i18n: update of translations from Codeberg Translate (#5681)
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: artnay <artnay@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: Bálint Gonda <balinteus@gmail.com>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5681
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-30 15:09:27 +00:00
Anbraten
8dc72589ca
Add typescript 2024-10-29 18:15:09 +01:00
forgejo-renovate-action
afbfe5d850 Merge pull request 'Update vitest monorepo to v2.1.4 (forgejo)' (#5737) from renovate/forgejo-vitest-monorepo into forgejo 2024-10-29 10:36:29 +00:00
Renovate Bot
76ed17453e Update vitest monorepo to v2.1.4 2024-10-29 10:03:46 +00:00
Earl Warren
485db0a3ba Merge pull request '[gitea] week 2024-44 cherry pick (gitea/main -> forgejo)' (#5714) from algernon/wcp/2024-44 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5714
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-29 09:05:27 +00:00
0ko
9d687f1069 feat(ui): link back to one-time code page from scratch code page (#5712)
Preview:
https://codeberg.org/attachments/b60c5d7c-103b-4227-9b0d-3d765dba2431

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5712
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-29 05:31:49 +00:00
JakobDev
75ce0bf06b
Fix test 2024-10-28 17:37:24 +01:00
Earl Warren
457be48362 Merge pull request 'docs: add links to the v7.0.10 & v9.0.1 release notes' (#5729) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5729
Reviewed-by: Otto <otto@codeberg.org>
2024-10-28 09:22:43 +00:00
Earl Warren
e8e0fe1fea
docs: add links to the v7.0.10 & v9.0.1 release notes 2024-10-28 09:08:48 +01:00
forgejo-renovate-action
2886a661ac Merge pull request 'Update renovate to v38.132.3 (forgejo)' (#5716) from renovate/forgejo-renovate into forgejo 2024-10-28 08:01:23 +00:00
Earl Warren
266c08f9af Merge pull request 'Lock file maintenance (forgejo)' (#5717) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5717
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-28 07:22:17 +00:00
Renovate Bot
f9a16f8be0 Update renovate to v38.133.0 2024-10-28 06:26:24 +00:00
Earl Warren
e08664c56e Merge pull request 'use constant time check for internal token' (#5719) from earl-warren/forgejo:wip-timing into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5719
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-10-28 06:14:36 +00:00
Gusted
53231bad61
fix(sec): use constant time check for internal token 2024-10-28 06:25:52 +01:00
Earl Warren
520584bccb Merge pull request 'add permission check to 'delete branch after merge'' (#5718) from earl-warren/forgejo:wip-delete-branch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5718
2024-10-28 05:24:13 +00:00
Gusted
266e0b2ce9
security: add permission check to 'delete branch after merge'
- Add a permission check that the doer has write permissions to the head
repository if the the 'delete branch after merge' is enabled when
merging a pull request.
- Unify the checks in the web and API router to `DeleteBranchAfterMerge`.
- Added integration tests.
2024-10-28 05:48:10 +01:00
Renovate Bot
492c667a6f Lock file maintenance 2024-10-28 00:06:32 +00:00
Gergely Nagy
83e4139d41
chore(release-notes): notes for the week 2024-44 weekly cherry pick 2024-10-27 11:27:40 +01:00
Lunny Xiao
480d565944
Fix disable 2fa bug (#32320)
(cherry picked from commit 2abdbe88b5d16dcb345d27b73f1d9738f2d826dd)
2024-10-27 11:27:40 +01:00
Lunny Xiao
261c0a95b4
Add warn log when deleting inactive users (#32318)
Add log for the problem #31480

(cherry picked from commit a264c46fb04112c5ec2c1b2acd523a2e4450da40)

Conflicts:
	- services/user/user.go
	  Resolved by manually adding the log line.
2024-10-27 11:27:40 +01:00
Zettat123
8c79008d6f
Add DISABLE_ORGANIZATIONS_PAGE and DISABLE_CODE_PAGE settings for explore pages and fix an issue related to user search (#32288)
These settings can allow users to only display the repositories explore page.

Thanks to yp05327 and wxiaoguang !

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 9206fbb55fd28f21720072fce6a36cc22277934c)

Conflicts:
	 - templates/explore/navbar.tmpl
	   Resolved by manually applying the last hunk to our template.
2024-10-27 11:27:40 +01:00
0ko
00379db370 i18n: fix placeholders in string for refusing to review (#5713)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5713
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-27 09:39:18 +00:00
wangjingcun
c9cb470034
chore: fix some function names in comment (#32300)
fix some function names in comment

(cherry picked from commit 3d6ccbac3f20c485ab95a29d280c9371e558bfac)
2024-10-27 10:35:48 +01:00
Earl Warren
0e0a153adb Merge pull request 'feat: combine review requests comments' (#5695) from gusted/forgejo-combine-request-review into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5695
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-27 04:49:23 +00:00
Otto
4a41c71d9b Merge pull request 'fix: use buffered iterate for debian searchpackages' (#5702) from gusted/forgejo-buffered-iterate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5702
Reviewed-by: Otto <otto@codeberg.org>
2024-10-27 00:09:16 +00:00
Gusted
2c2ac80030 feat: Add partial quoting
- If you select a portion of the comment, `Quote reply` will not only
quote that portion and not copy paste the whole text as it previously
did. This is achieved by using the `@github/quote-selection` package.
- There's preprocessing to ensure Forgejo-flavored markdown syntax is
preserved.
- e2e test added.
- Resolves #1342
2024-10-26 19:15:43 +02:00
Earl Warren
2bdd7cb080 Merge pull request 'Fix boolean inputs in workflow_dispatch' (#5439) from Mai-Lapyst/forgejo:workflow_dispatch-fix-boolean-inputs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5439
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-26 05:59:50 +00:00
forgejo-renovate-action
f70a542a37 Merge pull request 'Update dependency @playwright/test to v1.48.2 (forgejo)' (#5704) from renovate/forgejo-playwright-monorepo into forgejo 2024-10-26 00:36:09 +00:00
Renovate Bot
9d2a427622 Update dependency @playwright/test to v1.48.2 2024-10-26 00:03:11 +00:00
Gusted
8fdc0a7a6c feat: combine review requests comments
- Combine review requests comments similairy how labels comments are
combined. If review requests comments were made within 60 seconds of
each other they will be grouped.
- Integration and unit test added.
- Resolves #2774
2024-10-25 22:57:32 +02:00
Gusted
459ab11a8a fix: use buffered iterate for debian searchpackages
- The driver being used for PostgreSQL doesn't handle interleaved
queries (you start a query, read some rows and start another query while
you didn't finish that query yet), this is the case with using
`.Iterate` from XORM.
- Switch to a variant of what exist in the current codebase of
`db.Iterate`, which is a simple buffered iteration and doesn't keep
queries open, which allow other database operations to happen.
- Unit test added. This doesn't cover that postgres does not error on
this case, as this is not run with a postgres database.
- Resolves #5696
2024-10-25 19:33:19 +02:00
Otto
00cc563388 Merge pull request 'Do not change stroke size in the loading animation' (#5506) from kytta/forgejo:forgejo-loading-stroke into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5506
Reviewed-by: Otto <otto@codeberg.org>
2024-10-25 17:24:16 +00:00
0ko
37dca47ab2 chore(release-notes-assistant): update internationalization label (#5698)
There was an attempt to rename this label to a shorter one, but release-notes-assistant.sh relies on the old name.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5698
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-25 14:36:22 +00:00
Gusted
5af8a55f6a Merge pull request 'tests(e2e): skip browser downloads' (#5692) from fnetx/playwright-nodownload into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5692
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-25 03:30:48 +00:00
Otto
8b7410f35c Merge pull request 'chore: output playwright directly to std{out,err}' (#5685) from gusted/forgejo-improve-e2e-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5685
Reviewed-by: Otto <otto@codeberg.org>
2024-10-24 20:44:19 +00:00
Otto Richter
511b213db2 tests(e2e): skip browser downloads
The browser versions are updated weekly in the cache, see https://code.forgejo.org/forgejo/playwright-image-builder
When they change between the runs, they are refreshed for each CI run (see https://codeberg.org/forgejo/forgejo/actions/runs/35651/jobs/3#jobstep-7-19 for an example).

Updating the browsers weekly is good enough, so skip the explicit update check here.
Related playwright documentation: https://playwright.dev/docs/library#browser-downloads
2024-10-24 22:42:21 +02:00
Earl Warren
b30203bc48 Merge pull request 'fix: make branch protection work for new branches' (#5688) from gusted/forgejo-branch-protection-new-branch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5688
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-24 20:20:49 +00:00
Gusted
f5e025917f fix: make branch protection work for new branches
- If `GetAffectedFiles` is called for a push with an empty oldCommitID,
then set the oldCommitID to the empty tree. This will effictively diff
all the changes included in the push, which is the expected behavior for
branches.
- Integration test added.
- Resolves #5683
- Port of gitea#31778 but implemented differently.
2024-10-24 18:44:58 +02:00
Michael Kriese
ec4a0e1b6e
fix: reset history.scrollRestoration if set to manual and no issue anchor in url 2024-10-24 15:25:51 +02:00
Gusted
78d243c304 chore: output playwright directly to std{out,err}
Instead of letting playwright do the full test suite and then print the
output and error, direct the output to std{our,err} for a faster
developing loop. This also makes the output colored.
2024-10-24 15:06:19 +02:00
Gusted
aa86e94853 Merge pull request 'Update dependency postcss-nesting to v13.0.1 (forgejo)' (#5678) from renovate/forgejo-postcss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5678
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-24 12:53:47 +00:00
Codeberg Translate
f72567ee14 i18n: update of translations from Codeberg Translate (#5583)
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: eldyj <eldyj@users.noreply.translate.codeberg.org>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: tkbremnes <tkbremnes@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
Co-authored-by: div72 <div72@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: kmpm <kmpm@users.noreply.translate.codeberg.org>
Co-authored-by: Fnurkla <Fnurkla@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: buhtz <buhtz@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
Co-authored-by: artnay <artnay@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5583
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-24 04:37:43 +00:00
Renovate Bot
840e68c187 Update dependency postcss-nesting to v13.0.1 2024-10-24 00:02:48 +00:00
forgejo-renovate-action
0f99a0e3c0 Merge pull request 'Update dependency eslint-plugin-playwright to v2 (forgejo)' (#5669) from renovate/forgejo-eslint-plugin-playwright-2.x into forgejo 2024-10-23 15:01:37 +00:00
Michael Kriese
412d16f236 Merge pull request 'chore: remove eslint v9 restriction in renovate' (#5668) from gusted/forgejo-eslint-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5668
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-23 14:45:02 +00:00
Gusted
94e4f8648b chore: add extra playwright rules 2024-10-23 16:22:25 +02:00
Renovate Bot
cdbbdacb7d Update dependency eslint-plugin-playwright to v2 2024-10-23 14:05:20 +00:00
Gusted
18a959dc8c chore: remove eslint v9 restriction in renovate
This restriction can be removed with 7ad83fce40
2024-10-23 16:02:27 +02:00
Gusted
7a29ab4d20 Merge pull request 'chore: move to Eslint flat config' (#5662) from gusted/forgejo-flat-config into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5662
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-23 14:00:28 +00:00
Gusted
ee75b784d1 Merge pull request 'Update module github.com/jhillyerd/enmime to v2 (forgejo)' (#5665) from renovate/forgejo-github.com-jhillyerd-enmime-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5665
2024-10-23 13:40:04 +00:00
Gusted
3a4bc7cdd1 Merge pull request 'feat: use combo markdown editor for milestone description' (#5657) from gusted/forgejo-milestone-comboeditor into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5657
Reviewed-by: Otto <otto@codeberg.org>
2024-10-23 13:38:35 +00:00
Gusted
7ad83fce40 chore: move to Eslint flat config
Make the big move to Eslint flat config format. The outcome of Eslint
still should be the same, but some things has changed:
- `eslint-plugin-github` is dropped, flat configs have been out for a
while and most eslint plugins support it, but for no reason and no
activity in sight this plugin is likely not going to support flat config
for a while and to avoid other plugins not being able to update (as they
are requiring flat configs) drop the github rules.
- Nested configs don't work properly and are unified into the root
eslint config, this unification did cause some conflicts and thats why
the `import-x` is in a seperate 'group' to exclude targeting Vue files.
- The `eslint-plugin-i` is deprecated and `esplint-plugin-import-x` is
its succesor which has better support for flat configs, the same rules
are still applied.

The majority of the flat config was generated by
`@eslint/migrate-config` tool.
2024-10-23 15:28:43 +02:00
Gusted
e3eaae4b56 chore: update license path 2024-10-23 15:09:12 +02:00
forgejo-renovate-action
e4de08b258 Merge pull request 'Update dependency eslint-plugin-unicorn to v56 (forgejo)' (#5663) from renovate/forgejo-eslint-plugin-unicorn-56.x into forgejo 2024-10-23 07:29:18 +00:00
Gusted
20a233e770 Merge pull request 'Update dependency postcss-nesting to v13 (forgejo)' (#5664) from renovate/forgejo-postcss-nesting-13.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5664
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-23 06:48:29 +00:00
Gusted
f63f02045e
chore: add new lint rules 2024-10-23 08:10:18 +02:00
Renovate Bot
b597725fa0 Update module github.com/jhillyerd/enmime to v2 2024-10-23 06:04:11 +00:00
Renovate Bot
b4253ec7e7 Update dependency postcss-nesting to v13 2024-10-23 06:03:35 +00:00
Renovate Bot
1ec3e638a5 Update dependency eslint-plugin-unicorn to v56 2024-10-23 06:03:20 +00:00
Gusted
4c6587d6a0 feat: use combo markdown editor for milestone description
- Use the combo markdown editor for the milestone description. The
milestone description is rendered in markdown, so it makes sense to use
a 'markdown-aware' editor. This also includes the option to use
monospace font.
- Resolves #5649
2024-10-22 19:58:44 +02:00
Earl Warren
ac5736005b Merge pull request 'Update module github.com/prometheus/client_golang to v1.20.5 (forgejo)' (#5240) from renovate/forgejo-github.com-prometheus-client_golang-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5240
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-22 17:38:33 +00:00
Earl Warren
c1a08156f8 Merge pull request '[gitea] week 2024-43 cherry pick (gitea/main -> forgejo)' (#5621) from algernon/wcp/2024-43 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5621
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-22 17:37:03 +00:00
Earl Warren
334975c445 Merge pull request 'link to security policy in security.txt' (#5651) from fnetx/securitytxt into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5651
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-22 16:50:19 +00:00
Earl Warren
fac25238d4 Merge pull request 'fix: don't show truncated comments in RSS/Atom feeds' (#5653) from gusted/forgejo-truncated-comment-rss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5653
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-22 16:48:52 +00:00
Gergely Nagy
93dccfffe1
chore(release-notes): notes for week 2024-43 weekly cherry pick
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-10-22 18:14:27 +02:00
Gusted
6f1c1cdb04 Merge pull request 'fix: typo on releases for source code downloads' (#5652) from viceice/fix/typo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5652
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-22 14:02:49 +00:00
Michael Kriese
02f8fad54d
fix: typo on releases for source code downloads
Closes #5648
2024-10-22 15:18:31 +02:00
Gusted
f4a7132a89 fix: don't show truncated comments in RSS/Atom feeds
- When a truncated comment is detected in the RSS/Atom feeds, fetch the
comment from the database and use the original content.
- Added integration test.
- Resolves #5650
2024-10-22 15:15:09 +02:00
Otto Richter
d06f1c6856 link to security policy in security.txt 2024-10-22 14:28:17 +02:00
Gusted
2626f4ee3b Merge pull request 'conf: Improve delete_old_actions description' (#5644) from xenrox/forgejo:conf-improvement into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5644
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-22 11:05:38 +00:00
Earl Warren
aa4d098844
chore(license): Update module github.com/prometheus/client_golang to v1.20.5 (forgejo) 2024-10-22 07:48:36 +02:00
Earl Warren
884b21efd5 Merge pull request 'chore(release-notes): no need to specify they are draft' (#5646) from earl-warren/forgejo:wip-rna into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5646
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-22 05:44:12 +00:00
Earl Warren
f586944db3
chore(release-notes): no need to specify they are draft
Since they are written to the milestone that is still open, there is
no risk of confusing them with final release notes. Such a distinction
is more relevant when in the context of a release notes file committed
to the repository.
2024-10-22 06:54:27 +02:00
Gusted
e45c304b31 Merge pull request 'Revert "add gap between branch dropdown and PR button"' (#5640) from fnetx/dropdown-glitch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5640
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
2024-10-21 20:43:54 +00:00
Thorben Günther
c2f7aca9da
conf: Improve delete_old_actions description
This matches the text in the web interface.

The old description can be easily mistaken for handling "Forgejo Actions".
2024-10-21 22:31:50 +02:00
Gusted
6c0698c7de Merge pull request 'fix: make syncronize tags to database handle annoted tags' (#5641) from gusted/forgejo-sync-tags into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5641
Reviewed-by: Otto <otto@codeberg.org>
2024-10-21 18:45:21 +00:00
0ko
3e1d5cc447 feat(ui): better activity messages for cases of private profiles (#5638)
* added a message for the case where the user's profile is private but the Public activity is not hidden
The activity is still hidden anyway because the profile is private, but previously the message would say:
`Your activity is visible to everyone, except for interactions in private spaces...`
which I would consider as a flaw of the original implementation. Now it will say:
`Your activity is only visible to you and the instance administrators because your profile is private...`
* started showing the message for admins that the activity they see should remain private in the case
where the whole profile is private, not just the activity tab. Previously it would say:
This activity is visible to everyone, but as an administrator you can also see interactions in private spaces.`
which I would also consider as a flaw of the original implementation. Now it will say:
`This activity is visible to you because you're an administrator, but the user wants it to remain private.`
* added test cases
* bumped up the number of our GPL-licensed files

Preview
For both screenshots, Forgejo would previously display misinformation.

Change 1: User viewing their private profile, but activity isn't configured as hidden
https://codeberg.org/attachments/6659c80c-15dd-48be-a379-db737fd1dd5e

Change 2: Admin viewing user's private profile
https://codeberg.org/attachments/220da57f-b658-4474-9ad2-049e8438a0af

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5638
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-21 14:39:29 +00:00
Gusted
f298bf125a Merge pull request 'fix: use ValidateEmail as binding across web forms' (#5158) from solomonv/consolidate-email-validation into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5158
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-21 14:31:32 +00:00
Gusted
6da194fae8 fix: make syncronize tags to database handle annoted tags
- When an admin wants syncronize tags in the Git data to the database
via the admin dashboard all annoted tags loses their title. This was
caused because the code didn't correctly handle annoted tags. Annoted
tags have their own objectID to store the annoted message, unlike
'normal' tags which point to the commitID. While the function was being
run for annoted tags, the code thought it found a mismatch in the
objectIDs, because the stored version was actually correct which pointed
to the commitID but the code found the objectID of the annoted tag.
- Make `SyncReleasesWithTags` corectly handle annoted tags.
- Added unit and integration tests.
- Resolves #5628
2024-10-21 16:21:07 +02:00
Otto Richter
04e2e1510d Revert "add gap between branch dropdown and PR button"
This change does not bring the desired benefit, because the button is
reinitialized from a Vue component once loaded, overriding this change
and causing a visual glitch upon page load (the button is moving its
position).

See the comment:

> this code must match the code in BranchTagSelector.vue

This button is also used in other places such as the release list where
the additional margin does not fit well. As such, this needs a new
solution.

This reverts commit 18cad9d342.
2024-10-21 15:21:44 +02:00
Earl Warren
ea70757fc7 Merge pull request 'feat(ci): allow manual triggering of the test suite' (#5637) from earl-warren/forgejo:wip-testing-dispatch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5637
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-10-21 06:51:50 +00:00
Earl Warren
e0ea4e2de4
feat(ci): allow manual triggering of the test suite
When a skip ci label is added to the PR title, removing it won't
trigger the CI. There needs to be a way to manually trigger it.
2024-10-21 08:06:22 +02:00
Earl Warren
9519392809 Merge pull request 'Lock file maintenance (forgejo)' (#5633) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5633
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-21 05:10:58 +00:00
forgejo-renovate-action
da7c28735f Merge pull request 'Update renovate to v38.128.6 (forgejo)' (#5632) from renovate/forgejo-renovate into forgejo 2024-10-21 05:09:46 +00:00
Earl Warren
cbfb87b329 Merge pull request 'package arch database not updating when uploading "any" architecture' (#5634) from dragon/forgejo:bugfix-arch-noarch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5634
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-21 05:09:13 +00:00
dragon
95c7599db5 fix arch pkg 2024-10-21 10:08:57 +08:00
Renovate Bot
5beb1b56df Lock file maintenance 2024-10-21 02:05:21 +00:00
Renovate Bot
13762759fd Update renovate to v38.128.6 2024-10-21 00:03:17 +00:00
Gusted
55c30ba266 Merge pull request 'fix: correct SQL query for active issues' (#5627) from gusted/forgejo-fix-active-issues into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5627
Reviewed-by: Otto <otto@codeberg.org>
2024-10-20 23:30:01 +00:00
Gusted
b5ccb55b58 Merge pull request 'fix(i18n): edit should not be lowercase here' (#5625) from fnetx/tagedit-typo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5625
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-20 23:27:57 +00:00
Otto
69e68897e4 Merge pull request 'fix: Specify default value for EXPLORE_DEFAULT_SORT.' (#5626) from gusted/forgejo-default-sort-value into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5626
Reviewed-by: Otto <otto@codeberg.org>
2024-10-20 23:05:29 +00:00
Gusted
0055fdbdc4
fix: correct SQL query for active issues
- The `OR` should be inside the `AND` condition to not 'bypass' the other
conditions.
- Added minimal unit test.
- Regression from 2675a24649
2024-10-21 00:48:04 +02:00
Gusted
f4be4e733c
fix: Specify default value for EXPLORE_DEFAULT_SORT.
- This is another regression from
5a0bc35799, where the default value was
changed to "alphabetically" because it relied on `ExploreDefaultSort`
providing a fallback value.
- Set the default value for `EXPLORE_DEFAULT_SORT` to `recentupdate`,
this was already the behavior explicitly for existing users of this setting
but with 5a0bc35799 it didn't provide a
explicit fallback to `recentupdate`. So opting for a 'easy' fix, that
doesn't add boilerplate code to those instances.
2024-10-21 00:11:47 +02:00
Otto Richter
1b6ed6dc5b fix(i18n): edit should not be lowercase here
This also propagated to translations and it looks a little odd in the tooltip
2024-10-21 00:11:33 +02:00
Gusted
215700fc83 Merge pull request 'fix: Add recentupdated as recognized sort option' (#5613) from gusted/forgejo-add-recentupdated-case into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5613
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-20 10:57:20 +00:00
6543
f4c2c401ec
API: enhance SearchIssues swagger docs (#32208)
this will result in better api clients generated out of the openapi docs
... for SearchIssues

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit d638067d3cb0a7f69b4d899f65b9be4940bd3e41)
2024-10-20 09:44:18 +02:00
Zettat123
f3f386545e
Always update expiration time when creating an artifact (#32281)
Fix #32256

(cherry picked from commit 9116665e9c1c01d882c919fb3058f7fdb695350e)
2024-10-20 09:43:42 +02:00
cloudchamb3r
c163bf6fb5
Fix null errors on conversation holder (#32258) (#32266)
fix #32258

Errors in the issue was due to unhandled null check. so i fixed it.

### Detailed description for Issue & Fix
To reproduce that issue, the comment must be deleted on Conversation
tab.
#### Before Delete
<img width="1032" alt="image"
src="https://github.com/user-attachments/assets/72df61ba-7db6-44c9-bebc-ca1178dd27f1">

#### After Delete (AS-IS)
<img width="1010" alt="image"
src="https://github.com/user-attachments/assets/36fa537e-4f8e-4535-8d02-e538c50f0dd8">

gitea already have remove logic for `timeline-item-group`, but because
of null ref exception the later logic that removes `timeline-item-group`
could be not be called correctly.

(cherry picked from commit 603fca1e27bc29c1e700cc1bd284eb619d2436c8)
2024-10-20 09:35:34 +02:00
谈笑风生间
c3741d7fb0
Support requested_reviewers data in comment webhook events (#26178)
close #25833

Currently, the information for "requested_reviewers" is only included in
the webhook event for reviews. I would like to suggest adding this
information to the webhook event for "PullRequest comment" as well, as
they both pertain to the "PullRequest" event.

Also, The reviewer information for the Pull Request is not displayed
when it is approved or rejected.

(cherry picked from commit d50ed0abf731a10741831d4b6dd54791e3e567ec)
2024-10-20 09:34:46 +02:00
a1012112796
3aaf6f72d6
make show stats work when only one file changed (#32244)
fix https://github.com/go-gitea/gitea/issues/32226

in https://github.com/go-gitea/gitea/pull/27775 , it do some changes to
only show diff file tree when more than one file changed. But looks it
also break the `diff-file-list` logic, which looks not expected change.
so try fix it.

/cc @silverwind

example view:

![image](https://github.com/user-attachments/assets/281e9c4f-a269-4d36-94eb-a132058aea87)

Signed-off-by: a1012112796 <1012112796@qq.com>
(cherry picked from commit c4b2808b896dd86323c6a0d119c8cf24752d4d8a)
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>

Conflicts:
	- web_src/js/features/repo-diff-filetree.js
	  web_src/js/features/repo-diff.js
	  Conflicts resolved by manually applying the changes.
2024-10-20 09:29:33 +02:00
Zettat123
e8700cee61
Update scheduled tasks even if changes are pushed by "ActionsUser" (#32246)
Fix #32219

---------

Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit 81aec6d621a3ea0dfb02d3b4d20b9be77c30c6ab)
2024-10-20 09:24:58 +02:00
Zettat123
89446e60a6
Support migrating GitHub/GitLab PR draft status (#32242)
Resolve #32196

(cherry picked from commit 74664b08a004393ce013e872e47901f52645b65a)
2024-10-20 09:24:25 +02:00
Otto
dfe9bdd15f Merge pull request 'feat: Create temporary user helper function' (#5617) from gusted/forgejo-temp-user-e2e into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5617
Reviewed-by: Otto <otto@codeberg.org>
2024-10-19 22:05:31 +00:00
Gusted
cd7c015dd3 Merge pull request 'mail issue: Display issue type in email header' (#5389) from xenrox/forgejo:mail-issue into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5389
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-19 21:54:56 +00:00
Gusted
df38c41c7a
fix: Add recentupdated as recognized sort option
- Add `recentupdated` to the `OrderByMap`.
- Add integration testing for organization and user repository sorting.
- Resolves #5612
- Regression from 12e23ee199 where the
`recentupdated` case was not added to the map, but was handled
seperately as a fallback. The regression came into affect when
5a0bc35799 also relied on this map but
didn't handle the `recentupdated` case.
2024-10-19 23:53:29 +02:00
Gusted
b43d9d5ae6 Merge pull request 'fix: Don't double escape delete branch text' (#5615) from gusted/forgejo-avoid-double-escape into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5615
Reviewed-by: Otto <otto@codeberg.org>
2024-10-19 21:21:33 +00:00
Gusted
0b92d6e0ba
feat: Create temporary user helper function
- Add a helper function that creates and log into a temporary user. So
it doesn't affect other users and tests and the test can more easily be
retried with a 'fresh' state instead of a broken state.
- Adjust the Webauthn test to make use of this.
- Relevant: #5291, #5394
2024-10-19 22:58:32 +02:00
Gusted
8c8b31f304
fix: Don't double escape delete branch text
- Don't double escape the 'Delete branch "$BRANCH"' text. `Locale.Tr`
escapes the argument already and Vue does too by default.
- Let Vue escape the text and add a unit test ensuring that it escapes.
- Resolves #5582
2024-10-19 22:05:35 +02:00
Thorben Günther
74403d1f0f
mail issue: Display issue type in email header
Currently notification emails for Pull Requests or Issues are
indistinguishable at first glance. This adds the type ("PR" or "Issue")
before the index number.
2024-10-19 21:25:54 +02:00
Earl Warren
e2354703ed Merge pull request '[gitea] week 2024-42 cherry pick (gitea/main -> forgejo)' (#5543) from earl-warren/wcp/2024-42 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5543
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-19 13:54:24 +00:00
Renovate Bot
453b07706a Update module github.com/prometheus/client_golang to v1.20.5 2024-10-19 12:03:54 +00:00
Gusted
b76d7a2b2d Merge pull request 'Update code.forgejo.org/go-chi/session digest to 2a99226 (forgejo)' (#5608) from renovate/forgejo-code.forgejo.org-go-chi-session-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5608
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-19 11:23:03 +00:00
Renovate Bot
dc5de38db0 Update code.forgejo.org/go-chi/session digest to 2a99226 2024-10-19 00:03:40 +00:00
Earl Warren
182761e407 Merge pull request 'Update module github.com/go-enry/go-enry/v2 to v2.9.1 (forgejo)' (#5601) from renovate/forgejo-github.com-go-enry-go-enry-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5601
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-18 08:40:21 +00:00
Earl Warren
fcd1d3ed66
chore(release-notes): Update module github.com/go-enry/go-enry/v2 to v2.9.1 2024-10-18 10:12:06 +02:00
Renovate Bot
dad18d985a Update module github.com/go-enry/go-enry/v2 to v2.9.1 2024-10-18 00:05:06 +00:00
Earl Warren
d924d241b0 Merge pull request 'Update github.com/google/pprof digest to a352233 (forgejo)' (#5435) from renovate/forgejo-github.com-google-pprof-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5435
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-17 22:33:14 +00:00
Renovate Bot
d01393efd3 Update github.com/google/pprof digest to 017d972 2024-10-17 22:03:13 +00:00
Gusted
11b3db5c80 Merge pull request 'Update dependency @primer/octicons to v19.12.0 (forgejo)' (#5591) from renovate/forgejo-primer-octicons-19.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5591
2024-10-17 20:48:49 +00:00
0ko
19ca039486 feat(ui): set your_repositories as the default filter for org dashboards (#5593)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5593
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-10-17 13:24:41 +00:00
Gusted
67ca1bebc4 Merge pull request 'fix: Add server logging for OAuth server errors' (#5595) from gusted/forgejo-log-oauth-error into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5595
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-17 09:45:23 +00:00
Gusted
e68a9e662a Merge pull request 'Update dependency chart.js to v4.4.5 (forgejo)' (#5576) from renovate/forgejo-chart.js-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5576
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-17 07:17:11 +00:00
Gusted
a857007d65
fix: Add server logging for OAuth server errors
Although an error was presented to the user about that there's an
internal server error, the error itself is never logged.

Relevant: https://codeberg.org/Codeberg/Community/issues/1675
2024-10-17 09:13:48 +02:00
forgejo-renovate-action
fa73b38756 Merge pull request 'Update dependency @playwright/test to v1.48.1 (forgejo)' (#5590) from renovate/forgejo-playwright-monorepo into forgejo 2024-10-17 07:03:16 +00:00
Gusted
663416f097
Update SVGs 2024-10-17 08:47:35 +02:00
Earl Warren
db7a071e5d Merge pull request 'Update dependency @github/text-expander-element to v2.8.0 (forgejo)' (#5522) from renovate/forgejo-github-text-expander-element-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5522
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-17 06:45:11 +00:00
Renovate Bot
a28e077e4d Update dependency @playwright/test to v1.48.1 2024-10-17 06:06:32 +00:00
Earl Warren
b5b7e39981 Merge pull request 'forgejo-cli is now a symlink and cannot be used for sanity checks' (#5592) from earl-warren/forgejo:wip-release-symlink into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5592
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-17 05:59:13 +00:00
Earl Warren
54c8ac3e39
vars.SKIP_END_TO_END optionally skip tests when building a release
The end-to-end tests will always fail when more than one release is
broken. When trying to fix one, the other will get in the way and vice
versa. The only way to get out of this deadlock is to replace all
broken releases but one by doing the following on forgejo-integration:

* set SKIP_END_TO_END to true in the actions vars tab
* pushing a commit to the corresponding branch, fixing the problem
2024-10-17 07:31:22 +02:00
Earl Warren
1a7a9055e4
forgejo-cli is now a symlink and cannot be used for sanity checks
It could be used but then `cp --dereference` would need to be used instead in
the forgejo-build-publish action.

+ docker cp forgejo-amd64:/app/gitea/forgejo-cli forgejo-9.0-test-linux-amd64
+ chmod +x forgejo-9.0-test-linux-amd64
chmod: cannot operate on dangling symlink 'forgejo-9.0-test-linux-amd64'
2024-10-17 06:59:05 +02:00
Renovate Bot
6283a4b187 Update dependency @primer/octicons to v19.12.0 2024-10-17 00:02:56 +00:00
Earl Warren
579233dc75 Merge pull request 'Dockerfile: use alpine:3.20 instead of golang:1.23-alpine3.20' (#5587) from earl-warren/forgejo:wip-docker-runtime into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5587
2024-10-16 20:41:36 +00:00
Earl Warren
a99bb2c61a
Dockerfile: use alpine:3.20 instead of golang:1.23-alpine3.20
Runtime does not need golang.
2024-10-16 22:04:26 +02:00
Earl Warren
17e6bccf93 Merge pull request 'unecessary container image layer duplication' (#5585) from earl-warren/forgejo:wip-docker-forgejo-cli into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5585
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-16 19:44:55 +00:00
Earl Warren
7d779a7859
unecessary container image layer duplication
container images grew by 100MB when

RUN ln /app/gitea/gitea /app/gitea/forgejo-cli

was added because hard links are not preserved.

Use symbolic links instead.

https://tauri.earth/@AliveDevil/113318561067465279
2024-10-16 21:07:22 +02:00
Gusted
67ef2e68a4 Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.16.3 (forgejo)' (#5578) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5578
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-16 15:20:21 +00:00
Earl Warren
cd93d9a0a8 Merge pull request 'docs: add link to the v9.0.0 release notes' (#5391) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5391
Reviewed-by: Otto <otto@codeberg.org>
2024-10-16 03:26:29 +00:00
Codeberg Translate
2f1c33b5e0 i18n: update of translations from Codeberg Translate (#5555)
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5555
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-16 02:49:05 +00:00
Renovate Bot
0c146ddf72 Update module github.com/buildkite/terminal-to-html/v3 to v3.16.3 2024-10-16 02:05:17 +00:00
Renovate Bot
42092ead8b Update dependency chart.js to v4.4.5 2024-10-16 00:03:18 +00:00
Earl Warren
69bedb8933 Merge pull request 'fix: correct documentation for non 200 responses in swagger' (#5491) from JakobDev/forgejo:fixswagger into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5491
Reviewed-by: Otto <otto@codeberg.org>
2024-10-15 11:34:35 +00:00
Otto
2ffe7de372 Merge pull request 'fix: use column flex on mobile to prevent project title from wrapping' (#5536) from mzhang/forgejo:mzhang/fix-project-title-wrapping into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5536
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-15 11:25:54 +00:00
Gusted
42d6e67402 Merge pull request 'Update module github.com/caddyserver/certmagic to v0.21.4 (forgejo)' (#5453) from renovate/forgejo-github.com-caddyserver-certmagic-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5453
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-15 10:16:20 +00:00
forgejo-renovate-action
fff95ef76b Merge pull request 'Update vitest monorepo to v2.1.3 (forgejo)' (#5569) from renovate/forgejo-vitest-monorepo into forgejo 2024-10-15 07:39:20 +00:00
Renovate Bot
10c6ac7779 Update module github.com/redis/go-redis/v9 to v9.6.2 (forgejo) (#5568)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5568
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-10-15 07:07:59 +00:00
Renovate Bot
0605219dcf Update vitest monorepo to v2.1.3 2024-10-15 00:05:48 +00:00
Otto
8b3bd01c2e Merge pull request 'Update dependency go to v1.23.2 (forgejo)' (#5449) from renovate/forgejo-patch-golang-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5449
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-14 23:13:22 +00:00
Gusted
22fb647908 Merge pull request 'Update module github.com/urfave/cli/v2 to v2.27.5 (forgejo)' (#5550) from renovate/forgejo-github.com-urfave-cli-v2-2.27.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5550
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-14 21:03:40 +00:00
forgejo-renovate-action
019213c015 Merge pull request 'Update renovate to v38.120.1 (forgejo)' (#5549) from renovate/forgejo-renovate into forgejo 2024-10-14 21:02:37 +00:00
Otto
90b4504f09 Merge pull request 'Fix typo in English locale file' (#5561) from jutty/forgejo:18n-typo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5561
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-14 21:01:26 +00:00
JakobDev
698d759682
Fix test 2024-10-14 22:23:14 +02:00
Renovate Bot
2fc96073a1 Update module github.com/urfave/cli/v2 to v2.27.5 2024-10-14 20:04:59 +00:00
Renovate Bot
7e805fa665 Update renovate to v38.121.0 2024-10-14 20:04:12 +00:00
Otto
1d13249e17 Merge pull request '[BUG] Don't allow owner team with incorrect unit access' (#5529) from gusted/forgejo-owners-team-description into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5529
Reviewed-by: Otto <otto@codeberg.org>
2024-10-14 19:56:58 +00:00
Otto
0854b7a7c4 Merge pull request 'Update security option in issue template' (#5563) from gusted-patch-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5563
Reviewed-by: Otto <otto@codeberg.org>
2024-10-14 19:30:37 +00:00
Gusted
351c18c061 Update security option in issue template
Searching by the short key ID is not even enabled for keyservers. So point to https://forgejo.org/.well-known/security.txt instead for the necessary encryption details.
2024-10-14 18:55:32 +00:00
jutty
5443bca39a Fix typo in English locale file
Key settings.wiki_rename_branch_main_notices_2 had a duplicated 'the'.
2024-10-14 15:19:05 -03:00
JakobDev
c3cc4d82ec
Use assert.Empty 2024-10-14 20:15:40 +02:00
JakobDev
1d961495f3
fix: regression from #4125 2024-10-14 19:24:56 +02:00
0ko
5a21ff8e95 i18n(en): fix typo (#5554)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5554
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-14 05:20:02 +00:00
Codeberg Translate
575276cf79 i18n: update of translations from Codeberg Translate (#5514)
Co-authored-by: CDN18 <CDN18@users.noreply.translate.codeberg.org>
Co-authored-by: q3yi <q3yi@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: Benedikt Straub <Nordfriese@users.noreply.translate.codeberg.org>
Co-authored-by: ddogfoodd <ddogfoodd@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Beowulf <Beowulf@users.noreply.translate.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@users.noreply.translate.codeberg.org>
Co-authored-by: SteffoSpieler <SteffoSpieler@users.noreply.translate.codeberg.org>
Co-authored-by: sinsky <sinsky@users.noreply.translate.codeberg.org>
Co-authored-by: SomeTr <SomeTr@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fnurkla <Fnurkla@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5514
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-14 03:34:26 +00:00
Earl Warren
e299a7f4cd Merge pull request 'fix: don't cancel schedule workflows on push to main branch' (#5470) from Kwonunn/forgejo:dont-cancel-schedule-workflow into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5470
2024-10-13 12:06:02 +00:00
Earl Warren
7c4fbe867e
chore(release-notes): weekly cherry-pick week 2024-42 2024-10-13 14:17:08 +03:00
Lunny Xiao
8f61fce938
Only rename a user when they should receive a different name (#32247)
Fix #31996

(cherry picked from commit 9df5ddaf44aa5a3f319acba7b18645b7b1d4d8a2)
2024-10-13 14:17:08 +03:00
cloudchamb3r
68aa530fb2
Fix checkbox bug on private/archive filter (#32236)
fix #32235

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit cb739f533358a8cf6e1b6875b3d4f0da3bfa7c95)
2024-10-13 14:17:08 +03:00
Earl Warren
7855e4bb56
Improve the maintainblity of the reserved username list (#32229)
(cherry picked from commit 6029d78ab5006e8fb4f42adb5a8c491f19fa7b0a)

Conflicts:
  models/user/user.go
	services/user/user_test.go
    trivial context conflict
	tests/integration/user_test.go
    discarded entirely because dot may be allowed in Forgejo under
    some conditions
2024-10-13 14:17:08 +03:00
Earl Warren
6c8c5fe31b Merge pull request 'Update module github.com/minio/minio-go/v7 to v7.0.78 (forgejo)' (#5541) from renovate/forgejo-github.com-minio-minio-go-v7-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5541
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-13 06:01:10 +00:00
cloudchamb3r
eff28911d3
Add null check for responseData.invalidTopics (#32212)
<img width="553" alt="Screenshot 2024-10-08 at 10 49 10 AM"
src="https://github.com/user-attachments/assets/faeef64d-684a-4aba-b7fc-c7c6a0301abe">

`responseData.invalidTopics` can be null but it wasn't handled.

(cherry picked from commit 2e12343fc4ca96a215d6820c4467b619eaa5cbe9)
2024-10-13 08:06:49 +03:00
6543
d0af8fe4dc
Allow filtering PRs by poster in the ListPullRequests API (#32209)
as title

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit bdd655f2bde5facada4394f36fe54e364787de7a)
2024-10-13 07:58:01 +03:00
forgejo-renovate-action
059f08c00e Merge pull request 'Update dependency vue to v3.5.12 (forgejo)' (#5539) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-10-13 04:35:01 +00:00
Earl Warren
bf8e0a9c6a Merge pull request 'Update module github.com/klauspost/compress to v1.17.11 (forgejo)' (#5540) from renovate/forgejo-github.com-klauspost-compress-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5540
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-13 04:26:51 +00:00
Renovate Bot
a7a577281a Update module github.com/minio/minio-go/v7 to v7.0.78 2024-10-13 00:05:06 +00:00
Renovate Bot
d6d55df24d Update dependency vue to v3.5.12 2024-10-13 00:03:21 +00:00
Michael Zhang
dcae7d368c fix: use column flex on mobile to prevent project title from wrapping 2024-10-12 18:21:14 +00:00
Otto Richter
86bac2c54e i18n: Improve translation strings for webhook events (#5537)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5537
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
2024-10-12 15:18:51 +00:00
Renovate Bot
732878baf5 Update module github.com/klauspost/compress to v1.17.11 2024-10-12 00:04:06 +00:00
Otto
57802c8e3d Merge pull request '[BUG] Don't allow modification to internal reference' (#5307) from gusted/forgejo-internal-ref into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5307
Reviewed-by: Otto <otto@codeberg.org>
2024-10-11 19:34:55 +00:00
0ko
145f7624ca feat(ui): add a bullet symbol between author and committer (#5518)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5518
Reviewed-by: Otto <otto@codeberg.org>
2024-10-11 18:52:25 +00:00
Otto Richter
aafc1de0a3 fix(i18n): remove unnecessary variable (#5533)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5533
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
2024-10-11 18:51:29 +00:00
Otto Richter
79a3fe6cc6 i18n: Fine tune language for units (#5523)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5523
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
2024-10-11 18:27:47 +00:00
Otto
c59f64fab9 Merge pull request '[BUG] Make chroma match case-insenstive' (#5530) from gusted/forgejo-case-insensitive-highlight into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5530
Reviewed-by: Otto <otto@codeberg.org>
2024-10-11 17:35:14 +00:00
Otto
33ddb24379 Merge pull request 'tests(e2e): Refactor branch protection test' (#5294) from fnetx/e2e-flakyness into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5294
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-11 14:53:14 +00:00
Gusted
dcc442351d
[BUG] Make chroma match case-insenstive
- In the case that [go-enry](https://github.com/go-enry/go-enry/)
returned langauge doesn't match a lexer name (Either because its not
available or because it doesn't match Chroma's name), a last effort
attempt is made to use Chroma's matching.
- go-enry already applies `strings.ToLower` onto the filename to avoid
being case-sensitive, add the same code for Chroma's matching. The code
being used doesn't rely on the filename being case senstive for correct
matching.
- Adds unit test.
- Resolves #752
2024-10-11 15:42:18 +02:00
Gusted
9de9034400
[BUG] Don't allow owner team with incorrect unit access
- On editting a team, only update the units if the team isn't the
'Owners' team. Otherwise the 'Owners' team end up having all of their
unit access modes set to 'None'; because the request form doesn't send
over any units, as it's simply not shown in the UI.
- Adds a database inconstency check and fix for the case where the
'Owners' team is affected by this bug.
- Adds unit test.
- Adds integration test.
- Resolves #5528
- Regression of https://github.com/go-gitea/gitea/pull/24012
2024-10-11 14:48:47 +02:00
Earl Warren
4cb01ba5da Merge pull request 'Fix bug when a token is given public only' (#5515) from earl-warren/forgejo:wip-public-scope into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5515
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-11 02:08:03 +00:00
Earl Warren
27ff75857e Merge pull request 'Update module google.golang.org/grpc to v1.67.1 (forgejo)' (#5370) from renovate/forgejo-google.golang.org-grpc-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5370
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-11 01:47:39 +00:00
Renovate Bot
7e19698138 Update dependency @github/text-expander-element to v2.8.0 2024-10-11 00:03:35 +00:00
Earl Warren
14d85597f8
chore(lint): Fix bug when a token is given public only 2024-10-10 16:00:16 +03:00
Earl Warren
9b63e3e88d
chore(release-note): Fix bug when a token is given public only 2024-10-10 16:00:16 +03:00
Renovate Bot
283f94c85f Update module google.golang.org/grpc to v1.67.1 2024-10-10 08:03:23 +00:00
Lunny Xiao
a052d2b602
Fix bug when a token is given public only
Port of https://github.com/go-gitea/gitea/pull/32204

(cherry picked from commit d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e)

Conflicts:
  routers/api/v1/api.go
	services/context/api.go
  trivial context conflicts
2024-10-10 10:41:42 +03:00
Earl Warren
6f7aee2b3e Merge pull request 'Update module google.golang.org/protobuf to v1.35.1 (forgejo)' (#5510) from renovate/forgejo-google.golang.org-protobuf-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5510
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-10 07:27:29 +00:00
forgejo-renovate-action
67549e2d94 Merge pull request 'Update x/tools to v0.26.0 (forgejo)' (#5511) from renovate/forgejo-xtools into forgejo 2024-10-10 07:08:05 +00:00
Earl Warren
a5cee8d380 Merge pull request 'Update module golang.org/x/net to v0.30.0 (forgejo)' (#5508) from renovate/forgejo-golang.org-x-net-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5508
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-10 06:56:04 +00:00
Earl Warren
75e3a9a7b0 Merge pull request 'Update module golang.org/x/sys to v0.26.0 (forgejo)' (#5509) from renovate/forgejo-golang.org-x-sys-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5509
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-10 06:53:13 +00:00
Renovate Bot
dc93b843cd Update x/tools to v0.26.0 2024-10-10 06:03:14 +00:00
Codeberg Translate
90182a6204 i18n: update of translations from Codeberg Translate (#5471)
Co-authored-by: 413x1nkp <413x1nkp@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Juno Takano <jutty@users.noreply.translate.codeberg.org>
Co-authored-by: feroli <feroli@users.noreply.translate.codeberg.org>
Co-authored-by: pgmtx <pgmtx@users.noreply.translate.codeberg.org>
Co-authored-by: kwoot <kwoot@users.noreply.translate.codeberg.org>
Co-authored-by: atarwn <atarwn@users.noreply.translate.codeberg.org>
Co-authored-by: Benny <Benny@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: JoseDouglas26 <JoseDouglas26@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: whitecold <whitecold@users.noreply.translate.codeberg.org>
Co-authored-by: sinsky <sinsky@users.noreply.translate.codeberg.org>
Co-authored-by: William_Weber_Berrutti <William_Weber_Berrutti@users.noreply.translate.codeberg.org>
Co-authored-by: eldyj <eldyj@users.noreply.translate.codeberg.org>
Co-authored-by: CDN18 <CDN18@users.noreply.translate.codeberg.org>
Co-authored-by: jaahas <jaahas@users.noreply.translate.codeberg.org>
Co-authored-by: aleksi <aleksi@users.noreply.translate.codeberg.org>
Co-authored-by: stevenroose <stevenroose@users.noreply.translate.codeberg.org>
Co-authored-by: lumi200 <lumi200@users.noreply.translate.codeberg.org>
Co-authored-by: marcoaraujojunior <marcoaraujojunior@users.noreply.translate.codeberg.org>
Co-authored-by: SmolLemon <SmolLemon@users.noreply.translate.codeberg.org>
Co-authored-by: timedin <timedin@users.noreply.translate.codeberg.org>
Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
Co-authored-by: thodorisl <thodorisl@users.noreply.translate.codeberg.org>
Co-authored-by: SerikaFrame <SerikaFrame@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5471
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-10 05:22:07 +00:00
Renovate Bot
b1dcd28b7e Update module google.golang.org/protobuf to v1.35.1 2024-10-10 02:04:07 +00:00
Renovate Bot
4252035f78 Update module golang.org/x/sys to v0.26.0 2024-10-10 00:03:34 +00:00
Renovate Bot
ba5ec66182 Update module golang.org/x/net to v0.30.0 2024-10-10 00:03:17 +00:00
Otto
fd3bff3181 Merge pull request 'fix: Small fixes and rename for #5482' (#5505) from timedin/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5505
Reviewed-by: Otto <otto@codeberg.org>
2024-10-09 20:13:51 +00:00
Otto
ca2c850122 Merge pull request 'fix: correct Discord webhook JSON for issue events' (#5492) from kidsan/forgejo:discord-api-conformance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5492
Reviewed-by: Otto <otto@codeberg.org>
2024-10-09 16:02:49 +00:00
kytta
e39d7a1ee9 Do not change stroke size in the loading animation
Signed-off-by: kytta <me@kytta.dev>
2024-10-09 12:20:29 +00:00
TimedIn
e988a25237 Small fixes and rename for #5482
- New Issue Fixed assign me being hidden after assignees were cleared https://codeberg.org/forgejo/forgejo/pulls/5482/files#issuecomment-2365431
- Test for verifying the above
- Removed wait for network idle from e2e test
- Renamed templ key assigneeId to assigneeIds
2024-10-09 14:17:41 +02:00
ehshi
82b1ab56de update git book link to v2 (#5503)
## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Co-authored-by: Ehsan Shirvanian <ehsan@duck.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5503
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: ehshi <ehshi@noreply.codeberg.org>
Co-committed-by: ehshi <ehshi@noreply.codeberg.org>
2024-10-09 09:28:37 +00:00
Earl Warren
f06d6e6c19 Merge pull request 'Update module golang.org/x/image to v0.21.0 (forgejo)' (#5502) from renovate/forgejo-golang.org-x-image-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5502
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-09 05:13:37 +00:00
forgejo-renovate-action
170986f9f2 Merge pull request 'Update dependency @playwright/test to v1.48.0 (forgejo)' (#5501) from renovate/forgejo-playwright-monorepo into forgejo 2024-10-09 05:10:04 +00:00
Earl Warren
31fc0f66b7 Merge pull request '[gitea] week 2024-41 cherry pick (gitea/main -> forgejo)' (#5477) from earl-warren/wcp/2024-41 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5477
Reviewed-by: Otto <otto@codeberg.org>
2024-10-09 05:02:20 +00:00
JakobDev
1fc5e41592 [Feat]Add link to show all Issues/PullRequests (#4125)
The Issue and PullRequest list has 3 states:
- open: This lists all open Issues/PullRequests
- closed: This lists all closed Issues/PullRequests
- all: This lists all open and closed Issues/PullRequests

If you want to get to the all state, you need to click Open while in open state or Closed while in closed state, which is very unintuitive. This PR adss a third button to get to this state.

![grafik](/attachments/4ff59e4c-e318-40f0-80ba-f921ce098919)

I'm not sure if the eye icon fits well, but I couldn't find a better one.

Tests will be added once #4124 is merged.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4125
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-committed-by: JakobDev <jakobdev@gmx.de>
2024-10-09 04:56:40 +00:00
Renovate Bot
80d41ee2e1 Update actions/cache action to v4.1.1 (forgejo) (#5498)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5498
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-10-09 04:54:02 +00:00
Renovate Bot
5b25a882e0 Update module golang.org/x/image to v0.21.0 2024-10-09 02:03:22 +00:00
Renovate Bot
89aa9c30c0 Update dependency @playwright/test to v1.48.0 2024-10-09 02:02:53 +00:00
Kidsan
6ea6f224b8 fix: improve discord webhook api conformance
This commit corrects some cases in the discord webhook payload that do
not align with the discord documentation
2024-10-08 22:43:28 +02:00
Otto
e68cecf48d Merge pull request 'feat: "Assign to me" button on PR and Issues #5215' (#5482) from timedin/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5482
Reviewed-by: Otto <otto@codeberg.org>
2024-10-08 19:43:40 +00:00
TimedIn
2feb3d03d7 feat: "assign to me" button on PRs and issues
includes:
Tests for assignees on issues
Move assignees selector of new Issue to assignees.tmpl
2024-10-08 18:36:37 +02:00
Kidsan
cf3ebab4ba fix: add length limit to discord webhook icon_url 2024-10-08 17:22:27 +02:00
forgejo-renovate-action
b5b9cc1c38 Merge pull request 'Update dependency vue to v3.5.11 (forgejo)' (#5458) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-10-08 06:59:17 +00:00
Renovate Bot
2bf9618768 Update dependency vue to v3.5.11 2024-10-08 04:04:20 +00:00
forgejo-renovate-action
e34fe94d8c Merge pull request 'Update dependency eslint-plugin-wc to v2.2.0 (forgejo)' (#5495) from renovate/forgejo-linters into forgejo 2024-10-08 03:50:43 +00:00
forgejo-renovate-action
f5b804748a Merge pull request 'Update dependency @vitest/eslint-plugin to v1.1.7 (forgejo)' (#5494) from renovate/forgejo-vitest-eslint-plugin-1.x into forgejo 2024-10-08 03:49:52 +00:00
Earl Warren
54f0203584 Merge pull request 'Update actions/git-backporting action to v4.8.2 (forgejo)' (#5493) from renovate/forgejo-actions-git-backporting-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5493
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-08 03:49:27 +00:00
Renovate Bot
b1901acd3a Update dependency eslint-plugin-wc to v2.2.0 2024-10-08 02:02:56 +00:00
Renovate Bot
39f6da1a83 Update dependency @vitest/eslint-plugin to v1.1.7 2024-10-08 00:03:27 +00:00
Renovate Bot
b23217fb3e Update actions/git-backporting action to v4.8.2 2024-10-08 00:02:57 +00:00
JakobDev
fcc3dd228d
fix: correct documentation for non 200 responses in swagger 2024-10-07 18:36:07 +02:00
voltagex
d17db93fbf i18n: improve 'Verify' error message, stopgap for #2809 (#5479)
Signed-off-by: Adam Baxter <codeberg@voltagex.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5479
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: voltagex <voltagex@noreply.codeberg.org>
Co-committed-by: voltagex <voltagex@noreply.codeberg.org>
2024-10-07 16:11:07 +00:00
Earl Warren
c82e5d1a1a Merge pull request 'chore(ci): update changed-files actions URL for consistency' (#5485) from fnetx/changed-files-action-url into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5485
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-07 05:34:33 +00:00
forgejo-renovate-action
fd69556450 Merge pull request 'Update renovate to v38.110.2 (forgejo)' (#5483) from renovate/forgejo-renovate into forgejo 2024-10-07 05:27:35 +00:00
Otto Richter
36c384246c chore(ci): update changed-files actions URL for consistency
mirrored actions are typically created under the name of the original author; additionally this moves the action to Forgejo's control
2024-10-07 03:21:45 +02:00
Renovate Bot
e9040fafec Update renovate to v38.110.2 2024-10-07 00:03:30 +00:00
Earl Warren
6488d15860
Fix the logic of finding the latest pull review commit ID (#32139) (followup)
Adjust the tests for review deletion to ignore a newly inserted
fixture. It is a review request and cannot be deleted.
2024-10-06 10:00:09 +02:00
Earl Warren
1bee6fa839
Add support for searching users by email (#30908) (testifylint) 2024-10-06 08:29:19 +02:00
Earl Warren
122baf4de8
chore(release-notes): weekly cherry-pick week 2024-41 2024-10-06 08:21:41 +02:00
yp05327
af901ac7bb
Add support for searching users by email (#30908)
Fix #30898

we have an option `SearchByEmail`, so enable it, then we can search user
by email.
Also added a test for it.

(cherry picked from commit 5d6d025c9b8d2abca9ec2bfdc795d1f0c1c6592d)
2024-10-06 08:10:22 +02:00
Job
1dfe58ad11
Fix PR creation on forked repositories (#31863)
Resolves #20475

(cherry picked from commit 7e68bc88238104d2ee8b5a877fc1ad437f1778a4)

Conflicts:
	tests/integration/pull_create_test.go
  add missing testPullCreateDirectly from
  c63060b130d34e3f03f28f4dccbf04d381a95c17 Fix code owners will not be mentioned when a pull request comes from a forked repository (#30476)
2024-10-06 08:08:40 +02:00
Bruno Sofiato
a681daaca2
Fixed race condition when deleting documents by repoId in ElasticSearch (#32185)
Resolves #32184

---------

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
(cherry picked from commit d266d190bd744b7b6f572bf69a42013e21b9be62)
2024-10-06 07:59:42 +02:00
Zettat123
b67b7c1238
Fix the logic of finding the latest pull review commit ID (#32139)
Fix #31423

(cherry picked from commit f4b8f6fc40ce2869135372a5c6ec6418d27ebfba)

Conflicts:
	models/fixtures/comment.yml
  comment fixtures have to be shifted because there is one more in Forgejo
2024-10-06 07:44:28 +02:00
Earl Warren
388e7c9719
Ensure GetCSRF doesn't return an empty token (#32130) (followup)
Modifies the calls to createAttachment() for tests that do not exist
in Gitea.
2024-10-06 07:35:19 +02:00
Jason Song
2bc47e81a3
Ensure GetCSRF doesn't return an empty token (#32130)
Since page templates keep changing, some pages that contained forms with
CSRF token no longer have them.

It leads to some calls of `GetCSRF` returning an empty string, which
fails the tests. Like

3269b04d61/tests/integration/attachment_test.go (L62-L63)

The test did try to get the CSRF token and provided it, but it was
empty.

(cherry picked from commit 13283873e9d523d5a5557f55d64f702c1a9f76ec)

Conflicts:
	tests/integration/integration_test.go
  trivial context conflict
2024-10-06 07:29:45 +02:00
forgejo-renovate-action
4337b8321b Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.9.0 (forgejo)' (#5476) from renovate/forgejo-linters into forgejo 2024-10-06 04:58:42 +00:00
Earl Warren
506e5d6058 Merge pull request 'Update actions/cache action to v4.1.0 (forgejo)' (#5474) from renovate/forgejo-actions-cache-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5474
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-06 04:56:35 +00:00
Earl Warren
58545a3586 Merge pull request 'Update module github.com/mattn/go-sqlite3 to v1.14.24 (forgejo)' (#5473) from renovate/forgejo-github.com-mattn-go-sqlite3-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5473
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-06 04:52:13 +00:00
Renovate Bot
0875dbf3d7 Update dependency @stylistic/eslint-plugin-js to v2.9.0 2024-10-06 02:07:00 +00:00
Otto
c28011c4ea Merge pull request 'fix: "forked from" note alignment on 404 error pages #5324' (#5472) from timedin/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5472
Reviewed-by: Otto <otto@codeberg.org>
2024-10-06 01:56:32 +00:00
Renovate Bot
e4866d9c9a Update actions/cache action to v4.1.0 2024-10-06 00:04:15 +00:00
Renovate Bot
aad9e21f57 Update module github.com/mattn/go-sqlite3 to v1.14.24 2024-10-06 00:03:58 +00:00
TimedIn
8cbb9f3116 #5324 Fix centered fork note 2024-10-06 00:14:30 +02:00
Kwonunn
b20c0b1469
fix: don't cancel schedule workflows on push to main branch 2024-10-05 12:14:44 +02:00
forgejo-renovate-action
1806e336fc Merge pull request 'Update dependency @vitest/eslint-plugin to v1.1.6 (forgejo)' (#5467) from renovate/forgejo-vitest-eslint-plugin-1.x into forgejo 2024-10-05 06:52:18 +00:00
forgejo-renovate-action
52a133fad1 Merge pull request 'Update dependency @stylistic/stylelint-plugin to v3.1.1 (forgejo)' (#5466) from renovate/forgejo-stylistic-stylelint-plugin-3.x into forgejo 2024-10-05 06:51:59 +00:00
Renovate Bot
d7e2bb6b94 Update dependency @vitest/eslint-plugin to v1.1.6 2024-10-05 00:03:15 +00:00
Renovate Bot
983919153b Update dependency @stylistic/stylelint-plugin to v3.1.1 2024-10-05 00:02:50 +00:00
Otto
f7f7800460 Merge pull request 'feat: support regexp in git-grep search' (#4968) from yoctozepto/git-grep-regexp into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4968
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-10-04 17:10:14 +00:00
Otto
cb91e5a4dc Merge pull request 'Makefile: support gotestsum' (#5249) from yoctozepto/gotestsum into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5249
Reviewed-by: Otto <otto@codeberg.org>
2024-10-04 14:24:12 +00:00
Otto
2c4a3d6641 Merge pull request 'Remove some Windows-specific files' (#5353) from 0ko/forgejo:no-windows into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5353
Reviewed-by: Otto <otto@codeberg.org>
2024-10-04 14:03:07 +00:00
Otto
386e3d17cd Merge pull request 'ci/tests(e2e): always run e2e tests, but only on changed files' (#5450) from fnetx/e2e-on-changes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5450
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-04 13:43:18 +00:00
Otto Richter
88f653b583 docs(e2e): Update e2e test instructions for changed file patterns
chore: let fnetx review e2e tests
2024-10-04 15:15:10 +02:00
Otto Richter
72749bcf70 ci: (always|only) run e2e tests based on changes
- detect changed files for the run
- let e2e files specify which related files they "watch"
- only run e2e tests based on pattern matching or when generic files
  change
- fallback to full runs if env not specified
2024-10-04 15:14:45 +02:00
Otto Richter
7765153b40 tests(e2e): Allow tests to run only on file changes
- supports glob patterns in testfiles
- only runs tests on changes
- always runs tests without specified patterns

tests(e2e): refactor global watch patterns

tests(e2e): add watch patterns to test files
2024-10-04 15:14:45 +02:00
Otto Richter
f2a23c962a ci: merge e2e workflow into testing.yml
ci: cache frontend build across jobs

ci: ensure caches are saved with zstd

work around https://github.com/actions/cache/issues/1169

ci: require unit tests for remote cacher

- prevents unnecessary runs in case the unit tests already fail
- starts the integration tests about 2 minutes earlier
- should give some overall speedup to the CI run, because the long integration tests are run and finish earlier, and the cacher tests should still usually finish in time
- does not save any computing resources, just provides quicker results when runners are not under high load
2024-10-04 15:14:28 +02:00
Gusted
14b6f26aab Merge pull request 'log concise repo names in lfs doctor' (#5456) from kwonunn/fix-lfs-log-output into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5456
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-10-04 12:44:18 +00:00
Earl Warren
ad54c72b90 Merge pull request 'Update dependency mermaid to v11.3.0 (forgejo)' (#5459) from renovate/forgejo-mermaid-11.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5459
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-10-04 07:23:47 +00:00
Earl Warren
3d97c0f941
chore(release-notes): Update dependency mermaid to v11.3.0 2024-10-04 08:53:11 +02:00
Renovate Bot
14ea872f1e Update dependency mermaid to v11.3.0 2024-10-04 00:03:47 +00:00
Codeberg Translate
aca00fa346 i18n: update of translations from Codeberg Translate (#5413)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: be4zad <be4zad@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: kwoot <kwoot@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: kecrily <kecrily@users.noreply.translate.codeberg.org>
Co-authored-by: overloop <overloop@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5413
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-10-03 21:23:07 +00:00
Kwonunn
15a407a617
log concise repo names in lfs doctor
the old log prints the entire repo object
2024-10-03 16:15:08 +02:00
Dirk
ba891d50bf remove mssql as requested per review comment
see https://codeberg.org/forgejo/forgejo/pulls/5415#issuecomment-2349746
2024-10-03 14:03:10 +02:00
forgejo-renovate-action
44bf8305d4 Merge pull request 'Update dependency @vitest/eslint-plugin to v1.1.5 (forgejo)' (#5452) from renovate/forgejo-vitest-eslint-plugin-1.x into forgejo 2024-10-03 06:30:36 +00:00
Renovate Bot
56bcbbaa31 Update dependency @vitest/eslint-plugin to v1.1.5 2024-10-03 06:02:29 +00:00
forgejo-renovate-action
c8859c5df1 Merge pull request 'Update vitest monorepo to v2.1.2 (forgejo)' (#5454) from renovate/forgejo-vitest-monorepo into forgejo 2024-10-03 05:26:20 +00:00
Renovate Bot
94f04e6fd8 Update vitest monorepo to v2.1.2 2024-10-03 02:02:46 +00:00
Renovate Bot
2bd9a253ed Update module github.com/caddyserver/certmagic to v0.21.4 2024-10-03 00:03:02 +00:00
Gusted
84e77c41fa
[FEAT] Don't allow modification to internal reference
- This a port of https://github.com/go-gitea/gitea/pull/31931 in a
behavior-sense. None of the code was actually ported.
- Follow up for #2834, now also don't allow modification.
- Integration test added.
- Unit test modified.
2024-10-02 20:50:06 +02:00
Renovate Bot
08b1c609bc Update dependency go to v1.23.2 2024-10-01 18:05:54 +00:00
Otto
55d9c1bad3 Merge pull request 'ci: move composite workflow location' (#5421) from fnetx/dry-workflow-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5421
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-01 15:20:28 +00:00
Otto Richter
e6b84f9191 ci: move composite workflow location
otherwise, they unfortunately display in the Forgejo UI with an error message
2024-10-01 16:51:02 +02:00
Otto
de99a9c93e Merge pull request 'Update actions/setup-go action to v5 (forgejo)' (#5441) from renovate/forgejo-actions-setup-go-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5441
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
2024-10-01 14:17:19 +00:00
forgejo-renovate-action
36f2b8656e Merge pull request 'Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.3 (forgejo)' (#5437) from renovate/forgejo-devcontainer-packages into forgejo 2024-10-01 13:54:58 +00:00
Renovate Bot
be373e948e Update actions/setup-go action to v5 2024-10-01 10:02:16 +00:00
Renovate Bot
f79d2fba07 Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.3 2024-10-01 10:02:11 +00:00
forgejo-renovate-action
d2eac83f6a Merge pull request 'Update dependency eslint-plugin-sonarjs to v2.0.3 (forgejo)' (#5436) from renovate/forgejo-linters into forgejo 2024-10-01 08:53:47 +00:00
Earl Warren
df0e50a08f Merge pull request 'Update dependency @github/text-expander-element to v2.7.2 (forgejo)' (#5396) from renovate/forgejo-github-text-expander-element-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5396
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-01 08:38:55 +00:00
Earl Warren
d25a3709d9 Merge pull request 'chore: remove spurious comment in tests' (#5434) from earl-warren/forgejo:wip-container-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5434
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-01 08:37:36 +00:00
Renovate Bot
e28a1e1d38 Update dependency eslint-plugin-sonarjs to v2.0.3 2024-10-01 08:05:28 +00:00
Earl Warren
aec55ac1b6 Merge pull request '[gitea] week 2024-40 cherry pick (gitea/main -> forgejo)' (#5416) from earl-warren/wcp/2024-40 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5416
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-10-01 07:52:05 +00:00
Earl Warren
9a7fc2e55e Merge pull request 'Update actions/cache action to v4 (forgejo)' (#5426) from renovate/forgejo-actions-cache-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5426
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-01 07:50:24 +00:00
Mai-Lapyst
96c4ca249a
Fix boolean inputs in workflow_dispatch; closes #5425 2024-10-01 09:22:43 +02:00
Earl Warren
2099c2af7c
chore: remove spurious comment in tests 2024-09-30 18:47:30 +02:00
Earl Warren
c4d2635839 Merge pull request 'fix: referenced sha256:* container images may be deleted' (#5430) from earl-warren/forgejo:wip-container-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5430
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-30 16:45:09 +00:00
Earl Warren
08999e8189 Merge pull request 'Lock file maintenance (forgejo)' (#5424) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5424
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-30 15:31:34 +00:00
Earl Warren
0a5fd7fdb8
fix: referenced sha256:* container images may be deleted
The inventory of the sha256:* images and the manifest index that
reference them is incomplete because it does not take into account any
image older than the expiration limit. As a result some sha256:* will
be considered orphaned although they are referenced from a manifest
index that was created more recently than the expiration limit.

There must not be any filtering based on the creation time when
building the inventory. The expiration limit must only be taken into
account when deleting orphaned images: those that are more recent than
the expiration limit must not be deleted.

This limit is specially important because it protects against a race
between a cleanup task and an ongoing mirroring task. A mirroring
task (such as skopeo sync) will first upload sha256:* images and then
create the corresponding manifest index. If a cleanup races against
it, the sha256:* images that are not yet referenced will be deleted
without skopeo noticing and the published index manifest that happens
at a later time will contain references to non-existent images.
2024-09-30 16:56:21 +02:00
Renovate Bot
e3eaa284bb Update actions/checkout action to v4 (forgejo) (#5427)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5427
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-30 13:08:26 +00:00
Renovate Bot
92305933b1 Update actions/setup-node action to v4 (forgejo) (#5428)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5428
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-30 12:56:08 +00:00
Renovate Bot
502a6a4461 Update actions/cache action to v4 2024-09-30 12:06:49 +00:00
forgejo-renovate-action
b2aa644859 Merge pull request 'Update renovate to v38.101.1 (forgejo)' (#5422) from renovate/forgejo-renovate into forgejo 2024-09-30 06:25:46 +00:00
Renovate Bot
0c993085e0 Lock file maintenance 2024-09-30 02:03:35 +00:00
Renovate Bot
1b06287fe3 Update renovate to v38.101.1 2024-09-30 00:08:52 +00:00
Otto
c37732d1ae Merge pull request 'ci: use custom action for Go caching' (#5328) from fnetx/custom-go-caching into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5328
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-29 23:53:33 +00:00
Otto Richter
a56c000f60 Replace setup-go with a custom action
To maximize the caching efficiency, all build jobs are executed as
forgejo user.
Hash is explicitly specified to avoid breaking changes.
2024-09-30 01:16:54 +02:00
Otto
3a38dbac17 Merge pull request 'ci: Move preparations to local actions' (#5410) from fnetx/ci-boilerplate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5410
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-29 23:16:13 +00:00
Earl Warren
cf56beb3f9 Merge pull request 'Update citation-js monorepo (forgejo)' (#5395) from renovate/forgejo-citation-js-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5395
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 10:02:41 +00:00
Earl Warren
c9ea78eb1c
chore(release-notes): weekly cherry-pick week 2024-40 2024-09-29 11:35:18 +02:00
Earl Warren
ffed8ac7b4 Merge pull request 'Update module github.com/minio/minio-go/v7 to v7.0.77 (forgejo)' (#5398) from renovate/forgejo-github.com-minio-minio-go-v7-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5398
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 09:26:54 +00:00
Radosław Piliszek
19672407f0 ui(git-grep): adapt the hint per the comments 2024-09-29 11:10:50 +02:00
Bruno Sofiato
8178d6eaba
Change the code search to sort results by relevance (#32134)
Resolves #32129

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
(cherry picked from commit 99d0510cb69c3c53cee05ef0e83ed02389925a90)
2024-09-29 11:00:25 +02:00
forgejo-renovate-action
1a90067754 Merge pull request 'Update dependency vue to v3.5.9 (forgejo)' (#5402) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-09-29 08:52:40 +00:00
yp05327
36af3348bc
Fix wrong status of Set up Job when first step is skipped (#32120)
Fix #32089

(cherry picked from commit 6fa962f409c84477a7a4cf35b4a38a4a93fc3224)
2024-09-29 10:38:49 +02:00
Lunny Xiao
b496317b5a
Fix bug when deleting a migrated branch (#32075)
After migrating a repository with pull request, the branch is missed and
after the pull request merged, the branch cannot be deleted.

(cherry picked from commit 5a8568459d22e57cac506465463660526ca6a08f)

Conflicts:
	services/repository/branch.go
  conflict because of [GITEA] Fix typo in formatting error e71b5a038e
2024-09-29 10:37:39 +02:00
Lunny Xiao
5ccf79d05c
Include collaboration repositories on dashboard source/forks/mirrors list (#31946)
Fix #13489

In the original implementation, only `All` will display your owned and
collaborated repositories. For other filters like `Source`, `Mirrors`
and etc. will only display your owned repositories.

This PR removed the limitations. Now except `collbrations`, other
filters will always display your owned and collaborated repositories.

(cherry picked from commit 4947bec8360c152daca23e120eae1732d3848492)
2024-09-29 10:28:08 +02:00
Kemal Zebari
30b8b45e5e
Truncate commit message during Discord webhook push events (#31970)
Resolves #31668.

(cherry picked from commit aadbe0488f454b9f7f5a56765f4530f9d1e2c6ec)
2024-09-29 10:25:52 +02:00
Lunny Xiao
65b3136261
Fix panic when cloning with wrong ssh format. (#32076)
(cherry picked from commit 3f2d8f873035b614b4cdb447d8e16f5af82cefe8)
2024-09-29 10:22:01 +02:00
cloudchamb3r
ff65d34f03
Fix Bug in Issue/pulls list (#32081)
fix #32080

## After
### for opened issues
<img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM"
src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec">

### for closed issues
<img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM"
src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482">

### for all issues
<img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM"
src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169">

(cherry picked from commit e1f0598c8f5af5ac95f5e13b74fbab99506762db)
2024-09-29 10:08:30 +02:00
Renovate Bot
1d5f8e5488 Update dependency vue to v3.5.10 2024-09-29 08:03:13 +00:00
Earl Warren
a226064711
Fix artifact v4 upload above 8MB (#31664) (fix lint errors) 2024-09-29 09:58:47 +02:00
ChristopherHX
8f0a05a7e4
Fix artifact v4 upload above 8MB (#31664)
Multiple chunks are uploaded with type "block" without using
"appendBlock" and eventually out of order for bigger uploads.
8MB seems to be the chunk size

This change parses the blockList uploaded after all blocks to get the
final artifact size and order them correctly before calculating the
sha256 checksum over all blocks

Fixes #31354

(cherry picked from commit b594cec2bda6f861effedb2e8e0a7ebba191c0e9)

Conflicts:
	routers/api/actions/artifactsv4.go
  conflict because of Refactor AppURL usage (#30885) 67c1a07285008cc00036a87cef966c3bd519a50c
    that was not cherry-picked in Forgejo
    the resolution consist of removing the extra ctx argument
2024-09-29 09:24:15 +02:00
Earl Warren
76a0dcd372 Merge pull request 'Update dependency webpack to v5.95.0 (forgejo)' (#5411) from renovate/forgejo-webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5411
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-29 06:46:03 +00:00
Dirk
5b17c1d6eb make sqlite3 the default database 2024-09-29 00:29:01 +02:00
Otto Richter
1fa09d1621 Split Git package installation 2024-09-28 12:08:30 +02:00
Codeberg Translate
e40554f89b i18n: update of translations from Codeberg Translate (#5355)
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: aleksi <aleksi@users.noreply.translate.codeberg.org>
Co-authored-by: Application-Maker <Application-Maker@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: claudep <claudep@users.noreply.translate.codeberg.org>
Co-authored-by: vri <vri@users.noreply.translate.codeberg.org>
Co-authored-by: nicokaiser <nicokaiser@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: robines <robines@users.noreply.translate.codeberg.org>
Co-authored-by: nazrin <nazrin@users.noreply.translate.codeberg.org>
Co-authored-by: Kaede Fujisaki <ledyba@users.noreply.translate.codeberg.org>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5355
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-09-28 09:40:29 +00:00
Renovate Bot
735bcf978f Update dependency webpack to v5.95.0 2024-09-28 00:02:39 +00:00
Otto Richter
c0b17a06ef Split backend building boilerplate 2024-09-27 20:47:35 +02:00
Otto Richter
5b84756137 Split env preparation boilerplate 2024-09-27 20:47:35 +02:00
Exploding Dragon
89742c4913 feat: add architecture-specific removal support for arch package (#5351)
- [x] add architecture-specific removal support
- [x] Fix upload competition
- [x] Fix not checking input when downloading

docs: https://codeberg.org/forgejo/docs/pulls/874

### Release notes

- [ ] I do not want this change to show in the release notes.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5351
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-09-27 08:21:22 +00:00
Earl Warren
89d9307d56 Merge pull request '[gitea] week 2024-39 cherry pick (gitea/main -> forgejo)' (#5372) from earl-warren/wcp/2024-39 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5372
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-27 08:12:43 +00:00
forgejo-renovate-action
40a68aa8f8 Merge pull request 'Update dependency markdownlint-cli to v0.42.0 (forgejo)' (#5405) from renovate/forgejo-markdownlint-cli-0.x into forgejo 2024-09-27 08:09:55 +00:00
forgejo-renovate-action
84b96a7343 Merge pull request 'Update dependency @stylistic/stylelint-plugin to v3.1.0 (forgejo)' (#5403) from renovate/forgejo-stylistic-stylelint-plugin-3.x into forgejo 2024-09-27 08:09:26 +00:00
forgejo-renovate-action
9ec57761f9 Merge pull request 'Update dependency @vitest/eslint-plugin to v1.1.4 (forgejo)' (#5404) from renovate/forgejo-vitest-eslint-plugin-1.x into forgejo 2024-09-27 08:08:53 +00:00
Earl Warren
e3deb88a8d
chore(release-notes): weekly cherry-pick week 2024-39 2024-09-27 08:47:23 +02:00
Lunny Xiao
2ffb08bb88
Use camo.Always instead of camo.Allways (#32097)
Fix #31575

https://gitea.com/gitea/docs/pulls/73
(cherry picked from commit 8e2dd5d3ddfb442937c79f05df88d18b856952cb)
2024-09-27 08:45:55 +02:00
Jamie Schouten
9d34731198
Add bin to Composer Metadata (#32099)
This PR addresses the missing `bin` field in Composer metadata, which
currently causes vendor-provided binaries to not be symlinked to
`vendor/bin` during installation.

In the current implementation, running `composer install` does not
publish the binaries, leading to issues where expected binaries are not
available.

By properly declaring the `bin` field, this PR ensures that binaries are
correctly symlinked upon installation, as described in the [Composer
documentation](https://getcomposer.org/doc/articles/vendor-binaries.md).

(cherry picked from commit d351a42494e71b5e2da63302c2f9b46c78e6dbde)
2024-09-27 08:42:48 +02:00
Lunny Xiao
f709de2403
Fix wrong last modify time (#32102)
(cherry picked from commit a802508f88e546bf18990559e44bf27a09c869ee)
2024-09-27 08:42:48 +02:00
Timon van der Berg
2675a24649
Repo Activity: count new issues that were closed (#31776)
I'm new to go and contributing to gitea, your guidance is much
appreciated.

This is meant to solve https://github.com/go-gitea/gitea/issues/13309

Previously, closed issues would not be shown under new issues in the
activity tab, even if they were newly created.

changes:
* Split out newlyCreatedIssues from issuesForActivityStatement to count
  both currently open and closed issues.
* Use a seperate function to count active issues to prevent
double-counting issues after the above change.

Result is that new issues that have been closed are shown both under
"new" and "closed".

Signed-off-by: Timon van der Berg <tmnvanderberg@gmail.com>
(cherry picked from commit ebfde845294cc681de6b1fe1adcf27e35f61b89b)
2024-09-27 08:42:48 +02:00
KN4CK3R
526054332a
Fix incorrect /tokens api (#32085)
Fixes #32078

- Add missing scopes output.
- Disallow empty scope.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 08adbc468f8875fd4763c3656b334203c11adc0a)
2024-09-27 08:42:48 +02:00
Earl Warren
6275d1bc50
Refactor CSRF protector (#32057) (fix forgejo tests)
Fix the tests unique to Forgejo that are impacted by the refactor.
2024-09-27 08:42:48 +02:00
wxiaoguang
1ae3b127fc
Refactor CSRF protector (#32057)
Remove unused CSRF options, decouple "new csrf protector" and "prepare"
logic, do not redirect to home page if CSRF validation falis (it
shouldn't happen in daily usage, if it happens, redirecting to home
doesn't help either but just makes the problem more complex for "fetch")

(cherry picked from commit 1fede04b83288d8a91304a83b7601699bb5cba04)

Conflicts:
	options/locale/locale_en-US.ini
	tests/integration/repo_branch_test.go
  trivial context conflicts
2024-09-27 08:42:48 +02:00
Earl Warren
1bdf334844
feat: add IfZero utility function
(cherry picked from commit 43de021ac1ca017212ec75fd88a8a80a9db27c4c)
2024-09-27 08:42:48 +02:00
Renovate Bot
70014a7bc9 Update dependency markdownlint-cli to v0.42.0 2024-09-27 02:03:21 +00:00
Renovate Bot
757080addd Update dependency @vitest/eslint-plugin to v1.1.4 2024-09-27 02:03:09 +00:00
Renovate Bot
d000993905 Update dependency @stylistic/stylelint-plugin to v3.1.0 2024-09-27 00:04:48 +00:00
Gusted
5e342c6fa7 Merge pull request 'Update module github.com/klauspost/compress to v1.17.10 (forgejo)' (#5397) from renovate/forgejo-github.com-klauspost-compress-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5397
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-26 14:55:51 +00:00
Earl Warren
5e06b0c0ec Merge pull request 'Update dependency monaco-editor to v0.51.0 (forgejo)' (#5374) from renovate/forgejo-monaco-editor-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5374
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-26 07:23:14 +00:00
Renovate Bot
76c6b34270 Update module github.com/minio/minio-go/v7 to v7.0.77 2024-09-26 02:03:56 +00:00
Renovate Bot
7fbe6b4dc3 Update module github.com/klauspost/compress to v1.17.10 2024-09-26 02:03:41 +00:00
Renovate Bot
ed656ca0f3 Update dependency @github/text-expander-element to v2.7.2 2024-09-26 00:05:12 +00:00
Renovate Bot
a9f9b94478 Update citation-js monorepo 2024-09-26 00:04:54 +00:00
Earl Warren
cd7f92797b
start of the v10.0 development branch 2024-09-25 11:11:41 +02:00
Renovate Bot
f0dab9cc05 Update module code.forgejo.org/forgejo/act to v1.21.3 (forgejo) (#5333)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5333
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-25 09:10:00 +00:00
Renovate Bot
68cade5b1d Update dependency @vitejs/plugin-vue to v5.1.4 (forgejo) (#5350)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5350
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-25 09:04:07 +00:00
Renovate Bot
e1566d2a1f Update dependency mermaid to v11.2.1 (forgejo) (#5338)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5338
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-25 09:03:29 +00:00
Renovate Bot
e1a9ad600b Update dependency tailwindcss to v3.4.13 (forgejo) (#5345)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5345
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-25 09:03:00 +00:00
forgejo-renovate-action
db016e0652 Merge pull request 'Update dependency vue to v3.5.7 (forgejo)' (#5364) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-09-25 08:58:38 +00:00
Michael Kriese
6490fc2b99 Merge pull request 'Lock file maintenance (forgejo)' (#5334) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5334
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-25 08:53:48 +00:00
Michael Kriese
1e5f7d2116
chore: fix lint error 2024-09-25 10:15:02 +02:00
Renovate Bot
69b01eb911
Lock file maintenance 2024-09-25 10:15:02 +02:00
Renovate Bot
c2797ecfc1 Update dependency vue to v3.5.8 2024-09-25 08:03:04 +00:00
Earl Warren
9f64769b6d
docs: add link to the v9.0.0 release notes 2024-09-25 09:36:42 +02:00
forgejo-renovate-action
b79e465092 Merge pull request 'Replace dependency eslint-plugin-vitest with @vitest/eslint-plugin 1.0.0 (forgejo)' (#5377) from renovate/forgejo-eslint-plugin-vitest-replacement into forgejo 2024-09-25 07:16:17 +00:00
Michael Kriese
a8f141f6d1
chore: migrate eslint config 2024-09-25 08:34:57 +02:00
Renovate Bot
c54ebb8bc7 Replace dependency eslint-plugin-vitest with @vitest/eslint-plugin 1.0.0 2024-09-24 22:02:34 +00:00
Otto
8b62d3d5da Merge pull request 'i18n: UX improvements: Team permissions and issue closing' (#5383) from fnetx/team-permissions-i18n into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5383
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-09-24 21:16:40 +00:00
Earl Warren
1b528a7874 Merge pull request 'feat(ui): add more emoji and code block rendering in issues' (#4541) from bramh/forgejo:consistent-title-formatting into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4541
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-24 20:47:26 +00:00
Otto Richter
dc9a268d3c i18n: UX improvements: Team permissions and issue closing
Change word order for issue comment actions
-  An attempt to address https://codeberg.org/forgejo/forgejo/issues/2650

Org team permissions improvements

- consistency: added missing dot
- clarity: explain what external units mean
- use dedicated keys to explain the permissions.
- split in read/write permissions
- use explicit labels for accessibility
- ext_wiki.desc and ext_issues.desc are no longer in use.
2024-09-24 19:03:30 +02:00
Bram Hagens
4a74113dee
feat(ui): add more emoji and code block rendering in issues 2024-09-24 14:20:33 +02:00
forgejo-renovate-action
60bcdc8bc3 Merge pull request 'Update renovate to v38.93.1 (forgejo)' (#5373) from renovate/forgejo-renovate into forgejo 2024-09-23 06:42:04 +00:00
Renovate Bot
15ec27e658 Update renovate to v38.93.2 2024-09-23 02:02:04 +00:00
Renovate Bot
ed6fef9844 Update dependency monaco-editor to v0.51.0 2024-09-23 00:04:43 +00:00
Exploding Dragon
a6508f5b03 Fix: database not updated when using git push --tags --force (#5319)
Closes #4274

link: https://github.com/go-gitea/gitea/pull/32040

### Release notes

- [ ] I do not want this change to show in the release notes.

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/5319): <!--number 5319 --><!--line 0 --><!--description Rml4OiBkYXRhYmFzZSBub3QgdXBkYXRlZCB3aGVuIHVzaW5nIGBnaXQgcHVzaCAtLXRhZ3MgLS1mb3JjZWA=-->Fix: database not updated when using `git push --tags --force`<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5319
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-09-22 07:35:25 +00:00
hiifong
9d5f409a5a
Lazy load avatar images (#32051)
(cherry picked from commit f38e1014483b84f4541ffb354cd5dfdd7e000e2c)
2024-09-22 09:11:06 +02:00
KN4CK3R
0cafec4c7a
Do not escape relative path in RPM primary index (#32038)
Fixes #32021

Do not escape the relative path.

(cherry picked from commit f528df944bb9436afcb9272add2ee0cccefbdb55)
2024-09-22 09:07:45 +02:00
Zettat123
961766744b
Check if the due_date is nil when editing issues (#32035)
(cherry picked from commit 3a51c37672d2fbad1f222922e75ce704d5a1ac71)
2024-09-22 09:05:15 +02:00
forgejo-renovate-action
565084925a Merge pull request 'Update dependency @stoplight/spectral-cli to v6.13.1 (forgejo)' (#5368) from renovate/forgejo-stoplight-spectral-cli-6.x into forgejo 2024-09-22 06:40:45 +00:00
Renovate Bot
6745603edd Update dependency @stoplight/spectral-cli to v6.13.1 2024-09-22 00:02:33 +00:00
Earl Warren
e806a6efae Merge pull request 'Update module connectrpc.com/connect to v1.17.0 (forgejo)' (#5365) from renovate/forgejo-connectrpc.com-connect-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5365
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-21 06:27:43 +00:00
forgejo-renovate-action
c071848aa6 Merge pull request 'Update dependency eslint to v8.57.1 (forgejo)' (#5337) from renovate/forgejo-linters into forgejo 2024-09-21 06:24:08 +00:00
forgejo-renovate-action
56d5d3df3e Merge pull request 'Update dependency @playwright/test to v1.47.2 (forgejo)' (#5363) from renovate/forgejo-playwright-monorepo into forgejo 2024-09-21 06:23:39 +00:00
Renovate Bot
e1ee45ee85 Update module connectrpc.com/connect to v1.17.0 2024-09-21 02:02:43 +00:00
Renovate Bot
fad920940f Update dependency eslint to v8.57.1 2024-09-21 00:02:47 +00:00
Renovate Bot
74383be05e Update dependency @playwright/test to v1.47.2 2024-09-21 00:02:32 +00:00
Earl Warren
9c504be9ee Merge pull request '[gitea] week 2024-38 cherry pick (gitea/main -> forgejo) (release notes)' (#5359) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5359
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-20 22:01:20 +00:00
Earl Warren
4aab2a5c8e
[gitea] week 2024-38 cherry pick (gitea/main -> forgejo) (release notes) 2024-09-20 07:11:08 +02:00
Earl Warren
64d3fcd403 Merge pull request '[gitea] week 2024-38 cherry pick (gitea/main -> forgejo)' (#5325) from algernon/wcp/2024-38 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5325
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-20 05:06:42 +00:00
Earl Warren
712d78984c Merge pull request 'chore(renovate): disable renovate self-updates on release branches' (#5335) from viceice/forgejo:chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5335
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-20 04:07:02 +00:00
0ko
d7aa109dc6 chore: remove some Windows-specific files 2024-09-19 20:39:55 +05:00
Renovate Bot
b4e88cb0b7 Update dependency vue to v3.5.6 (forgejo) (#5339)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5339
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-19 08:44:10 +00:00
Codeberg Translate
6d57cbe5c8 i18n: update of translations from Codeberg Translate (#5309)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/5309): <!--number 5309 --><!--line 0 --><!--description aTE4bjogdXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIENvZGViZXJnIFRyYW5zbGF0ZQ==-->i18n: update of translations from Codeberg Translate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: aleksi <aleksi@users.noreply.translate.codeberg.org>
Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
Co-authored-by: toasterbirb <toasterbirb@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5309
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-09-19 06:08:33 +00:00
Otto
a0c11f58dd Merge pull request 'Fix milestone assignment in new issue' (#5180) from esainane/forgejo:five-hundred-more into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5180
Reviewed-by: Otto <otto@codeberg.org>
2024-09-17 16:50:42 +00:00
Otto
652c2ee49b Merge pull request 'ui: Improve commit graph layout' (#5214) from 0ko/forgejo:ui-graph-layout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5214
Reviewed-by: Otto <otto@codeberg.org>
2024-09-17 16:50:31 +00:00
Sai Nane
1e54e211ca Fix milestone assignment in New Issue
Avoids the use of HTMX on milestone assignment within a New Issue form.

The New Issue form doesn't have an issue ID to send to a milestone change URL,
which the backend expects in order to construct a proper reply. The frontend
template was also not built to use the new HTMX response. This resulted in a
backend error and a large warning whenever anyone tried to set a milestone
from within the New Issue form (new pull requests were also affected), rather
than from a View Issue page.

This introduces a new parameter into the `issue/milestone/select_menu`
template, "NewIssuePage".

When unset, the template produces the same results as before. Selection uses
`hx-post` to notify the server immediately, using the updated htmx fragment
from the reply.

When set to a truthy value, the old style of form is used. Selection uses
`data-id` and `data-href` to update the selected milestone locally, via
`selectItem` in `repo-legacy.js`, recreating the selected element and updating
the hidden form value.

Fixes #5176.
2024-09-17 17:45:02 +02:00
Sai Nane
b42ca2ed0c Revert repo-legacy.js to pre-#4542
The New Issue form should not use the new HTMX system. This first requires
we restore the ability to locally assign the milestone ID.
2024-09-17 17:45:02 +02:00
Sai Nane
7f02f4722c Test: Milestone assignment in new issue
This test currently fails, as expected, given this functionality is currently
broken.
2024-09-17 17:45:02 +02:00
0ko
dbe2846e3b ui: improve commit graph layout 2024-09-17 17:33:00 +02:00
Otto Richter
61314f05fc tests(e2e): Test overflow in commit graph 2024-09-17 17:33:00 +02:00
Radosław Piliszek
cd62d0f5e8 git-grep: add comments on highlighting support 2024-09-16 16:20:55 +02:00
Shiny Nematoda
9c70c7a8ea test(code-search): fix oops 2024-09-16 16:20:55 +02:00
Radosław Piliszek
a98cf0e68e code-search: make linters happy again 2024-09-16 16:20:55 +02:00
Radosław Piliszek
d2efdda911 ui(code-search): fix to use CodeSearchMode
Drop unused IsFuzzy and IsRegExp
2024-09-16 16:20:55 +02:00
Radosław Piliszek
7068456d20 noop(ui): remove some unused CodeIndexerDisabled 2024-09-16 16:20:55 +02:00
Shiny Nematoda
30d07c3ba3 test(code-search): add for options dropdown 2024-09-16 16:20:55 +02:00
Shiny Nematoda
663e957d3d ui(git-grep): expose regexp mode in dropdown 2024-09-16 16:20:55 +02:00
Radosław Piliszek
6d6116857c git-grep: support regexp 2024-09-16 16:20:40 +02:00
Michael Kriese
cfbcd7f60f
chore(renovate): disable renovate self-updates on release branches 2024-09-16 08:39:26 +02:00
forgejo-renovate-action
0ccefbebfc Merge pull request 'Update renovate to v38.80.0 (forgejo)' (#5332) from renovate/forgejo-renovate into forgejo 2024-09-16 03:42:22 +00:00
Renovate Bot
4cff39c4d9 Update renovate to v38.80.0 2024-09-16 00:02:10 +00:00
Michael Kriese
8f501b6b1a Merge pull request 'Update dependency postcss to v8.4.47 (forgejo)' (#5327) from renovate/forgejo-postcss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5327
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-15 13:50:22 +00:00
Otto
1ca29a7db8 Merge pull request 'tests(e2e): long search result overflow' (#5326) from fnetx/e2e-wiki-overflow into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5326
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-09-15 11:08:36 +00:00
Renovate Bot
94ec8a25bc Update dependency postcss to v8.4.47 2024-09-15 00:02:14 +00:00
Otto Richter
804ca6590f tests(e2e): long search result overflow
Test fails before https://codeberg.org/forgejo/forgejo/pulls/5260
2024-09-14 22:28:24 +02:00
Otto
d78598ef0d Merge pull request 'ui: wiki/code search fixes' (#5260) from snematoda/search-ui-fix into forgejo
closes forgejo/forgejo#5259 (leftover arrowhead in Safari)
Fixes long results in wiki search overflowing the page

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5260
Reviewed-by: Otto <otto@codeberg.org>
2024-09-14 19:38:35 +00:00
forgejo-renovate-action
07a1328671 Merge pull request 'Update dependency @stoplight/spectral-cli to v6.12.0 (forgejo)' (#5313) from renovate/forgejo-stoplight-spectral-cli-6.x into forgejo 2024-09-14 19:08:46 +00:00
Otto
f93d8e8a45 Merge pull request 'docs(e2e): Add parametric viewport example test' (#5322) from fnetx/e2e-example into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5322
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-14 19:05:47 +00:00
forgejo-renovate-action
1f91664e82 Merge pull request 'Update dependency vue to v3.5.5 (forgejo)' (#5318) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-09-14 18:59:02 +00:00
Gergely Nagy
cd87c4fee6
[DEADCODE] update
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-09-14 18:58:51 +02:00
Kemal Zebari
eb765dabfd
Handle invalid target when creating releases using API (#31841)
A 500 status code was thrown when passing a non-existent target to the
create release API. This snapshot handles this error and instead throws
a 404 status code.

Discovered while working on #31840.

(cherry picked from commit f05d9c98c4cb95e3a8a71bf3e2f8f4529e09f96f)
2024-09-14 18:45:18 +02:00
Daniel
5c7b85a981
Failed authentications are logged to level Warning (#32016)
PR for issue #31968
Replaces PR #31983 to comply with gitea's error definition

Failed authentications are now logged to level `Warning` instead of
`Info`.

(cherry picked from commit 64298dcb9e72a5a87a4680563d91fae5b90e0160)
2024-09-14 17:55:25 +02:00
charles-plutohealth
5af168fb92
Fix /repos/{owner}/{repo}/pulls/{index}/files endpoint not populating previous_filename (#32017)
---
`status == "rename"` should have read `status == "renamed"`. The typo
means that file.PreviousFilename would never be populated, which e.g.
breaks usage of the Github Action at
https://github.com/dorny/paths-filter.

(cherry picked from commit 7c6edf1ba06d4c3269eaa78f4039c9123b006c51)
2024-09-14 17:53:55 +02:00
Jason Song
2da0ebbd23
Support allowed hosts for migrations to work with proxy (#32025)
(cherry picked from commit 125679f2e14cdc8a26a147f7e8fd0e5f174fb5cb)
2024-09-14 17:52:54 +02:00
Jason Song
5b1990b3b2
Increase cacheContextLifetime to reduce false reports (#32011)
Replace #32001.

To prevent the context cache from being misused for long-term work
(which would result in using invalid cache without awareness), the
context cache is designed to exist for a maximum of 10 seconds. This
leads to many false reports, especially in the case of slow SQL.

This PR increases it to 5 minutes to reduce false reports.

5 minutes is not a very safe value, as a lot of changes may have
occurred within that time frame. However, as far as I know, there has
not been a case of misuse of context cache discovered so far, so I think
5 minutes should be OK.

Please note that after this PR, if warning logs are found again, it
should get attention, at that time it can be almost 100% certain that it
is a misuse.

(cherry picked from commit a323a82ec4bde6ae39b97200439829bf67c0d31e)
2024-09-14 17:09:03 +02:00
GiteaBot
af3fbb397a
[skip ci] Updated licenses and gitignores
(cherry picked from commit 972eae358db0c20bda23833ca94b4324d6d343cb)
2024-09-14 17:05:52 +02:00
Shiny Nematoda
5365ca76ce ui(code-search): webkit hack to hide marker for summary tags
closes forgejo/forgejo#5259
2024-09-14 14:22:13 +00:00
Shiny Nematoda
0a30f00263 ui(wiki): fix search result overflow for long lines 2024-09-14 14:22:01 +00:00
Otto Richter
ef473d34f5 docs(e2e): Add parametric viewport example test 2024-09-14 12:49:57 +02:00
Renovate Bot
191d4963ce Update dependency @stoplight/spectral-cli to v6.13.0 2024-09-14 10:02:26 +00:00
Renovate Bot
23602e5d9e Update dependency vue to v3.5.5 2024-09-14 10:02:19 +00:00
Earl Warren
48e05710ae Merge pull request 'Update dependency mermaid to v11.2.0 (forgejo)' (#5205) from renovate/forgejo-mermaid-11.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5205
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-14 09:40:36 +00:00
Earl Warren
796780c1ef Merge pull request 'chore(build): use a stable mirror for go-libravatar' (#5321) from earl-warren/forgejo:wip-go-libravatar into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5321
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-14 09:31:49 +00:00
Earl Warren
57a09fb9cd
chore(release-notes): Update dependency mermaid v11.2.0 2024-09-14 10:55:08 +02:00
Renovate Bot
e18beb89d9 Update dependency mermaid to v11.2.0 2024-09-14 08:02:03 +00:00
Earl Warren
a05eae5615
chore(build): use a stable mirror for go-libravatar
It is not actively maintained and
https://strk.kbt.io/git/go-libravatar.git may be unavailable at
times.

Instead of using the GitLab mirror, setup a mirror in Forgejo space,
where it is under the control of Forgejo contributors.

Fixes: https://codeberg.org/forgejo/forgejo/issues/5320
2024-09-14 09:58:49 +02:00
forgejo-renovate-action
dae4c5ff09 Merge pull request 'Update vitest monorepo to v2.1.0 (forgejo)' (#5314) from renovate/forgejo-vitest-monorepo into forgejo 2024-09-14 07:04:35 +00:00
Renovate Bot
b341ffd2f4 Update vitest monorepo to v2.1.1 2024-09-14 06:03:27 +00:00
forgejo-renovate-action
6d41a0fd7e Merge pull request 'Update dependency @playwright/test to v1.47.1 (forgejo)' (#5317) from renovate/forgejo-playwright-monorepo into forgejo 2024-09-14 05:21:21 +00:00
Renovate Bot
a364a2de71 Update dependency @playwright/test to v1.47.1 2024-09-14 00:02:17 +00:00
Shiny Nematoda
14abf65269 feat: set created_by as the default filter for /issues and /pulls (#5286)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5286
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-09-13 12:55:39 +00:00
Gusted
a23ba1c6ac Merge pull request 'Update code.forgejo.org/go-chi/cache digest to dcb08fb (forgejo)' (#5312) from renovate/forgejo-code.forgejo.org-go-chi-cache-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5312
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-13 09:48:32 +00:00
Renovate Bot
0c67711f9f Update code.forgejo.org/go-chi/cache digest to dcb08fb 2024-09-13 00:02:08 +00:00
forgejo-renovate-action
26293797cb Merge pull request 'Update renovate to v38.77.2 (forgejo)' (#5308) from renovate/forgejo-renovate into forgejo 2024-09-12 21:14:57 +00:00
Renovate Bot
6e02a6b422 Update renovate to v38.77.2 2024-09-12 16:02:09 +00:00
0ko
6c448ae37e fix(email): add missing string for password reset email (#5305)
Fixes https://codeberg.org/forgejo/forgejo/issues/5293.

`mail.reset_password.text` has been deleted unintentionally in 4383da91bd (diff-05e7a0ff464b6cb2ab45b456433c872221d1f06a), however, it is still used in email template: fbbaecf25a/templates/mail/auth/reset_passwd.tmpl (L11)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5305
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-09-12 15:13:15 +00:00
0ko
aa35ae1393 Merge pull request 'Port of gitea#31950 and gitea#31973 rebased' (#5306) from 0ko/forgejo:i18n-5273-rebase into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5306
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-12 15:08:01 +00:00
Gusted
cb748567e1 Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.16.2 (forgejo)' (#5275) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5275
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-12 13:50:08 +00:00
0ko
3f48625560 i18n(*): fix placeholders in dashboard.new_version_hint 2024-09-12 17:52:46 +05:00
Gergely Nagy
d3417688d6 Remove URLs from translations, part two
Followup to gitea#31950, replacing URLs in translations with
placeholders, for all languages

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-09-12 17:33:30 +05:00
Otto Richter
5bf0af1aaf tests(e2e): Refactor branch protection test
- ensuring the afterEach hook runs should reduce flakiness and allow retries
- the hook cleans up a rule if it exists or does nothing if not
2024-09-12 14:32:35 +02:00
Gergely Nagy
1c896b94b9 locale: Fix auths.tip.discord in the hu-HU translation
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-09-12 17:29:52 +05:00
Gergely Nagy
b6b5d47dca Remove HTML tags from create branch and tag translations
This is a followup to gitea#31973, and removes the HTML tags for the
rest of the languages too.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-09-12 17:29:52 +05:00
Denys Konovalov
8857da871e Remove urls from translations (#31950)
Part of #27700

Removes all URLs from translation strings to easy up changing them in
the future and to exclude people injecting malicious URLs through
translations. First measure as long as #24402 is out of scope.

(cherry picked from commit 83f37f630246e381eefd650fc2d4b1f3976ea882)
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>

Conflicts:
	- options/locale/locale_en-US.ini
	  Resolved by manually applying the URL->%s changes to our translations.
	- routers/web/admin/hooks.go
	  templates/repo/settings/protected_branch.tmpl
	  templates/status/500.tmpl
	  Manually resolved.
	- templates/repo/settings/webhook/settings.tmpl
	  Applied the change to templates/webhook/shared-settings.tmpl
	  instead

Additional changes: Gitea-specific URLs have been replaced by their
Forgejo counterparts, lifted from the original translation text.
2024-09-12 17:28:58 +05:00
Lunny Xiao
32320bbf32 Remove html tags from create tag and branch translation (#31973)
Follow #31950 and Fix the display bug of #31966 .

This will only fix the English version. I will update all these
translation files in crowdin after this merged so that all the languages
can be fixed.

And all these files should be backported together.

This PR remove the bold effect around the name when creating a new tag
or branch.

(cherry picked from commit a366af4b7a067227386184067e203091923b5b10)
2024-09-12 17:28:58 +05:00
Codeberg Translate
2d3fc00d02 i18n: update of translations from Codeberg Translate (#5231)
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Monti <contact@montidaproot.xyz>
Co-authored-by: muhaaliss <muhaaliss@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: Marco Ciampa <ciampix@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5231
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-09-12 12:26:49 +00:00
Renovate Bot
0564beb98c Update module github.com/buildkite/terminal-to-html/v3 to v3.16.2 2024-09-12 12:02:33 +00:00
Michael Kriese
fbbaecf25a Merge pull request 'Update module github.com/jhillyerd/enmime to v1.3.0 (forgejo)' (#5206) from renovate/forgejo-github.com-jhillyerd-enmime-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5206
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-12 11:49:15 +00:00
Michael Kriese
192a5ea68b Merge pull request 'tests(e2e): Allow running in parallel' (#5288) from fnetx/e2e-parallel into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5288
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 11:48:41 +00:00
Otto
c98996f0d2 Merge pull request 'Improve textarea paste (part of gitea#31948)' (#5269) from algernon/forgejo:gitea/port/31948-partial into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5269
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 11:15:53 +00:00
Michael Kriese
acfa3e3167 Merge pull request 'tests(e2e): use playwright image for dependency caching' (#5297) from fnetx/playwright-cache-image into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5297
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 11:03:26 +00:00
Michael Kriese
978e65d690 Merge pull request 'Update module github.com/xanzy/go-gitlab to v0.109.0 (forgejo)' (#5193) from renovate/forgejo-github.com-xanzy-go-gitlab-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5193
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 11:01:32 +00:00
Gusted
74d12c7973 Merge pull request 'Update module google.golang.org/grpc to v1.66.2 (forgejo)' (#5299) from renovate/forgejo-google.golang.org-grpc-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5299
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 10:37:27 +00:00
Michael Kriese
dcadae9136 Merge pull request 'Update dependency sortablejs to v1.15.3 (forgejo)' (#5200) from renovate/forgejo-sortablejs-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5200
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-12 08:06:05 +00:00
forgejo-renovate-action
e90bebd574 Merge pull request 'Update dependency happy-dom to v15.7.4 (forgejo)' (#5296) from renovate/forgejo-happy-dom-15.x into forgejo 2024-09-12 07:24:14 +00:00
forgejo-renovate-action
c0ccfbba7d Merge pull request 'Update dependency eslint-plugin-github to v5.0.2 (forgejo)' (#5295) from renovate/forgejo-linters into forgejo 2024-09-12 07:23:32 +00:00
Michael Kriese
d2e2b51983 Merge pull request 'Update dependency tailwindcss to v3.4.11 (forgejo)' (#5298) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5298
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-12 07:22:40 +00:00
Renovate Bot
ae5c919785 Update module google.golang.org/grpc to v1.66.2 2024-09-12 02:02:24 +00:00
Renovate Bot
d4082b79fc Update dependency tailwindcss to v3.4.11 2024-09-12 02:01:49 +00:00
Otto Richter
d14b17e08d tests(e2e): use playwright image for dependency caching 2024-09-12 03:16:51 +02:00
Renovate Bot
c7a4f6f94b Update dependency happy-dom to v15.7.4 2024-09-12 00:02:22 +00:00
Renovate Bot
de652e4833 Update dependency eslint-plugin-github to v5.0.2 2024-09-12 00:02:09 +00:00
Otto
742991abca Merge pull request 'Fix bad spacing on new release page' (#5261) from maltejur/forgejo:push-nnnyrrvzlqqy into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5261
Reviewed-by: Otto <otto@codeberg.org>
2024-09-11 22:21:43 +00:00
Otto Richter
3ff15d03f3 tests(e2e): assert URL paste behaviour 2024-09-11 21:44:10 +02:00
Otto Richter
3695f5d096 Parallelize playwright tests
- allow running with multiple workers (tested with up to four workers locally which
  didn't show signs of flakiness)
- prevent race condition with webauthn tests (running them in parallel
  on the same user could prevent another test from logging in)
- fix flakiness on CI action status (Chromium sometimes needs a long
  time to fill the href field, firefox is always faster)

This reverts commit e8585eff5c.
2024-09-11 16:53:51 +02:00
Earl Warren
a46a9ef307 Merge pull request 'Revert "fix: CI: temporarily disable redict tests"' (#5289) from earl-warren/forgejo:wip-redict into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5289
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-11 14:27:14 +00:00
Earl Warren
2f49437608
Revert "fix: CI: temporarily disable redict tests"
This reverts commit 9d306bbec3.
2024-09-11 15:45:07 +02:00
Otto
83e9e9230a Merge pull request 'tests(e2e): remove unnecessary example test' (#5287) from fnetx/e2e-unnecessary into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5287
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-11 13:12:48 +00:00
Otto Richter
e4234fe6ab tests(e2e): remove unnecessary example test
The login behaviour is basically covered in login_user from utils_e2e.js, too.
2024-09-11 14:30:29 +02:00
Otto
a87b351476 Merge pull request 'fix: Migrate scoped GitLab labels as scoped Forgejo labels' (#4978) from mkobel/forgejo:migrate-scoped-gitlab-labels into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4978
Reviewed-by: Otto <otto@codeberg.org>
2024-09-11 11:48:15 +00:00
Otto Richter
a62521f241 New release form semantics
- correctly render labels without help text
- accessibility: fix external release button focus
- accessibility: test form aspects in browser test
2024-09-11 13:30:30 +02:00
Malte Jürgens
28643cc276 Fix bad spacing on new release page 2024-09-11 13:30:30 +02:00
Earl Warren
abd08e6fd8 Merge pull request '[gitea] week 2024-37 cherry pick (gitea/main -> forgejo)' (#5263) from algernon/wcp/2024-37 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5263
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-09-11 10:34:35 +00:00
forgejo-renovate-action
65829c2e3e Merge pull request 'Update dependency vue to v3.5.4 (forgejo)' (#5281) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-09-11 08:34:32 +00:00
Renovate Bot
8c3920d26e Update dependency vue to v3.5.4 2024-09-11 08:01:37 +00:00
Earl Warren
c413aaa5bf Merge pull request 'fix: CI: temporarily disable redict tests' (#5284) from earl-warren/forgejo:wip-redict into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5284
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-11 06:09:56 +00:00
Earl Warren
9d306bbec3
fix: CI: temporarily disable redict tests
Refs: https://codeberg.org/redict/redict-containers/issues/32
2024-09-11 07:33:57 +02:00
forgejo-renovate-action
41f7f3f793 Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.8.0 (forgejo)' (#5277) from renovate/forgejo-linters into forgejo 2024-09-11 04:50:33 +00:00
forgejo-renovate-action
f8eb608a5b Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.61.0 (forgejo)' (#5282) from renovate/forgejo-github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo 2024-09-11 04:47:33 +00:00
forgejo-renovate-action
e159fdfd82 Merge pull request 'Update x/tools to v0.25.0 (forgejo)' (#5283) from renovate/forgejo-xtools into forgejo 2024-09-11 04:42:15 +00:00
Renovate Bot
54f3284faa Update x/tools to v0.25.0 2024-09-11 02:02:38 +00:00
Renovate Bot
0f10e9a72f Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.61.0 2024-09-11 00:02:45 +00:00
Renovate Bot
031914a012 Update dependency @stylistic/eslint-plugin-js to v2.8.0 2024-09-10 16:04:53 +00:00
Shiny Nematoda
6178a46fe2 feat: set fuzzy as default for issue search (#5270)
Closes #5225

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5270
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-09-10 15:57:58 +00:00
Renovate Bot
630595a7f3 Update dependency license-checker-rseidelsohn to v4.4.2 (forgejo) (#5274)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5274
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-10 04:54:38 +00:00
Lunny Xiao
5f312250eb
Use forum.gitea.com instead of old URL (#31989)
(cherry picked from commit a5818470fe62677d8859b590b2d80b98fe23d098)
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>

Conflicts:
	- .github/ISSUE_TEMPLATE/bug-report.yaml
	  .github/ISSUE_TEMPLATE/config.yml
	  .github/ISSUE_TEMPLATE/feature-request.yaml
	  .github/ISSUE_TEMPLATE/ui.bug-report.yaml
	  templates/install.tmpl
      All of these are Gitea-specific. Resolved the conflict by not
      picking their change.
2024-09-09 20:54:47 +02:00
Adam Majer
5f3a2aafdf
Return 404 instead of error when commit not exist (#31977)
Fix #31976

(cherry picked from commit bf7ae0429cdf236510aa6702e499878bc2345a6e)
2024-09-09 20:54:47 +02:00
6543
3c8eb46765
For consistency make repo search sort options case sensitive (#31951)
(cherry picked from commit 19af5344623ba999f418520fad1a3bde77980561)
2024-09-09 20:54:47 +02:00
6543
4098098f00
nix wording nit in todo code comment
(cherry picked from commit c0db47bf9b6eb59d822ad21b7dd8b1d6acd8ad8e)
2024-09-09 20:54:39 +02:00
yp05327
5a0bc35799
Fix sort order for organization home and user profile page (#31921)
Fix #31916

In #30876, `sortOrder` has been changed into a map, but it is only
implemented in explore.
~~But it seems that size sort order has no effect from long long ago,~~
not directly caused by the PR above.

I think it is still caused by #29231.
In #29231, it merged the sort orders from
`templates/explore/repo_search.tmpl` and
`templates/admin/repo/search.tmpl`.
In `templates/admin/repo/search.tmpl`, it contains size sort orders, but
not in `templates/explore/repo_search.tmpl`, which is used in non-admin
pages.
So `order by size` is added from #29231, but the handler was not added.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 661a1e10f7abd3527d2abc027dec936022db9379)
2024-09-09 20:54:39 +02:00
Lunny Xiao
3ad20e27ae
Fix index too many file names bug (#31903)
Try to fix #31884
Fix #28584

(cherry picked from commit 286ede47ad683bf0431e531e82019cd016cc54dd)
2024-09-09 20:54:39 +02:00
Otto
b2ea43b25b Merge pull request 'tests: Improve in-repo documentation' (#5235) from fnetx/testing-docs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5235
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-09-09 12:48:14 +00:00
Otto Richter
0f3ba99ff0 Add detailed instructions for e2e testing
- rewrite parts of and improve README
- simplify repo declaration
- list coverage in workflow path filter
2024-09-09 14:06:10 +02:00
Otto Richter
d06da0d9c6 Update integration test README
and remove outdated chinese version
2024-09-09 14:06:10 +02:00
silverwind
ebd32d626f
Improve textarea paste (part of gitea#31948)
When pasting a URL over another URL, replace the URL instead of creating
a useless `[url](url)`.

(Partially picked from commit 55502265716f000a2c61c98fa093244e1310d97f)

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-09-09 10:04:50 +02:00
Gusted
6149f0de7c Merge pull request 'Update module golang.org/x/oauth2 to v0.23.0 (forgejo)' (#5262) from renovate/forgejo-golang.org-x-oauth2-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5262
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-08 18:43:33 +00:00
Moritz Kobel
7724559a8e migrate scoped gitlab labels as scoped forgejo labels
* fix handling of scoped labels
* change gitlab migration test repo from gitea to forgejo
* rewrite test for new gitlab test_repo, add scoped labels
2024-09-08 09:13:02 +00:00
Otto
864eabebba Merge pull request 'chore: remove extra go-sqlite3 imports' (#5243) from yoctozepto/no-extra-sqlite into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5243
Reviewed-by: Otto <otto@codeberg.org>
2024-09-08 00:20:45 +00:00
Renovate Bot
83229faf3c Update module golang.org/x/oauth2 to v0.23.0 2024-09-08 00:03:07 +00:00
Earl Warren
4e578934ab Merge pull request 'Update code.forgejo.org/go-chi/captcha digest to df43b92 (forgejo)' (#5254) from renovate/forgejo-code.forgejo.org-go-chi-captcha-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5254
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-07 14:31:10 +00:00
Renovate Bot
d6ba3fa90b Update code.forgejo.org/go-chi/captcha digest to df43b92 2024-09-07 10:03:01 +00:00
Earl Warren
fb796afd61 Merge pull request 'Update code.forgejo.org/go-chi/session digest to 557e3de (forgejo)' (#5255) from renovate/forgejo-code.forgejo.org-go-chi-session-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5255
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-07 08:21:10 +00:00
Gusted
0a86d1e843 Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.16.0 (forgejo)' (#5239) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5239
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-07 08:09:09 +00:00
Renovate Bot
35fae7b87d Update module github.com/xanzy/go-gitlab to v0.109.0 2024-09-07 08:02:37 +00:00
forgejo-renovate-action
c67d3a4d29 Merge pull request 'Update module github.com/PuerkitoBio/goquery to v1.10.0 (forgejo)' (#5256) from renovate/forgejo-github.com-puerkitobio-goquery-1.x into forgejo 2024-09-07 05:34:58 +00:00
Renovate Bot
779c0ae60c Update module github.com/PuerkitoBio/goquery to v1.10.0 2024-09-07 02:02:47 +00:00
Renovate Bot
901aa600d3 Update code.forgejo.org/go-chi/session digest to 557e3de 2024-09-07 00:04:00 +00:00
Gusted
912fe49ab3
Construct screen 2024-09-06 20:24:51 +02:00
Earl Warren
cb896ce319 Merge pull request 'docs: add links to the v7.0.9 & v8.0.3 release notes' (#5251) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5251
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-06 12:59:34 +00:00
Earl Warren
4c67b7e535
docs: add links to the v7.0.9 & v8.0.3 release notes 2024-09-06 14:44:43 +02:00
Radosław Piliszek
e4134f0a81 Makefile: support gotestsum
gotestsum [1] is a tool that brings sanity to human-powered
analysis of test results, supporting handy summaries of results
and more.

This implementation allows for the use of `USE_GOTESTSUM=yes`
to switch the implementation from raw `go test` to `gotestsum`.
It also gives general flexibility in choice of go tests runner.

The PREFIX-SUFFIX play is needed for compiled tests and may
be subject to modification depending on the outcome of #5248

[1] https://pkg.go.dev/gotest.tools/gotestsum
2024-09-06 11:54:14 +00:00
Earl Warren
6114356dff Merge pull request 'replace v-html with v-text in branch search inputbox for XSS protection' (#5244) from earl-warren/forgejo:wip-xss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5244
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-06 10:37:06 +00:00
Lunny Xiao
bb8796b3be
fix: replace v-html with v-text in branch search inputbox
Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
(cherry picked from commit 7eef261c3ebf9bfe37fe0dceb51bde9a79bbaf17)
2024-09-06 11:59:11 +02:00
Radosław Piliszek
f0a6ea454f chore: remove extra go-sqlite3 imports
go-sqlite3 is already properly included conditionally within the
`modules/setting` package.
2024-09-06 09:36:08 +00:00
forgejo-renovate-action
ba880c174e Merge pull request 'Update dependency vue to v3.5.1 (forgejo)' (#5227) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-09-06 06:54:06 +00:00
Renovate Bot
cf271dfeb5 Update dependency vue to v3.5.3 2024-09-06 05:18:23 +00:00
Earl Warren
12657eee5a Merge pull request 'Update dependency go to v1.23.1 (forgejo)' (#5233) from renovate/forgejo-patch-golang-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5233
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-06 05:14:57 +00:00
forgejo-renovate-action
116adc2168 Merge pull request 'Update dependency @playwright/test to v1.47.0 (forgejo)' (#5238) from renovate/forgejo-playwright-monorepo into forgejo 2024-09-06 05:13:14 +00:00
forgejo-renovate-action
429e27c759 Merge pull request 'Update module golang.org/x/tools/gopls to v0.16.2 (forgejo)' (#5237) from renovate/forgejo-xtools into forgejo 2024-09-06 05:12:49 +00:00
Renovate Bot
0911ba8646 Update module github.com/buildkite/terminal-to-html/v3 to v3.16.0 2024-09-06 02:02:54 +00:00
Renovate Bot
5b7c1a8c6c Update dependency @playwright/test to v1.47.0 2024-09-06 00:02:58 +00:00
Renovate Bot
eaad11ae8b Update module golang.org/x/tools/gopls to v0.16.2 2024-09-06 00:02:39 +00:00
Renovate Bot
4a08f1a349 Update dependency go to v1.23.1 2024-09-05 16:03:03 +00:00
Michael Kriese
aeb875aa3c Merge pull request 'Update module golang.org/x/image to v0.20.0 (forgejo)' (#5229) from renovate/forgejo-golang.org-x-image-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5229
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-05 08:02:49 +00:00
Michael Kriese
47569fac50
chore: update licenses 2024-09-05 08:36:54 +02:00
Renovate Bot
f41b50d014
Update module golang.org/x/image to v0.20.0 2024-09-05 08:36:54 +02:00
Codeberg Translate
fb4a8b24cc i18n: update of translations from Codeberg Translate (#5182)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/5182): <!--number 5182 --><!--line 0 --><!--description aTE4bjogdXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIENvZGViZXJnIFRyYW5zbGF0ZQ==-->i18n: update of translations from Codeberg Translate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
Co-authored-by: Monti <contact@montidaproot.xyz>
Co-authored-by: sclu1034 <sclu1034@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5182
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-09-05 05:41:41 +00:00
Renovate Bot
45a907d378 Update dependency postcss to v8.4.45 (forgejo) (#5226)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5226
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-05 04:54:55 +00:00
Renovate Bot
287051b0cc Update dependency vue to v3.5.0 (forgejo) (#5218)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5218
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-04 13:56:24 +00:00
Renovate Bot
446b529719 Update dependency postcss to v8.4.44 (forgejo) (#5204)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5204
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-09-04 07:44:26 +00:00
forgejo-renovate-action
0e4ea60bd6 Merge pull request 'Update dependency eslint-plugin-vue to v9.28.0 (forgejo)' (#5217) from renovate/forgejo-linters into forgejo 2024-09-04 07:42:19 +00:00
Renovate Bot
46f563dc4f Update dependency eslint-plugin-vue to v9.28.0 2024-09-04 00:02:20 +00:00
Earl Warren
6d2fa323e0 Merge pull request '[gitea] week 2024-36 cherry pick (gitea/main -> forgejo)' (#5195) from earl-warren/wcp/2024-36 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5195
Reviewed-by: Otto <otto@codeberg.org>
2024-09-03 13:40:14 +00:00
Otto
c2e0ce5674 Merge pull request 'test: assert navigation URLs in release E2E test' (#5167) from solomonv/fix-flaky-e2e into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5167
Reviewed-by: Otto <otto@codeberg.org>
2024-09-03 12:01:23 +00:00
Renovate Bot
66fb4966fa Update module github.com/jhillyerd/enmime to v1.3.0 2024-09-03 00:03:25 +00:00
forgejo-renovate-action
7e7e14706a Merge pull request 'Update dependency happy-dom to v15.7.3 (forgejo)' (#5198) from renovate/forgejo-happy-dom-15.x into forgejo 2024-09-02 09:25:24 +00:00
Renovate Bot
24e513ae9f Update dependency happy-dom to v15.7.3 2024-09-02 06:21:49 +00:00
Earl Warren
4c0b9cf1a5 Merge pull request 'Update renovate to v38.59.2 (forgejo)' (#5197) from renovate/forgejo-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5197
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-02 05:19:17 +00:00
Renovate Bot
1b7c9ffbcb Update dependency sortablejs to v1.15.3 2024-09-02 02:02:55 +00:00
Renovate Bot
d9893ed2b6 Update renovate to v38.59.2 2024-09-02 00:02:39 +00:00
Solomon Victorino
829e661c39 test: assert navigation URLs in release E2E test
- last one waits for release deletion before the next browser run
- disambiguates failures due to error responses
2024-09-01 10:33:29 -06:00
Earl Warren
db268c5ee7
chore(release-notes): weekly cherry-pick week 2024-36 2024-09-01 08:39:30 +02:00
Lunny Xiao
4ee3a150a3
Fix search team (#31923)
Fix #20658

(cherry picked from commit 06c67c6d5a91176fe4b87fc884c96afc7c3597fa)
2024-09-01 08:19:04 +02:00
Zettat123
1751825256
Handle "close" actionable references for manual merges (#31879)
Fix #31743

(cherry picked from commit 725a3ed9ad110f8354303140f527326c64f42dc8)
2024-09-01 08:07:27 +02:00
Earl Warren
4df5d60bcb Merge pull request 'chore: update mock redis client' (#5194) from gusted/forgejo-redis-mock into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5194
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-09-01 06:07:00 +00:00
Gusted
c2e11058bb
chore: update mock redis client
- Follow up of #5173
2024-09-01 05:42:34 +02:00
Gusted
38eab5342d Merge pull request 'Update dependency postcss to v8.4.42 (forgejo)' (#5192) from renovate/forgejo-postcss into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5192
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-09-01 02:49:54 +00:00
forgejo-renovate-action
57aae68930 Merge pull request 'Update dependency happy-dom to v15.7.2 (forgejo)' (#5191) from renovate/forgejo-happy-dom-15.x into forgejo 2024-09-01 02:49:48 +00:00
Renovate Bot
fe07b50377 Update dependency postcss to v8.4.42 2024-09-01 00:03:43 +00:00
Renovate Bot
5303ba8dce Update dependency happy-dom to v15.7.2 2024-09-01 00:03:32 +00:00
Gusted
57a85df30d Merge pull request 'Update module google.golang.org/grpc to v1.66.0 (forgejo)' (#5157) from renovate/forgejo-google.golang.org-grpc-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5157
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-31 23:12:24 +00:00
Gusted
500e0e8602 Merge pull request 'chore: Only implement used API of Redis client' (#5173) from gusted/forgejo-redis-binary-size into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5173
Reviewed-by: Otto <otto@codeberg.org>
2024-08-31 23:08:17 +00:00
Gusted
c71f8abcb1 Merge pull request 'Update dependency license-checker-rseidelsohn to v4.4.1 (forgejo)' (#5185) from renovate/forgejo-license-checker-rseidelsohn-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5185
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-31 23:07:47 +00:00
Renovate Bot
a7eb18783c Update module google.golang.org/grpc to v1.66.0 2024-08-31 22:18:34 +00:00
Gusted
1530d34cff
chore: Fix import 2024-09-01 00:11:09 +02:00
Renovate Bot
de23443ded
Update dependency license-checker-rseidelsohn to v4.4.1 2024-09-01 00:11:07 +02:00
Gusted
919ec88d2d Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.15.0 (forgejo)' (#5186) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5186
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-31 22:10:12 +00:00
forgejo-renovate-action
a350d3ceff Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.7.1 (forgejo)' (#5171) from renovate/forgejo-linters into forgejo 2024-08-31 07:30:57 +00:00
Renovate Bot
6e303dfcc9 Update linters 2024-08-31 06:03:36 +00:00
forgejo-renovate-action
11bd49fe49 Merge pull request 'Update dependency happy-dom to v15.7.0 (forgejo)' (#5184) from renovate/forgejo-happy-dom-15.x into forgejo 2024-08-31 04:27:32 +00:00
Renovate Bot
2eb8b94674 Update module github.com/buildkite/terminal-to-html/v3 to v3.15.0 2024-08-31 02:05:32 +00:00
Renovate Bot
6372a2e97a Update dependency happy-dom to v15.7.0 2024-08-31 02:04:51 +00:00
Gusted
baab1231b4 Merge pull request 'Update module github.com/felixge/fgprof to v0.9.5 (forgejo)' (#5183) from renovate/forgejo-github.com-felixge-fgprof-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5183
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-31 01:31:54 +00:00
Renovate Bot
98e96a2235 Update module github.com/felixge/fgprof to v0.9.5 2024-08-31 00:04:17 +00:00
Otto
3521e44d78 Merge pull request 'Replace create-user in help with user create' (#5175) from esainane/forgejo:tools-of-creation into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5175
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-30 23:02:03 +00:00
Sai Nane
b573e0a621 Replace create-user in help with user create
0086279 replaced most of these. This is the last reference to `create-user`,
which was replaced by `user create` in cb171db.
2024-08-30 10:11:23 +00:00
Earl Warren
293203cb64 Merge pull request 'chore(ci): Cache generated binary across jobs' (#5130) from fnetx/runner-caching into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5130
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-30 05:47:01 +00:00
Gusted
02622a48eb Merge pull request 'Update dependency djlint to v1.35.2 (forgejo)' (#5172) from renovate/forgejo-djlint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5172
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-30 02:56:46 +00:00
Gusted
c69cf81917 Merge pull request 'Update dependency @vitejs/plugin-vue to v5.1.3 (forgejo)' (#5170) from renovate/forgejo-vitejs-plugin-vue-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5170
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-30 02:41:43 +00:00
Gusted
9df10c5ac5
[FEAT] Only implement used API of Redis client
- Currently for the `nosql` module (which simply said provides a manager
for redis clients) returns the
[`redis.UniversalClient`](https://pkg.go.dev/github.com/redis/go-redis/v9#UniversalClient)
interface. The interfaces exposes all available commands.
- In generalm, dead code elimination should be able to take care of not
generating the machine code for methods that aren't being used. However
in this specific case, dead code elimination either is disabled or gives
up on trying because of exhaustive call stack the client by
`GetRedisClient` is used.
- Help the Go compiler by explicitly specifying which methods we use.
This reduces the binary size by ~400KB (397312 bytes). As Go no longer
generate machine code for commands that aren't being used.
- There's a **CAVEAT** with this, if a developer wants to use a new
method that isn't specified, they will have to know about this
hack (by following the definition of existing Redis methods) and add the
method definition from the Redis library to the `RedisClient` interface.
2024-08-30 04:33:15 +02:00
Renovate Bot
f4f5efdea8 Update dependency djlint to v1.35.2 2024-08-30 02:04:02 +00:00
Renovate Bot
4a26254cca Update dependency @vitejs/plugin-vue to v5.1.3 2024-08-30 00:04:23 +00:00
Otto
1004ecd56b Merge pull request 'fix: WIP toggle by reducing max issue title' (#5143) from fnetx/wip-toggle-workaround into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5143
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-29 21:05:35 +00:00
Gusted
38076a44d7 Merge pull request 'Update module github.com/go-webauthn/webauthn to v0.11.2 (forgejo)' (#5147) from renovate/forgejo-github.com-go-webauthn-webauthn-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5147
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-29 20:35:23 +00:00
Gusted
738bbc5cf3 Merge pull request 'fix: arch OptDepends version check and add gzip compression' (#5121) from dragon/forgejo:bugfix-arch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5121
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-29 19:21:11 +00:00
Exploding Dragon
6eb88be6e8 Merge branch 'forgejo' into bugfix-arch 2024-08-29 12:39:16 +00:00
forgejo-renovate-action
4999239cd8 Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.6.5 (forgejo)' (#5164) from renovate/forgejo-patch-linters into forgejo 2024-08-29 11:34:53 +00:00
Renovate Bot
a18b0ba973 Update dependency @stylistic/eslint-plugin-js to v2.6.5 2024-08-29 10:03:41 +00:00
Michael Kriese
91a9d479d5 Merge pull request 'chore(renovate): fix rule matching' (#5163) from viceice/forgejo:chore/renovate/automerge-dev-deps into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5163
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-29 09:14:22 +00:00
Michael Kriese
ebd8c607bb Merge pull request 'Update linters (forgejo)' (#5155) from renovate/forgejo-linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5155
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-29 08:31:45 +00:00
Michael Kriese
b54f15cf8d
chore(renovate): fix rule matching 2024-08-29 10:17:53 +02:00
Gusted
63736e8301
[FEAT] Add support for webauthn credential level 3
- For WebAuthn Credential level 3, the `backup_eligible` and
`backup_state` flags are checked if they are consistent with the values
given on login. Forgejo never stored this data, so add a database
migration that makes all webauthn credentials 'legacy' and on the next
first use capture the values of `backup_eligible` and `backup_state`.
As suggested in https://github.com/go-webauthn/webauthn/discussions/219#discussioncomment-10429662
- Adds unit tests.
- Add E2E test.
2024-08-29 10:05:03 +02:00
Renovate Bot
28c3f1e254
Update module github.com/go-webauthn/webauthn to v0.11.2 2024-08-29 10:05:00 +02:00
Gusted
c87655b7ff Merge pull request '[CHORE] Move cache & captcha library' (#5146) from gusted/forgejo-captcha into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5146
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-29 08:02:09 +00:00
Renovate Bot
d0ec8d574e Update linters 2024-08-29 07:24:19 +00:00
Michael Kriese
6c69b5da03 Merge pull request 'Update dependency djlint to v1.34.2 (forgejo)' (#5154) from renovate/forgejo-djlint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5154
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-29 06:55:47 +00:00
Michael Kriese
8cda274438 Merge pull request 'Update dependency happy-dom to v15.3.1 (forgejo)' (#5156) from renovate/forgejo-happy-dom-15.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5156
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-29 06:36:46 +00:00
Earl Warren
cb62fa81d5 Merge pull request 'docs: add links to the v7.0.8 & v8.0.2 release notes' (#5160) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5160
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-29 05:08:25 +00:00
Codeberg Translate
45198cef64 i18n: update of translations from Codeberg Translate (#5070)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/5070): <!--number 5070 --><!--line 0 --><!--description aTE4bjogdXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIENvZGViZXJnIFRyYW5zbGF0ZQ==-->i18n: update of translations from Codeberg Translate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5070
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-29 04:54:39 +00:00
Earl Warren
ece6300ebd
docs: add links to the v7.0.8 & v8.0.2 release notes 2024-08-29 06:47:26 +02:00
Solomon Victorino
471567b3ba fix: use ValidateEmail as binding across web forms 2024-08-28 22:25:17 -06:00
Renovate Bot
6dbc79f161 Update dependency happy-dom to v15.3.1 2024-08-29 02:03:29 +00:00
Renovate Bot
deb8039d53 Update dependency djlint to v1.34.2 2024-08-29 00:04:07 +00:00
Otto Richter
7eac5feb74 fix: WIP toggle by reducing max issue title
- when the PR title has the maximum length, the WIP toggle switch does nothing
- work around this by slightly reducing the max input size (- 10 characters for eventually long prefixes)
- test WIP toggling edge case in playwright

fix(e2e): increase timeouts

A look at recent runs suggests they should be increased globally. The timeouts in the config file have no timeout by default.
2024-08-29 01:36:58 +02:00
Exploding Dragon
95f6cb7513 Merge branch 'forgejo' into bugfix-arch 2024-08-28 10:48:33 +00:00
Gusted
06d42e6f03 Merge pull request '[SEC] Ensure propagation of API scopes for Conan and Container authentication' (#5149) from gusted/forgejo-api-scope into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5149
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-28 08:43:01 +00:00
Gusted
5a871f6095
[SEC] Ensure propagation of API scopes for Conan and Container authentication
- The Conan and Container packages use a different type of
authentication. It first authenticates via the regular way (api tokens
or user:password, handled via `auth.Basic`) and then generates a JWT
token that is used by the package software (such as Docker) to do the
action they wanted to do. This JWT token didn't properly propagate the
API scopes that the token was generated for, and thus could lead to a
'scope escalation' within the Conan and Container packages, read
access to write access.
- Store the API scope in the JWT token, so it can be propagated on
subsequent calls that uses that JWT token.
- Integration test added.
- Resolves #5128
2024-08-28 10:33:32 +02:00
Exploding Dragon
3a55604d3c Merge branch 'forgejo' into bugfix-arch 2024-08-28 00:38:10 +00:00
Gusted
bf0d100b84
[CHORE] Move cache library
- This is in the spirit of #5090.
- Move to a fork of gitea.com/go-chi/cache,
code.forgejo.org/go-chi/cache. It removes unused code (a lot of
adapters, that can't be used by Forgejo) and unused dependencies (see
go.sum). Also updates existing dependencies.
8c64f1a362..main
2024-08-27 21:28:56 +02:00
Gusted
0404662e99
[CHORE] Move captcha library
- This is a fork of https://github.com/dchest/captcha, as
https://gitea.com/go-chi/captcha is a fork of
github.com/go-macaron/captcha which is a fork (although not properly
credited) of a older version of https://github.com/dchest/captcha. Hence
why I've just forked the original.
- The fork includes some QoL improvements (uses standard library for
determistic RNG instead of rolling your own crypto), and removal of
audio support (500KiB unused data that bloated the binary otherwise).
Flips the image over the x-asis.
47270f2b55..main
- This move is needed for the next commit, because
gitea.com/go-chi/captcha included the gitea.com/go-chi/cache dependency.
2024-08-27 21:28:16 +02:00
Otto
8d0530650e Merge pull request 'Remove 15 unused strings' (#5139) from 0ko/forgejo:i18n-cleanup-15x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5139
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-27 11:06:13 +00:00
Earl Warren
9addaedaf3 Merge pull request '[gitea] week 2024-35 cherry pick (gitea/main -> forgejo)' (#5109) from algernon/wcp/2024-35 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5109
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-27 06:09:19 +00:00
0ko
3c00c60b84 i18n(en): remove 15 unused strings 2024-08-27 10:31:35 +05:00
Exploding Dragon
bc4849a904 Merge branch 'forgejo' into bugfix-arch 2024-08-27 02:34:54 +00:00
dragon
60b54c42ec add zst,xz,gz tests 2024-08-27 10:02:43 +08:00
dragon
97ec997a04 add zst,xz,gz tests 2024-08-27 09:58:08 +08:00
Otto
a8d01a77cb Merge pull request 'fix: correct doctor commands and rename to forgejo' (#5133) from fnetx/fix-doctor-help into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5133
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-27 01:43:21 +00:00
Otto
bf65f1e510 Merge pull request 'feat: Trivial default quota configuration' (#5125) from algernon/forgejo:falling-in-reverse into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5125
Reviewed-by: Otto <otto@codeberg.org>
2024-08-27 01:22:41 +00:00
Otto Richter
94af0e53e5 fix: correct doctor commands and rename to forgejo
The syntax is `doctor check --run` , see https://forgejo.org/docs/latest/admin/command-line/#doctor
2024-08-27 02:40:55 +02:00
Gusted
a9a8973894 Merge pull request 'chore(release-notes): Update module github.com/go-enry/go-enry/v2 to v2.8.9' (#5124) from earl-warren/forgejo:wip-enry into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5124
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-26 22:36:15 +00:00
Otto Richter
72408c7d68 Cache generated binary across jobs
- retrieved by the commit hash
- removes bindata tags from integration tests, because it does not seem
  to be required
- due to the missing automatically generated data, the zstd tests fail
  (they use repo data including node_modules (!) as input to the test,
  there is no apparent reason for the size constants)
2024-08-26 23:43:09 +02:00
Otto
c856f77622 Merge pull request 'Update links affected by the renaming of 'developer' documentation sub-path into 'contributor'' (#5129) from floss4good/forgejo__forgejo:contrib-doc into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5129
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-26 18:50:40 +00:00
Otto
e5ea08b38b Merge pull request 'feat: Improve diffs generated by Forgejo' (#5110) from fnetx/better-diffs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5110
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-26 18:47:21 +00:00
Gusted
d623126103 Merge pull request '[PORT] Refactor the usage of batch catfile (gitea#31754)' (#5122) from gusted/forgejo-port-gt-31754 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5122
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-26 16:04:47 +00:00
floss4good
5879cdc6fa
Update the translator contributing guide from user language settings. 2024-08-26 17:43:35 +03:00
Gusted
58ee9fdc4a feat: Improve diff being generated
Add `DiffCleanupSemantic` into the mix when generated diffs (PR review,
commit view and issue/comment history). This avoids trying to produce a
optimal diff and tries to reduce the amount of edits, by combing them
into larger edits, which is nicer and easier to 'look at'. There's no
need for a perfect minimal diff, as the output isn't being parsed by a
computer, it's parsed by people.

Ref: https://codeberg.org/forgejo/forgejo/issues/4996
2024-08-26 13:58:17 +02:00
Otto Richter
d97e36f6d7 Playwright testing for commit diffs
includes:

- easier repo declaration for playwright tests by @Gusted
- full backend build for pushing Git repos by @Gusted
- playwright testing (which fails with the current diff algorithm, but
  passes with the new)
- disable eslint rule for conditional expect, because it defeats the
  purpose (working around it would result in much more complex test code
  in our cases)
2024-08-26 13:57:42 +02:00
floss4good
018aefe29f
Replace Developer Guide links with the new Contributor Guide one for PR template and release workflows comments. 2024-08-26 14:29:10 +03:00
Gergely Nagy
3b70949651
feat: Trivial default quota configuration
This adds a new configuration setting: `[quota.default].TOTAL`, which
will be used if no groups are configured for a particular user. The new
option makes it possible to entirely skip configuring quotas via the API
if all that one wants is a total size.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-26 13:25:34 +02:00
floss4good
2190b67507
docs: replace Developer Guide link with the new Contributor Guide one. 2024-08-26 13:22:39 +03:00
Earl Warren
190b5a3859 Merge pull request '[FIX] Don't allow SSH authentication without ssh executable' (#5123) from gusted/forgejo-prevent-no-ssh into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5123
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-26 08:03:52 +00:00
Earl Warren
681b5e5113
chore(release-notes): Update module github.com/go-enry/go-enry/v2 to v2.8.9 2024-08-26 09:54:03 +02:00
Earl Warren
e2ae389184 Merge pull request '[CHORE] Move to new sessioner library' (#5090) from gusted/forgejo-sessioner-fork into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5090
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-26 07:31:56 +00:00
Earl Warren
2514ba4e36 Merge pull request '[CHORE] Remove unused exclude' (#5118) from gusted/forgejo-tidy-gomod into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5118
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-26 07:28:52 +00:00
Gusted
1a68d14cf8
[FIX] Don't allow SSH authentication without ssh executable
- Follow up of #4819
- When no `ssh` executable is present, disable the UI and backend bits
that allow the creation of push mirrors that use SSH authentication. As
this feature requires the usage of the `ssh` binary.
- Integration test added.
2024-08-26 08:58:35 +02:00
Gusted
b44dcf553c
[TESTS] Fix usage of LoadRepoCommit
It loads the Commit with a temporary open GitRepo. This is incorrect,
the GitRepo should be open as long as the Commit can be used. This
mainly removes the usage of this function as it's not needed.
2024-08-26 08:03:48 +02:00
Gergely Nagy
4afbeb3cb6
chore(release-notes): weekly cherry-pick week 2024-35
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-26 07:44:20 +02:00
Gusted
a5b51e9145 Merge pull request 'Update renovate to v38.52.3 (forgejo)' (#5119) from renovate/forgejo-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5119
2024-08-26 05:02:21 +00:00
Renovate Bot
fbe464309b Update renovate to v38.52.3 2024-08-26 04:05:34 +00:00
Exploding Dragon
aa34509ab1 Merge branch 'forgejo' into bugfix-arch 2024-08-26 03:16:01 +00:00
dragon
a3ef037ccb clean style and add more tests 2024-08-26 11:13:22 +08:00
Gusted
5541537b1b Merge pull request 'Update module github.com/go-enry/go-enry/v2 to v2.8.9 (forgejo)' (#5120) from renovate/forgejo-github.com-go-enry-go-enry-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5120
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-26 02:53:41 +00:00
Gusted
24bbf051c3
[TESTS] Add test for CatFileBatch(Check) 2024-08-26 04:48:52 +02:00
dragon
600c703ef4 Fix arch OptDepends version check and add gzip compression 2024-08-26 10:45:24 +08:00
Renovate Bot
ec4e648e3a Update module github.com/go-enry/go-enry/v2 to v2.8.9 2024-08-26 02:05:27 +00:00
Lunny Xiao
0ca13c5eae
[PORT] Refactor the usage of batch catfile (gitea#31754)
When opening a repository, it will call `ensureValidRepository` and also
`CatFileBatch`. But sometimes these will not be used until repository
closed. So it's a waste of CPU to invoke 3 times git command for every
open repository.

This PR removed all of these from `OpenRepository` but only kept
checking whether the folder exists. When a batch is necessary, the
necessary functions will be invoked.

---
Conflict resolution: Because of the removal of go-git in (#4941)
`_nogogit.go` files were either renamed or merged into the 'common'
file. Git does handle the renames correctly, but for those that were
merged has to be manually copied pasted over. The patch looks the same,
201 additions 90 deletions as the original patch.

(cherry picked from commit c03baab678ba5b2e9d974aea147e660417f5d3f7)
2024-08-26 03:48:51 +02:00
Gusted
3af7e03aeb
[CHORE] Remove unused exclude
This was introduced in https://github.com/go-gitea/gitea/pull/18311 to
exclude a vulnerable dependency. I am not sure when this happened or
with which dependency update, but this dependency is no longer being
used by another dependency and therefore these `exclude`s are no longer
needed. (Verified via `go mod graph`).
2024-08-26 03:31:07 +02:00
Gusted
cbedd7e5be Merge pull request '[PORT] Enable no-jquery/no-class-state (gitea#31639) & Remove eslint-plugin-jquery (gitea#31402)' (#5107) from gusted/forgejo-port-gt-31402 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5107
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-26 00:01:43 +00:00
Gusted
e726b7ec3b Merge pull request '[SKIP CI] Don't duplicate key' (#5115) from gusted/forgejo-translation-unique-key into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5115
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-25 16:20:22 +00:00
Gusted
5c2445d643
[SKIP CI] Don't duplicate key
- Follow up #4819.
- It introduces a duplicate key, which is wrong. Move to a unique
translation key to avoid conflicts.
2024-08-25 18:07:22 +02:00
Otto
32735b1e61 Merge pull request '[TESTS] Move CreateDeclarativeRepo to more accessible location' (#5108) from gusted/forgejo-chore-declerative-repo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5108
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-25 11:15:22 +00:00
Gergely Nagy
0aa3e6e4e4
tests: Use require.NoError in tests picked from Gitea
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-25 13:02:19 +02:00
Lunny Xiao
ef5ac9a8ee
Use correct function name (#31887)
(cherry picked from commit 0299bb97f038685aee794a992fa4a9f5cf83652e)
2024-08-25 11:56:35 +02:00
william-allspice
79f6f2f62e
Move lock icon position and add additional tooltips to branch list page (#31839)
This Pull Request adds missing tool tips for the protected, copy, and rss icons on the branch list page. It also moved protected icon position after the branch name.

(cherry picked from commit 40036b610224338ff730acb6e182aa8a6ebdb009)
2024-08-25 11:56:35 +02:00
Lunny Xiao
3ade4d9b2b
Don't return 500 if mirror url contains special chars (#31859)
Fix #31640

(cherry picked from commit d158472a5a9ead8052095b153821a9f26c294452)
2024-08-25 11:56:35 +02:00
Lunny Xiao
dda53569b1
Fix agit automerge (#31207)
(cherry picked from commit 8b92eba21f5c5cca277b8101ada0ea7a1fb32ae0)
2024-08-25 10:47:37 +02:00
Rowan Bohde
1b845b2722
add CfTurnstileSitekey context data to all captcha templates (#31874)
In the OpenID flows, the "CfTurnstileSitekey" wasn't populated, which
caused those flows to fail if using Turnstile as the Captcha
implementation.

This adds the missing context variables, allowing Turnstile to be used
in the OpenID flows.

(cherry picked from commit 0d24c9f383255605d68a92cc5f087c3f16a1d735)
2024-08-25 10:47:02 +02:00
Lunny Xiao
bdf477f6ef
Fix actions notify bug (#31866)
Try to fix
https://github.com/go-gitea/gitea/issues/31757#issuecomment-2295131062

(cherry picked from commit 4f5c96627b4622d64593db2d436b1f3befa5f3c3)
2024-08-25 10:41:24 +02:00
Gusted
fc40a5e242
[CHORE] Move to new sessioner library
- Moves to a fork of gitea.com/go-chi/session that removed support for
couchbase (and ledis, but that was never made available in Forgejo)
along with other code improvements.
f8ce677595..main
- The rationale for removing Couchbase is quite simple. Its not licensed
under FOSS
license (https://www.couchbase.com/blog/couchbase-adopts-bsl-license/)
and therefore cannot be tested by Forgejo and shouldn't be supported.
This is a similair vein to the removal of MSSQL
support (https://codeberg.org/forgejo/discussions/issues/122)
- A additional benefit is that this reduces the Forgejo binary by ~600Kb.
2024-08-25 03:47:08 +02:00
Gusted
d34d8ec2cf Merge pull request 'fix: include last line in file previews with no trailing newline' (#5085) from solomonv/fix-previews-without-trailing-eol into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5085
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-25 00:58:14 +00:00
silverwind
98349a1889
[PORT] Enable no-jquery/no-class-state (gitea#31639)
Just 4 validations and I specifically tested this by
selecting/unselecting issue labels.

Co-authored-by: Giteabot <teabot@gitea.io>

---
Clean port. Fixed two additional warnings

(cherry picked from commit 3a7454df7a518f810fbeb34b9d784e7c29d173ff)
2024-08-25 02:57:50 +02:00
Gusted
f78e397dd6
[TESTS] Move CreateDeclarativeRepo to more accessible location
- This allows `CreateDeclarativeRepo` to be used by other testing
packages such as E2EE testing.
- Removes unused function in `services/webhook/sourcehut/builds_test.go`.
2024-08-25 02:54:43 +02:00
Gusted
4f54918381 Merge pull request 'fix(ui): prevent exceptions on other users' repo migration pages' (#4875) from solomonv/forgejo:fix-migration-guest-exception into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4875
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 23:49:20 +00:00
Solomon Victorino
8f53a69c2e fix: include last line in file previews with no trailing newline 2024-08-24 17:10:31 -06:00
silverwind
04cd89709c
[PORT] Remove eslint-plugin-jquery (gitea#31402)
- Remove `eslint-plugin-jquery` as `eslint-plugin-no-jquery` does all it
does and is actually the maintained fork of it.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

---
Modification: Only keep removal of eslint-plugin-jquery

(cherry picked from commit 17baf1af10de025a47ade1f16f1e5c51646d7fcf)
2024-08-25 00:48:47 +02:00
Gusted
78e4736db6 Merge pull request '[BUG] First user created through reverse proxy should be admin' (#4549) from gusted/forgejo-reverseproxy-admin into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4549
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Radosław Piliszek <radek@piliszek.it>
2024-08-24 22:45:32 +00:00
Gusted
1cab8788c8 Merge pull request 'Update dependency eslint-plugin-unicorn to v55 (forgejo)' (#5098) from renovate/forgejo-eslint-plugin-unicorn-55.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5098
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 22:40:27 +00:00
Gusted
a611ad3536 Merge pull request 'Update dependency mermaid to v11 (forgejo)' (#5100) from renovate/forgejo-mermaid-11.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5100
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 21:34:08 +00:00
Gusted
b061a14e15
[PORT] Unicorn eslint plugins configs
Ported from https://github.com/go-gitea/gitea/pull/31766 &
https://github.com/go-gitea/gitea/pull/31402 & https://github.com/go-gitea/gitea/pull/30840
2024-08-24 22:31:34 +02:00
Renovate Bot
9272425bab
Update dependency eslint-plugin-unicorn to v55 2024-08-24 22:31:33 +02:00
Gusted
4575b58da3
[CHORE] Remove elkjs hack 2024-08-24 22:13:32 +02:00
Renovate Bot
ed29b9e423 Update dependency mermaid to v11 2024-08-24 20:02:22 +00:00
Gusted
a72be741d4 Merge pull request 'Update module github.com/google/go-github/v63 to v64 (forgejo)' (#5101) from renovate/forgejo-github.com-google-go-github-v63-64.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5101
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 18:43:11 +00:00
Gusted
696cbde942 Merge pull request 'Update dependency happy-dom to v15 (forgejo)' (#5099) from renovate/forgejo-happy-dom-15.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5099
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 17:47:52 +00:00
Gusted
8583ffa598 Merge pull request 'Update dependency eslint-plugin-sonarjs to v2 (forgejo)' (#5097) from renovate/forgejo-eslint-plugin-sonarjs-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5097
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 17:37:23 +00:00
Gusted
bef1c643b6 Merge pull request 'Update dependency eslint-plugin-github to v5 (forgejo)' (#5096) from renovate/forgejo-eslint-plugin-github-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5096
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 17:37:08 +00:00
Gusted
5dbacb70f4 Merge pull request 'Allow pushmirror to use publickey authentication' (#4819) from ironmagma/forgejo:publickey-auth-push-mirror into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4819
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-24 16:53:56 +00:00
Gusted
931a6f16dc
[CHORE] Fix go-licenses 2024-08-24 18:34:28 +02:00
Renovate Bot
c111730d08 Update module github.com/google/go-github/v63 to v64 2024-08-24 16:05:36 +00:00
Renovate Bot
cec6b0041a Update dependency happy-dom to v15 2024-08-24 16:04:36 +00:00
Renovate Bot
f0482675dd Update dependency eslint-plugin-sonarjs to v2 2024-08-24 16:04:06 +00:00
Renovate Bot
2129bf04a1 Update dependency eslint-plugin-github to v5 2024-08-24 16:03:51 +00:00
Gusted
eb25bc9edb Merge pull request 'fix: Do not scan all Go files for tailwind classes' (#5092) from fnetx/tailwind into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5092
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 14:59:00 +00:00
Otto Richter
85a0f1df1c fix: Do not scan all Go files for tailwind classes
Reduces some noise in the index.css file and adds a comment why it was done in the first place.
2024-08-24 15:45:50 +02:00
Earl Warren
2117aeabca Merge pull request 'Update module code.forgejo.org/forgejo/act to v1.21.2 (forgejo)' (#5087) from renovate/forgejo-code.forgejo.org-forgejo-act-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5087
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-24 05:38:09 +00:00
Gusted
dc6bd5c697 Merge pull request 'Update dependency webpack to v5.94.0 (forgejo)' (#5088) from renovate/forgejo-webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5088
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 02:55:19 +00:00
Gusted
793dcfed34 Merge pull request 'Update dependency @github/relative-time-element to v4.4.3 (forgejo)' (#5086) from renovate/forgejo-github-relative-time-element-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5086
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-24 02:07:53 +00:00
Renovate Bot
ffdfe8817c Update dependency webpack to v5.94.0 2024-08-24 02:03:09 +00:00
Renovate Bot
ae8a692d8b Update module code.forgejo.org/forgejo/act to v1.21.2 2024-08-24 00:04:15 +00:00
Renovate Bot
276df16488 Update dependency @github/relative-time-element to v4.4.3 2024-08-24 00:03:36 +00:00
Gusted
904e1239a8 Merge pull request 'fix: improve the display of PR & issue short links' (#5075) from solomonv/pr-short-link-text-fixes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5075
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-23 21:30:04 +00:00
Earl Warren
e5edd6ff8b Merge pull request 'chore(license): clarify the API swagger file is and stays MIT (take 2)' (#5084) from earl-warren/forgejo:wip-gpl into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5084
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-23 18:07:03 +00:00
Otto
66d06c2b8b Merge pull request 'feat(i18n): Heading for new branch rule, colon consistency' (#4993) from fnetx/branchprotection-fixes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4993
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-23 17:29:20 +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
Earl Warren
53187cd5e9 Merge pull request 'chore(license): clarify the API swagger file is and stays MIT' (#5083) from earl-warren/forgejo:wip-gpl into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5083
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-23 16:26:06 +00:00
Earl Warren
5e923cfbdd
chore(license): clarify the API swagger file is and stays MIT
It is not an original work and enforcing copyright on that file would
probably be difficult. To clarify that the intent of the Forgejo
authors is that it is used for interoperability with no restriction,
explicitly release it under MIT and display the intent in the swagger
web page.

There is a contradiction in claiming it is under MIT while claiming
copyright is unlikely to be enforceable, but it efficiently conveys
the intention.
2024-08-23 17:40:33 +02:00
Michael Kriese
27de894a6d Merge pull request 'chore(renovate): move settings to shared go preset' (#5066) from viceice/forgejo:chore/renovate/moved-settings into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5066
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-23 09:59:06 +00:00
Michael Kriese
9c0c3260ad
chore(renovate): use shared preset 2024-08-23 11:17:36 +02:00
Earl Warren
26ab592fc7 Merge pull request 'chore(release-notes): workflow_dispatch parsing error fix' (#5081) from earl-warren/forgejo:wip-act-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5081
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-23 07:04:28 +00:00
Earl Warren
d2200eea25
chore(release-notes): workflow_dispatch parsing error fix 2024-08-23 08:37:00 +02:00
Earl Warren
fde934787a Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.3 (forgejo)' (#5079) from renovate/forgejo-github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5079
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-23 05:39:55 +00: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
Gusted
9ee358aa47 Merge pull request 'Update github.com/dsnet/compress digest to v0.0.2-0.20210315054119-f66993602bf5 (forgejo)' (#5077) from renovate/forgejo-github.com-dsnet-compress-digest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5077
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-23 00:52:56 +00:00
Renovate Bot
e87c9252d9 Update github.com/dsnet/compress digest to v0.0.2-0.20210315054119-f66993602bf5 2024-08-23 00:04:23 +00:00
Solomon Victorino
22f012a859 fix: improve PR/issue short link display text
- include subpaths
- don't append "(comment)" for unrelated hash/query strings
2024-08-22 15:49:05 -06:00
Otto
0c02a61319 Merge pull request '[CHORE] Proper chunking for swagger' (#5056) from gusted/forgejo-chunking into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5056
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-22 21:13:19 +00:00
Gusted
50a2bee7d3 Merge pull request 'Update module github.com/meilisearch/meilisearch-go to v0.28.0 (forgejo)' (#5058) from renovate/forgejo-github.com-meilisearch-meilisearch-go-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5058
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-22 20:51:33 +00:00
Otto
2f272d961b Merge pull request 'Remove rule breaking headers in inline file preview' (#5072) from 0ko/forgejo:ui-reivew-inline-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5072
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-22 20:12:08 +00:00
Otto Richter
00276dfc30 feat(i18n): Branch protection improvements
- adds a header to indicate creating a new rule
  - test that header is different between new and edit form
- consistently avoids colons in the form
- excludes some accessibility checks that require a global solution for
  forms
2024-08-22 22:05:12 +02:00
Shiny Nematoda
d48b936126 fix: breaking changes with meili (#5073)
resolves breaking changes introduced in #5058

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5073
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-08-22 19:38:00 +00:00
0ko
b95519355c ui: pr diff: remove rule breaking headers 2024-08-22 22:25:02 +05:00
Earl Warren
3bbd129270 Merge pull request 'Reintroduce tests of updated pull request icons' (#4598) from bramh/forgejo:update-pr-icons into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4598
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-22 16:54:28 +00:00
Earl Warren
ea07560161 Merge pull request 'chore(dependency): use forgejo/act instead of gitea/act' (#5065) from earl-warren/forgejo:wip-act-dispatch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5065
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-22 15:49:22 +00:00
Bram Hagens
7f62acb4d9 ui: fix go to citation button url (#4597)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4597
Reviewed-by: Ghost <twenty-panda@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Bram Hagens <bram@bramh.me>
Co-committed-by: Bram Hagens <bram@bramh.me>
2024-08-22 15:36:12 +00:00
Bram Hagens
d39c8fec8c
ui: update pull request icons
Added a new icon for closed PRs (similar to GitHub, GitLab, etc),
Fixes https://codeberg.org/forgejo/forgejo/issues/4454.

Before:
- https://codeberg.org/attachments/b17c5846-506f-4b32-97c9-03f31c5ff758
- https://codeberg.org/attachments/babcd011-d340-4a9e-94db-ea17ef6d3c2b
- https://codeberg.org/attachments/dbca009a-413e-48ab-84b1-55ad7f4fcd3d

After:
- https://codeberg.org/attachments/3e161f7b-4172-4a8c-a8eb-54bcf81c0cae
- https://codeberg.org/attachments/0c308f7e-25a0-49a3-9c86-1b1f9ab39467
- https://codeberg.org/attachments/b982b6b8-c78a-4332-8269-50d01de834e0

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4455
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Bram Hagens <bram@bramh.me>
Co-committed-by: Bram Hagens <bram@bramh.me>
2024-08-22 17:06:10 +02:00
Philip Peterson
03508b33a8
[FEAT] Allow pushmirror to use publickey authentication
- Continuation of https://github.com/go-gitea/gitea/pull/18835 (by
@Gusted, so it's fine to change copyright holder to Forgejo).
- Add the option to use SSH for push mirrors, this would allow for the
deploy keys feature to be used and not require tokens to be used which
cannot be limited to a specific repository. The private key is stored
encrypted (via the `keying` module) on the database and NEVER given to
the user, to avoid accidental exposure and misuse.
- CAVEAT: This does require the `ssh` binary to be present, which may
not be available in containerized environments, this could be solved by
adding a SSH client into forgejo itself and use the forgejo binary as
SSH command, but should be done in another PR.
- CAVEAT: Mirroring of LFS content is not supported, this would require
the previous stated problem to be solved due to LFS authentication (an
attempt was made at forgejo/forgejo#2544).
- Integration test added.
- Resolves #4416
2024-08-22 17:05:07 +02:00
Earl Warren
41d13ee44b
chore(dependency): use forgejo/act instead of gitea/act
The subset of ACT used by Forgejo was the same as Gitea until
https://code.forgejo.org/forgejo/act/pulls/45. Since it is now
different, use the Forgejo soft-fork instead of the Gitea soft-fork.

Refs: https://codeberg.org/forgejo/forgejo/issues/4789
2024-08-22 16:31:00 +02:00
Gusted
9eb22ddc19
[CHORE] Proper chunking for swagger
- Tell webpack to chunk the swagger-ui dependency, so it can be re-used for the
forgejo-swagger.js and swagger.js files (these two files are two
seperate javascript files in the output).
- This saves off 400KB when Forgejo is built with the `bindata` build
tag.
2024-08-22 15:48:05 +02:00
Earl Warren
b670f111ff Merge pull request 'cron task to cleanup dangling container images with version sha256:*' (#4698) from earl-warren/forgejo:wip-container-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4698
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-22 08:09:19 +00:00
Earl Warren
801ae21200 Merge pull request 'Forgejo v9.0 is GPLv3+' (#4737) from earl-warren/forgejo:wip-pr-4684 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4737
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-22 08:07:58 +00:00
Earl Warren
f19f31ac73
cron task to cleanup dangling container images with version sha256:*
Fixes: https://codeberg.org/forgejo/forgejo/issues/4378
2024-08-22 09:10:15 +02: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
Codeberg Translate
d30be160c9 i18n: update of translations from Codeberg Translate (#4984)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4984): <!--number 4984 --><!--line 0 --><!--description aTE4bjogdXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIENvZGViZXJnIFRyYW5zbGF0ZQ==-->i18n: update of translations from Codeberg Translate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: qui <qui@users.noreply.translate.codeberg.org>
Co-authored-by: hahahahacker2009 <hahahahacker2009@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4984
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-22 06:23:28 +00:00
Renovate Bot
3dbeafa7ba Update module github.com/meilisearch/meilisearch-go to v0.28.0 2024-08-22 00:04:14 +00:00
Solomon Victorino
a4814bca2d fix(ui): prevent exceptions on other users' repo migration pages
- don't expect the retry button to always be attached
- don't parse status response as JSON when it was a login redirect
- add E2E test
2024-08-21 19:57:08 +00:00
Gusted
e3243a9465 Merge pull request 'feat(ui): Add rel="nofollow" to in-list labels' (#5002) from xlii/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5002
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 19:54:59 +00:00
Gusted
0c2ec195e4 Merge pull request 'Update dependency eslint-plugin-no-jquery to v3 (forgejo)' (#5054) from renovate/forgejo-eslint-plugin-no-jquery-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5054
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 19:45:56 +00:00
Renovate Bot
f0da48dd4d Update dependency eslint-plugin-no-jquery to v3 2024-08-21 16:18:41 +00:00
Gusted
61e018f8b4 Merge pull request '[SEC] Add keying module' (#5041) from gusted/sec-keying into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5041
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-21 15:19:44 +00:00
Gusted
a054201e20 Merge pull request 'Fix naming consistency and remove unused strings in teams' (#5052) from 0ko/forgejo:i18n-admin into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5052
Reviewed-by: Otto <otto@codeberg.org>
2024-08-21 14:57:11 +00:00
Gusted
f0fa959c4e Merge pull request 'fix: release: Forgejo version is not set' (#5042) from earl-warren/forgejo:wip-dockerfile into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5042
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 14:25:54 +00:00
Gusted
eea9ba5bfb Merge pull request 'Update golang packages (forgejo) (minor)' (#5048) from renovate/forgejo-minor-1.23-golang-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5048
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 14:17:43 +00:00
Gusted
12f97ef51f
[SEC] Add keying module
The keying modules tries to solve two problems, the lack of key
separation and the lack of AEAD being used for encryption. The currently
used `secrets` doesn't provide this and is hard to adjust to provide
this functionality.

For encryption, the additional data is now a parameter that can be used,
as the underlying primitive is an AEAD constructions. This allows for
context binding to happen and can be seen as defense-in-depth; it
ensures that if a value X is encrypted for context Y (e.g. ID=3,
Column="private_key") it will only decrypt if that context Y is also
given in the Decrypt function. This makes confused deputy attack harder
to exploit.[^1]

For key separation, HKDF is used to derives subkeys from some IKM, which
is the value of the `[service].SECRET_KEY` config setting. The context
for subkeys are hardcoded, any variable should be shuffled into the the
additional data parameter when encrypting.

[^1]: This is still possible, because the used AEAD construction is not
key-comitting. For Forgejo's current use-case this risk is negligible,
because the subkeys aren't known to a malicious user (which is required
for such attack), unless they also have access to the IKM (at which
point you can assume the whole system is compromised). See
https://scottarc.blog/2022/10/17/lucid-multi-key-deputies-require-commitment/
2024-08-21 16:06:17 +02:00
Otto
86be767939 Merge pull request 'Refactor some forms: semantic HTML, usability, accessibility, less JS' (#5031) from fnetx/css-only-hide into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5031
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-21 13:50:37 +00:00
0ko
b65a1312b3 i18n(en): remove unused strings related to team permissions
Added in 72aa5a20ec.
Dropped in cb41f5cae1.
2024-08-21 18:41:07 +05:00
0ko
a1c87db46f i18n(en): fix administrator access naming consistency 2024-08-21 18:39:51 +05:00
Otto Richter
83d2b3b7fa Implement CSS-only input toggling, refactor related forms
UX/Translation changes:

- new teams: remove redundant tooltips that don't add meaningful information
  - move general information to table fieldset
- new teams: rename "general" to "custom" access for clarity
- new teams: show labels beside options on mobile

Accessibility:

- semantic form elements allow easier navigation (fieldset, mostly)
- improve better labelling of new teams table
- fix accessibility scan issues
- TODO: the parts that "disable" form elements were not yet touched and
  are not really accessible to screenreaders

Technical:

- replace two JavaScript solutions with one CSS standard
- implement a simpler grid (.simple-grid)
- simplify markup
- remove some webhook settings specific CSS

Testing:

- check more form content for accessibility issues
- but exclude tooltips from the scan :(
- reuse existing form tests from previous PR
2024-08-21 15:03:19 +02:00
Otto
c20c534b90 Merge pull request 'fix: validate title length when updating an issue' (#4809) from thilinajayanath/forgejo:validate-issue-title-update into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4809
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 12:55:26 +00:00
Renovate Bot
df907ec7f9 Update golang packages 2024-08-21 09:58:16 +00:00
Earl Warren
6ea97ffe9b Merge pull request 'chore(renovate): fix grouping' (#5047) from viceice/forgejo:chore/renovate/grouping into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5047
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-21 09:45:34 +00:00
Michael Kriese
d9d7f8dc92
chore(renovate): fix grouping 2024-08-21 11:27:19 +02:00
Michael Kriese
f4b6da00fb Merge pull request 'chore(renovate): bump go version inside go.mod' (#5044) from viceice/forgejo:chore/renovate/gomod into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5044
2024-08-21 08:44:45 +00:00
Michael Kriese
171e4cc3be
chore(renovate): bump go version inside go.mod 2024-08-21 10:10:00 +02:00
thilinajayanath
1e922d906f validate the title length when updating an issue and add integration test for issue title update
using middleware validator to validate title length on update

use error name from binding package

add integration test for title update

rebase upstream and update test var name

fix test slice formatting

just a try (#1)

Reviewed-on: https://codeberg.org/thilinajayanath/forgejo/pulls/1
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>

fix errors + add test for 255 char title

fix test domain

fix CSRF token error on test

updaate result struct that's used to decode the json response

add json tags for struct and check changed title when http 200 is received

try to decode the title if the request succeeded

add comment in integration test
2024-08-21 08:56:52 +02:00
Earl Warren
6c8d9823ac
fix: release: Forgejo version is not set
LDFLAGS="-buildid=" must be set in the environment so the Makefile
adds to it. Setting it via the make arguments overrides it and removes
the -X "main.*Version" arguments which are used to set the Forgejo
version of the binary.

Regression introduced in [CHORE] Support reproducible builds' (#4970)
2024-08-21 07:27:38 +02:00
Gusted
821875e057 Merge pull request 'Update dependency chart.js to v4.4.4 (forgejo)' (#5037) from renovate/forgejo-chart.js-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5037
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 03:17:48 +00:00
Gusted
35cc077d82 Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.60.2 (forgejo)' (#5039) from renovate/forgejo-github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5039
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-21 03:13:43 +00: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
Renovate Bot
b8690562d2 Update dependency chart.js to v4.4.4 2024-08-21 00:03:20 +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
68cc61b537
Add integration test 2024-08-20 19:09:22 +02:00
Gusted
9111eb3473 Merge pull request '[PORT] Fix overflow for images on project cards (gitea#31683)' (#5029) from gusted/forgejo-bp-gt-31683 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5029
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-20 16:11:42 +00:00
Gusted
0764b7c18b
[UI] Remove snapping for images on project cards
Remove the snapping of the images on the projects cards, the images are
way too small to notice that when scrolling you're being snapped to
these images and when you do notice it, it doesn't make sense as you
wouldn't expect it to be snapped.
2024-08-20 16:02:52 +02:00
Simon Priet
8e46efef95
[PORT] Scroll images in project issues separately from the remaining issue (gitea#31683)
As discussed in https://github.com/go-gitea/gitea/issues/31667 &
https://github.com/go-gitea/gitea/issues/26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Conflict resolution: none

(cherry picked from commit fe7c9416777243264e8482d3af29e30c2b671074)
2024-08-20 15:54:22 +02:00
Otto
d9ae23188f Merge pull request 'chore(renovate): F3 is under development, update quarterly' (#5025) from earl-warren/forgejo:wip-f3-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5025
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-20 13:52:38 +00:00
Otto
01a153555a Merge pull request 'chore(CODEOWNERS): @earl-warren watches over all PRs [skip ci]' (#5027) from earl-warren/forgejo:wip-codeowner into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5027
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-20 13:51:38 +00:00
Gusted
f28cde134e Merge pull request '[UI] Adjust trailing EOL behavior for empty file' (#5013) from gusted/forgejo-adjust-eol into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5013
Reviewed-by: Otto <otto@codeberg.org>
2024-08-20 13:42:04 +00:00
Michael Kriese
0d45ed0faa Merge pull request 'chore(renovate): better linter and postcss grouping' (#5026) from viceice/forgejo:chore/renovate/grouping into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5026
2024-08-20 07:03:45 +00:00
Earl Warren
c76a73ad35 Merge pull request '[gitea] week 2024-34 cherry pick (gitea/main -> forgejo)' (#4998) from earl-warren/wcp/2024-34 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4998
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-20 06:32:09 +00:00
Earl Warren
5a58741879
chore(CODEOWNERS): @earl-warren watches over all PRs
As I watch all PRs created daily, there is no need to rely on the
CODEOWNERS logic for me to be notified that it exists.
2024-08-20 08:24:48 +02:00
Michael Kriese
bf609ce874
chore(renovate): better linter and postcss grouping 2024-08-20 08:14:08 +02:00
Earl Warren
0c2d527aec
chore(renovate): F3 is under development, update quarterly 2024-08-20 08:02:00 +02:00
Earl Warren
027a2fb0a4 Merge pull request 'Update dependency @axe-core/playwright to v4.10.0 (forgejo)' (#5021) from renovate/forgejo-axe-core-playwright-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5021
Reviewed-by: Otto <otto@codeberg.org>
2024-08-20 05:57:07 +00:00
Gusted
85cd07a263 Merge pull request 'Update dependency mini-css-extract-plugin to v2.9.1 (forgejo)' (#5020) from renovate/forgejo-mini-css-extract-plugin-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5020
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-20 00:43:37 +00:00
Renovate Bot
74ebb47509 Update dependency @axe-core/playwright to v4.10.0 2024-08-20 00:04:06 +00:00
Renovate Bot
b8f56fd3ca Update dependency mini-css-extract-plugin to v2.9.1 2024-08-20 00:03:53 +00:00
Gusted
0692cc2cc1
[BUG] First user created through reverse proxy should be admin
- Currently users created through the reverse proxy aren't created
trough the normal route of `createAndHandleCreatedUser` as this does a
lot of other routines which aren't necessary for the reverse proxy auth,
however one routine is important to have: the first created user should
be an admin. This patch adds that code
- Adds unit test.
- Resolves #4437
2024-08-19 21:04:35 +02:00
Gusted
e9a89a188e
[UI] Adjust trailing EOL behavior for empty file
- Follow up #4835
- Currently for empty files (file size is shown in the file header) the
"No EOL" information is being shown, even though it doesn't really
make sense to show that for empty files.
- Add integration test.
- Ref: https://codeberg.org/Codeberg/Community/issues/1612#issuecomment-2169437
2024-08-19 20:23:15 +02: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
0c70e11df8 Merge pull request 'git-grep: refactor defaults' (#4964) from yoctozepto/git-grep-refactor-defaults into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4964
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-19 13:12:37 +00:00
Radosław Piliszek
f784260633 git-grep: refactor defaults
One method to set them all... or something like that.

The defaults for git-grep options were scattered over the run
function body. This change refactors them into a separate method.
The application of defaults is checked implicitly by existing
tests and linters, and the new approach makes it very easy
to inspect the desired defaults are set.
2024-08-19 14:28:01 +02:00
Earl Warren
7e37c4d831 Merge pull request '[BUG] Don't fire notification for comment of pending review' (#4487) from gusted/webhook-issue into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4487
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-19 09:04:50 +00:00
Earl Warren
74f08b5da0 Merge pull request 'feat: add forgejo-cli to the container images' (#5012) from earl-warren/forgejo:wip-cli into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5012
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-19 08:47:57 +00:00
limiting-factor
b6efebc237
feat: add forgejo-cli to the container images
When the Forgejo CLI binary is `forgejo-cli`, the `--verbose` or `--quiet`
arguments are available globally for all sub-commands. The same
sub-commands can be used with `forgejo forgejo-cli`, those flags are
not available.
2024-08-19 09:44:04 +02:00
Earl Warren
c7adff3862 Merge pull request 'Lock file maintenance (forgejo)' (#5011) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5011
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-19 07:42:40 +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
Earl Warren
0fd2254684
chore(release-notes): weekly cherry-pick week 2024-34 2024-08-19 09:27:37 +02:00
yp05327
a8e25e907c
Add missing repository type filter parameters to pager (#31832)
Fix #31807

ps: the newly added params's value will be changed.
When the first time you selected the filter, the values of params will
be `0` or `1`
But in pager it will be `true` or `false`.
So do we have `boolToInt` function?

(cherry picked from commit 7092402a2db255ecde2c20574b973fb632c16d2e)

Conflicts:
	routers/web/org/home.go
  trivial conflict s/pager.AddParam/pager.AddParamString/
2024-08-19 09:26:34 +02:00
forgejo-renovate-action
15e131fd67 Merge pull request 'Update renovate to v38.39.6 (forgejo)' (#5007) from renovate/forgejo-renovate into forgejo 2024-08-19 06:04:05 +00:00
Renovate Bot
e650b25bb6 Lock file maintenance 2024-08-19 02:05:17 +00:00
Renovate Bot
1b9222f6e2 Update renovate to v38.39.6 2024-08-19 02:03:33 +00:00
Gusted
f3bd849bef Merge pull request 'Update dependency @stylistic/stylelint-plugin to v3.0.1 (forgejo)' (#5008) from renovate/forgejo-stylistic-stylelint-plugin-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5008
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-19 01:18:20 +00:00
Renovate Bot
6012bcb2b9 Update dependency @stylistic/stylelint-plugin to v3.0.1 2024-08-19 00:09:17 +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
Otto
f9ba752140 Merge pull request '[UI] Fix misalignment of authors for repo acctivity' (#5003) from gusted/forgejo-fix-chartjs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5003
Reviewed-by: Otto <otto@codeberg.org>
2024-08-18 20:11:50 +00:00
Earl Warren
90e03e410a Merge pull request 'feat: upgrade F3 to v3.7.0' (#5004) from earl-warren/forgejo:wip-f3 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5004
Reviewed-by: Otto <otto@codeberg.org>
2024-08-18 19:30:15 +00:00
Gusted
72f41306c2
[UI] Fix misalignment of authors for repo acctivity
- Regression of #4571
- We aren't showing the ticks generated by chartjs, because we want to
show the avatar of the person instead. You can't *realy* disable that
tick, so instead I opted to make them transparent in #4571, however they
still affected the generation of ticks so if enough authors were being
shown, for some the ticks were being skipped. Adjust the settings to
make sure they are always being shown.
- Resolves https://codeberg.org/forgejo/forgejo/issues/4982
2024-08-18 21:18:29 +02:00
limiting-factor
b26a0aea19
feat: upgrade F3 to v3.7.0
* support changing label colors
* support changing issue state
* use helpers to keep type conversions DRY
* drop the x/exp license because it is no longer used

The tests are performed by the gof3 compliance suite
2024-08-18 19:39:20 +02:00
Otto
2cbc9cec73 Merge pull request 'Enable switch check in linter' (#4555) from thefox/reenable-switch-check into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4555
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-18 15:56:35 +00: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
Gusted
15c64122a6
[BUG] Don't fire notification for comment of pending review
- When a comment was updated or deleted and was part of an
pending/ongoing review, it would have triggered a notification, such as
a webhook.
- This patch checks if the comment is part of a pending review and then
does not fire a notification and, in the case of updating a comment,
does not save the content history because this is not necessary if it is
still a "draft" comment given it is a pending comment (there is no need
to see my embarrassing typos).
- Adds integration tests.
- Resolves https://codeberg.org/forgejo/forgejo/issues/4368
2024-08-18 17:04:00 +02:00
TheFox0x7
f7bb75ce56
revert: accidental change 2024-08-18 16:36:06 +02:00
Gusted
fe18428806
Fix linting issues 2024-08-18 16:25:13 +02:00
TheFox0x7
529bbbde4d
style: change one argument switch to if 2024-08-18 16:20:26 +02: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
TheFox0x7
0813126058
test: add more workflow event coverage 2024-08-18 15:19:01 +02:00
TheFox0x7
8322882265
style: reenable switch check 2024-08-18 15:19:01 +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
Earl Warren
adf4dcdbbf Merge pull request 'Update docker.io/bitnami/minio Docker tag to v2024.8.17 (forgejo)' (#4994) from renovate/forgejo-docker.io-bitnami-minio-2024.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4994
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-18 05:24:26 +00:00
Earl Warren
5ae1c96893
chore(renovate): bitnami/minio is now docker.io/bitnami/minio 2024-08-18 06:37:45 +02:00
Adrian Hirt
1dfa11551c
Fix overflowing content in action run log (#31842)
When a long line with characters such as dots is returned by a step in
an action (e.g. by the output of the Ruby on Rails test runner), it
overflows the log container, causing the page to scroll sideways.

This PR adds the CSS `overflow-wrap: anywhere;` to the
`.job-step-section .job-step-logs .job-log-line .log-msg` selector,
which causes such lines to wrap as well

(cherry picked from commit 61aaf3440142d225802e3e9ce3db28bcf71f5a7e)
2024-08-18 06:28:26 +02:00
Jason Song
385718dd78
Avoid returning without written ctx when posting PR (#31843)
Fix #31625.

If `pull_service.NewPullRequest` return an error which misses each `if`
check, `CompareAndPullRequestPost` will return immediately, since it
doesn't write the HTTP response, a 200 response with empty body will be
sent to clients.

```go
	if err := pull_service.NewPullRequest(ctx, repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil {
		if repo_model.IsErrUserDoesNotHaveAccessToRepo(err) {
			ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error())
		} else if git.IsErrPushRejected(err) {
			// ...
			ctx.JSONError(flashError)
		} else if errors.Is(err, user_model.ErrBlockedUser) {
			// ...
			ctx.JSONError(flashError)
		} else if errors.Is(err, issues_model.ErrMustCollaborator) {
			// ...
			ctx.JSONError(flashError)
		}
		return
	}
```

Not sure what kind of error can cause it to happen, so this PR just
expose it. And we can fix it when users report that creating PRs failed
with error responses.

It's all my guess since I cannot reproduce the problem, but even if it's
not related, the code here needs to be improved.

(cherry picked from commit acd7053e9d4968e8b9812ab379be9027ac8e7771)

Conflicts:
	routers/web/repo/pull.go
  trivial context conflict
2024-08-18 06:28:26 +02:00
Lunny Xiao
d5500422c9
Fix panic of ssh public key page after deletion of auth source (#31829)
Fix #31730

This PR rewrote the function `PublicKeysAreExternallyManaged` with a
simple test. The new function removed the loop to make it more readable.

(cherry picked from commit b491b2104f83ee8fc4956c099c427b339291b3be)
2024-08-18 06:28:26 +02:00
Rowan Bohde
ebfdc659d8
render plain text file if the LFS object doesn't exist (#31812)
We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

(cherry picked from commit 1310649331648d747c57a52ea3bc92da85e7d4d1)

Conflicts:
	tests/integration/lfs_view_test.go
  trivial context conflict
2024-08-18 05:58:33 +02:00
Jason Song
7f1db1df3e
Show lock owner instead of repo owner on LFS setting page (#31788)
Fix #31784.

Before:

<img width="1648" alt="image"
src="https://github.com/user-attachments/assets/03f32545-4a85-42ed-bafc-2b193a5d8023">

After:

<img width="1653" alt="image"
src="https://github.com/user-attachments/assets/e5bcaf93-49cb-421f-aac1-5122bc488b02">

(cherry picked from commit 0470646d46f90c20f40fde718be6ef8d8c84ee2c)
2024-08-18 05:47:06 +02:00
Renovate Bot
2960f78adb Update docker.io/bitnami/minio Docker tag to v2024.8.17 2024-08-18 00:02:17 +00:00
Otto
4760c5029d Merge pull request 'i18n: Improve clarity of confirmation email messages' (#4980) from fnetx/activation-code-clarity into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4980
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-17 15:31:48 +00:00
Otto
2f501e9d74 Merge pull request 'fix: add gap between branch dropdown and PR button' (#4971) from n0toose/gap-part-two into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4971
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-17 12:11:05 +00:00
Earl Warren
9b66710bf5 Merge pull request 'Update docker.io/bitnami/mysql Docker tag to v8.4 (forgejo)' (#4961) from renovate/forgejo-docker.io-bitnami-mysql-8.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4961
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-17 07:46:57 +00:00
Earl Warren
fbb2252314 Merge pull request 'git-grep: fix for initial dashes in expressions' (#4967) from yoctozepto/git-grep-fix-words into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4967
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-17 07:07:40 +00:00
Earl Warren
e2dee395e4 Merge pull request 'Update docker.io/bitnami/minio Docker tag to v2024.8.3 (forgejo)' (#4960) from renovate/forgejo-docker.io-bitnami-minio-2024.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4960
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-17 06:58:28 +00:00
Earl Warren
022d7c16ca Merge pull request 'Update module mvdan.cc/gofumpt to v0.7.0 (forgejo)' (#4988) from renovate/forgejo-mvdan.cc-gofumpt-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4988
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-17 05:18:56 +00:00
Earl Warren
3524bfaf0c Merge pull request 'Update dependency @playwright/test to v1.46.1 (forgejo)' (#4987) from renovate/forgejo-playwright-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4987
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-17 05:18:35 +00:00
Gusted
760b99bd5a Merge pull request 'test: fail on unhandled JS exceptions' (#4959) from solomonv/e2e-fail-on-errors into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4959
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-17 00:58:18 +00:00
Renovate Bot
1b8a79f820 Update module mvdan.cc/gofumpt to v0.7.0 2024-08-17 00:02:59 +00:00
Renovate Bot
c078e14472 Update dependency @playwright/test to v1.46.1 2024-08-17 00:02:44 +00:00
Otto
da7f3ac6f5 Merge pull request '[BUG] Make logout event non-blocking' (#4938) from gusted/forgejo-non-blocking-logout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4938
Reviewed-by: Otto <otto@codeberg.org>
2024-08-16 14:17:15 +00:00
Otto Richter
2e9f4cece4 i18n: Improve clarity of confirmation email messages
Fixes https://codeberg.org/forgejo/forgejo/issues/4399
2024-08-16 16:11:18 +02: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
Earl Warren
24eb401a0a Merge pull request 'Enhancing Gitea OAuth2 Provider with Granular Scopes for Resource Access' (#4449) from marcellmars/forgejo:forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4449
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 12:38:15 +00:00
Earl Warren
8e91cf1b26 Merge pull request 'Add .mailmap with aliases for Unknwon (github.com/Unknwon)' (#4956) from yarikoptic/forgejo:enh-mailmap into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4956
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-16 09:04:41 +00:00
Earl Warren
c7fe944357 Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.6.4 (forgejo)' (#4972) from renovate/forgejo-eslint-stylistic-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4972
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:58:42 +00:00
Earl Warren
b2b83dfb94 Merge pull request 'Update dependency stylelint to v16.8.2 (forgejo)' (#4973) from renovate/forgejo-linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4973
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:57:59 +00:00
Earl Warren
95dc22370e Merge pull request 'Update dependency @eslint-community/eslint-plugin-eslint-comments to v4.4.0 (forgejo)' (#4975) from renovate/forgejo-eslint-community-eslint-plugin-eslint-comments-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4975
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:57:19 +00:00
forgejo-renovate-action
f7f6c78913 Merge pull request 'Update dependency vue to v3.4.38 (forgejo)' (#4974) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-08-16 08:56:36 +00:00
Renovate Bot
5bb7fc2a39 Update dependency vue to v3.4.38 2024-08-16 08:03:23 +00:00
Codeberg Translate
17fa75074d i18n: update of translations from Codeberg Translate (#4889)
Translations update from [Codeberg Translate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: dragon <dragon@users.noreply.translate.codeberg.org>
Co-authored-by: hoovad <hoovad@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: zub <zub@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4889
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-16 07:19:03 +00:00
Renovate Bot
07d6557804 Update dependency @eslint-community/eslint-plugin-eslint-comments to v4.4.0 2024-08-16 02:03:27 +00:00
Renovate Bot
c4a5da969a Update dependency @stylistic/eslint-plugin-js to v2.6.4 2024-08-16 02:03:01 +00:00
Renovate Bot
4fa2b8f70e Update dependency stylelint to v16.8.2 2024-08-16 00:03:27 +00:00
Panagiotis "Ivory" Vasilopoulos
18cad9d342 fix: add gap between branch dropdown and PR button
The saga continues.

The motivation for adding a bigger gap is making the gap consistent
with the "Watch"/"Fork"/"Star" buttons on the top right.
2024-08-16 01:26:41 +02:00
Chl
3fab07e0bc
follow up on #2367: rel="nofollow" on in-list labels
The forgejo/forgejo#2367 pull requests added rel="nofollow" on filters in the
menu, this commit adds it on the labels in the listing and a few other places.
2024-08-15 21:56:26 +02:00
Gusted
0924e6626d Merge pull request 'fix: enlargen gap between avatar and name' (#4958) from n0toose/latest-commit-gap into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4958
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-15 19:18:22 +00:00
Otto
d26ad8dbe5 Merge pull request 'git-grep: set timeout to 2s by default and allow configuring it' (#4966) from yoctozepto/git-grep-timeout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4966
Reviewed-by: Otto <otto@codeberg.org>
2024-08-15 12:15:16 +00:00
Renovate Bot
7614efcaf6 Update docker.io/bitnami/mysql Docker tag to v8.4 2024-08-15 00:03:35 +00:00
Renovate Bot
da44a7c01b Update docker.io/bitnami/minio Docker tag to v2024.8.3 2024-08-15 00:03:08 +00:00
Solomon Victorino
750deb9367 test: fail on unhandled JS exceptions 2024-08-14 15:35:20 -06:00
Panagiotis "Ivory" Vasilopoulos
98bb6c1c59 fix: enlargen gap between avatar and name
Changes tw-mr-1 to tw-mr-2. Not that big of a change, mostly
cosmetic.
2024-08-14 17:19:23 +02:00
Yaroslav Halchenko
82fcc6768a Add .mailmap with aliases for Unknwon (github.com/Unknwon)
without it looks like this:

    ❯ git shortlog -sn | head
      1674	Unknwon
      1643	Lunny Xiao
      1499	GiteaBot
      1186	zeripath
      1147	Earl Warren
      1093	silverwind
       752	wxiaoguang
       573	Unknown
       537	6543
       524	Gusted

with:

    ❯ git shortlog -sn | head
      2635	Unknwon
      1643	Lunny Xiao
      1499	GiteaBot
      1186	zeripath
      1147	Earl Warren
      1093	silverwind
       752	wxiaoguang
       537	6543
       524	Gusted
       385	techknowlogick
2024-08-14 08:26:16 -04:00
Michael Kriese
ad92ede00a Merge pull request 'ci: use mirror or bitnami images' (#4954) from viceice/forgejo:ci/use-mirror-images into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4954
Reviewed-by: Otto <otto@codeberg.org>
2024-08-14 11:41:12 +00:00
Michael Kriese
696e0ff27e
ci: use mirror or bitnami images
This reduces chances of docker hub rate limiting.
Bitnami images are excluded from rate limiting.
2024-08-14 12:10:53 +02:00
Gusted
40ed2efcb6 Merge pull request 'Update dependency tailwindcss to v3.4.10 (forgejo)' (#4952) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4952
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-14 09:08:54 +00:00
Radosław Piliszek
824dd6bc5d git-grep: set timeout to 2s by default and allow configuring it
We need to shorten the timeout to bound effectively for
computation size. This protects against "too big" repos.
This also protects to some extent against too long lines
if kept to very low values (basically so that grep cannot run out
of memory beforehand).

Docs-PR: forgejo/docs#812
2024-08-14 07:55:05 +02:00
Renovate Bot
da96281acb Update dependency tailwindcss to v3.4.10 2024-08-14 00:03:05 +00:00
Otto
b77f45f46b Merge pull request 'Revert "Prevent allow/reject reviews on merged/closed PRs"' (#4907) from caesar/forgejo:revert-no-closed-pr-review into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4907
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-13 23:25:54 +00:00
Caesar Schinas
24418da690
add release notes 2024-08-13 22:14:46 +01:00
Otto
01affa0908 Merge pull request 'fix: Run full PR checks on agit push' (#4885) from viceice/forgejo:fix/agit/force-push into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4885
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-13 18:23:40 +00:00
Otto
69eb8f32cb Merge pull request 'fix(api): Clarify and correct descriptions for quota calls' (#4945) from fnetx/quota-api-language into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4945
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-13 15:37:53 +00:00
Earl Warren
5a66691607 Merge pull request '[gitea] week 2024-33 cherry pick (gitea/main -> forgejo)' (#4924) from earl-warren/wcp/2024-33 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4924
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-13 07:51:31 +00:00
Earl Warren
03b9d50c67
fix: enable LOG_COMPRESSION by default
Refs: https://codeberg.org/forgejo/forgejo/pulls/4924#issuecomment-2165839
2024-08-13 09:05:50 +02:00
Earl Warren
d42f28de4e
chore: update .deadcode.out 2024-08-13 09:05:50 +02:00
Earl Warren
5c8ccce785
chore(release-notes): weekly cherry-pick week 2024-33 2024-08-13 09:05:50 +02:00
Jason Song
c2310c1d6c
Fix typo for LOG_COMPRESSION in ini (#31809)
Follow #31761

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 42841aab59640262ed3b873d86980b0bb5d869ae)
2024-08-13 09:05:50 +02:00
Jason Song
83565de2c0
Fix IsObjectExist with gogit (#31790) (tests only)
Fix #31271.

When gogit is enabled, `IsObjectExist` calls
`repo.gogitRepo.ResolveRevision`, which is not correct. It's for
checking references not objects, it could work with commit hash since
it's both a valid reference and a commit object, but it doesn't work
with blob objects.

So it causes #31271 because it reports that all blob objects do not
exist.

(cherry picked from commit f4d3120f9d1de6a260a5e625b3ffa6b35a069e9b)

Conflicts:
  trivial resolution because go-git support was dropped https://codeberg.org/forgejo/forgejo/pulls/4941
2024-08-13 09:05:43 +02:00
Jason Song
a627b885c7
Support compression for Actions logs (#31761)
Support compression for Actions logs to save storage space and
bandwidth. Inspired by
https://github.com/go-gitea/gitea/issues/24256#issuecomment-1521153015

The biggest challenge is that the compression format should support
[seekable](https://github.com/facebook/zstd/blob/dev/contrib/seekable_format/zstd_seekable_compression_format.md).
So when users are viewing a part of the log lines, Gitea doesn't need to
download the whole compressed file and decompress it.

That means gzip cannot help here. And I did research, there aren't too
many choices, like bgzip and xz, but I think zstd is the most popular
one. It has an implementation in Golang with
[zstd](https://github.com/klauspost/compress/tree/master/zstd) and
[zstd-seekable-format-go](https://github.com/SaveTheRbtz/zstd-seekable-format-go),
and what is better is that it has good compatibility: a seekable format
zstd file can be read by a regular zstd reader.

This PR introduces a new package `zstd` to combine and wrap the two
packages, to provide a unified and easy-to-use API.

And a new setting `LOG_COMPRESSION` is added to the config, although I
don't see any reason why not to use compression, I think's it's a good
idea to keep the default with `none` to be consistent with old versions.

`LOG_COMPRESSION` takes effect for only new log files, it adds `.zst` as
an extension to the file name, so Gitea can determine if it needs
decompression according to the file name when reading. Old files will
keep the format since it's not worth converting them, as they will be
cleared after #31735.

<img width="541" alt="image"
src="https://github.com/user-attachments/assets/e9598764-a4e0-4b68-8c2b-f769265183c9">

(cherry picked from commit 33cc5837a655ad544b936d4d040ca36d74092588)

Conflicts:
	assets/go-licenses.json
	go.mod
	go.sum
  resolved with make tidy
2024-08-13 06:51:49 +02:00
Edip Emre Bodur
8b6747173a
Fix null requested_reviewer from API (#31773)
If the assign the pull request review to a team, it did not show the
members of the team in the "requested_reviewers" field, so the field was
null. As a solution, I added the team members to the array.

fix #31764

(cherry picked from commit 94cca8846e7d62c8a295d70c8199d706dfa60e5c)
2024-08-13 06:51:49 +02:00
Earl Warren
439c8fb246 Merge pull request '[CHORE] Drop go-git support' (#4941) from gusted/drop-gogit into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4941
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-13 04:47:54 +00:00
Radosław Piliszek
f4d86b4ab0 git-grep: fix for initial dashes in expressions
There is no reason to reject initial dashes in git-grep
expressions... other than the code not supporting it previously.
A new method is introduced to relax the security checks.
2024-08-12 22:12:47 +02:00
Otto Richter
e330c88411 fix(api): Correct descriptions for quota calls 2024-08-12 22:05:56 +02:00
Gusted
9c5c08859d
[BUG] Make logout event non-blocking
- When people click on the logout button, a event is sent to all
browser tabs (actually to a shared worker) to notify them of this
logout. This is done in a blocking fashion, to ensure every registered
channel (which realistically should be one for every user because of the
shared worker) for a user receives this message. While doing this, it
locks the mutex for the eventsource module.
- Codeberg is currently observing a deadlock that's caused by this
blocking behavior, a channel isn't receiving the logout event. We
currently don't have a good theory of why this is being caused. This in
turn is causing that the logout functionality is no longer working and
people no longer receive notifications, unless they refresh the page.
- This patchs makes this message non-blocking and thus making it
consistent with the other messages. We don't see a good reason why this
specific event needs to be blocking and the commit introducing it
doesn't offer a rationale either.
2024-08-12 19:13:23 +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
Otto
4132b18e59 Merge pull request 'git-grep: ensure bounded default for MatchesPerFile' (#4928) from yoctozepto/forgejo:git-grep-limit-matches-per-file into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4928
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-12 14:37:43 +00:00
Otto
5e6bc07610 Merge branch 'forgejo' into revert-no-closed-pr-review 2024-08-12 14:30:03 +00:00
Otto
b7fcc5e29d Merge pull request 'chore(ci): Use forgejo mirror for common docker images' (#4939) from fnetx/mirror-ci-images into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4939
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-12 14:28:15 +00:00
Otto Richter
395c10596e chore(ci): use postgres image from mirror 2024-08-12 16:19:20 +02:00
Otto Richter
c3f2b60b3b chore(renovate): Add mirrored node image to renovate.json 2024-08-12 16:19:20 +02:00
Otto Richter
53ca3d4e6c chore(ci): Use mirrored container images for node 2024-08-12 16:11:35 +02:00
Gusted
fdabcf5d44 Merge pull request 'Lock file maintenance (forgejo)' (#4936) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4936
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-12 12:26:19 +00:00
Caesar Schinas
65c2595f26
Revert "Prevent allow/reject reviews on merged/closed PRs"
This reverts commit 4ed372af13.
This change from Gitea was not considered by the Forgejo UI team and there is a consensus that it feels like a regression.

The test which was added in that commit is kept and modified to test that reviews can successfully be submitted on closed and merged PRs.

Closes forgejo/design#11
2024-08-12 12:24:52 +01:00
Michael Kriese
2d05e922a2
fix(agit): run full pr checks on force-push 2024-08-12 09:00:41 +02:00
forgejo-renovate-action
0d2efa2c4a Merge pull request 'Update renovate to v38.25.0 (forgejo)' (#4933) from renovate/forgejo-renovate into forgejo 2024-08-12 04:50:22 +00:00
Renovate Bot
88169e74ed Lock file maintenance 2024-08-12 02:06:15 +00:00
Renovate Bot
eb6afae1c0 Update renovate to v38.25.0 2024-08-12 00:04:22 +00:00
Earl Warren
8359b26d3f Merge pull request '[PORT] Add warning message in merge instructions when AutodetectManualMerge was not enabled (gitea#31805)' (#4930) from gusted/forgejo-gt-bp-31805 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4930
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-11 22:15:40 +00:00
Gusted
d2184dd931 Merge pull request 'git-grep: skip binary files' (#4927) from yoctozepto/forgejo:git-grep-skip-binary into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4927
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-11 18:58:48 +00:00
a1012112796
e5f8d144f2
[PORT] Add warning message in merge instructions when AutodetectManualMerge was not enabled (gitea#31805)
---

Conflict resolution: trivial
Things done differently: Improve localization message, use the paragraph
element instead of the div element, fix passing this variable to the
template and add a integration test

(cherry picked from commit 9633f336c87947dc7d2a5e76077a10699ba5e50d)
2024-08-11 19:15:37 +02:00
Radosław Piliszek
f4a7bf6d2a git-grep: skip binary files
It is a waste of resources to scan them looking for matches
because they are never returned back - they appear as empty
lines in the current format.

Notably, even if they were returned, it is unlikely that matching
in binary files makes sense when the goal is "code search".
2024-08-11 19:10:23 +02:00
Earl Warren
44002a6399 Merge pull request 'chore(refactor): split repo_service.ForkRepository in two' (#4879) from earl-warren/forgejo:wip-fork-split into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4879
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-11 15:50:52 +00:00
Radosław Piliszek
2fbb51ceb2 git-grep: ensure bounded default for MatchesPerFile
Analogously to how it happens for MaxResultLimit.

The default of 20 is inspired by a well-known, commercial code
hosting platform.

Unbounded limits are risky because they expose Forgejo to a class
of DoS attacks where queries are crafted to take advantage of
missing bounds.
2024-08-11 14:59:46 +02:00
Earl Warren
cfefe2b6c9
chore(refactor): split repo_service.ForkRepository in two
ForkRepository performs two different functions:

* The fork itself, if it does not already exist
* Updates and notifications after the fork is performed

The function is split to reflect that and otherwise unmodified.

The two function are given different names to:

* clarify which integration tests provides coverage
* distinguish it from the notification method by the same name
2024-08-11 12:40:34 +02:00
Exploding Dragon
87d50eca87 feat: support grouping by any path for arch package (#4903)
Previous arch package grouping was not well-suited for complex or multi-architecture environments. It now supports the following content:

- Support grouping by any path.
- New support for packages in `xz` format.
- Fix clean up rules

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4903): <!--number 4903 --><!--line 0 --><!--description c3VwcG9ydCBncm91cGluZyBieSBhbnkgcGF0aCBmb3IgYXJjaCBwYWNrYWdl-->support grouping by any path for arch package<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4903
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-08-11 10:35:11 +00:00
Earl Warren
a4da672134 Merge pull request 'git-grep: update comment' (#4921) from yoctozepto/forgejo:git-grep-update-comment into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4921
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-11 09:47:58 +00:00
Earl Warren
1b24180327 Merge pull request 'chore(ci): do not remove tags from forgejo-integration' (#4923) from earl-warren/forgejo:wip-integration-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4923
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-11 09:46:25 +00:00
Earl Warren
f250f89491
chore(ci): do not remove tags from forgejo-integration
If the tag of a stable release is removed from integration, it won't
be properly described when building the test release. It will be:

8.0.0-dev-1648-7b31a541c0+gitea-1.22.0

instead of:

8.0.1-5-7b31a541c0+gitea-1.22.0
2024-08-11 07:22:21 +02:00
Radosław Piliszek
7dd7cc7ebc git-grep: update comment
It was outdated and missing detail.
2024-08-10 16:41:12 +02:00
Earl Warren
a83f5cd0f0 Merge pull request 'chore(ci): remove old releases from forgejo-integration' (#4920) from earl-warren/forgejo:wip-integration-cleanup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4920
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-10 13:18:08 +00:00
Earl Warren
6e94be527a
chore(ci): remove old releases from forgejo-integration
The releases are created when:

* a tag is pushed to the integration repository it will create a
  vX.Y.Z release
* a new commit is pushed to a branch and mirrored to the integration
  repository, it will create a vX.Y-test release named after the branch

When both vX.Y.Z and vX.Y-test release are present, the end-to-end
tests will use vX.Y.Z because it comes first in release sort
order. This ensures that a last round of end-to-end tests is run from
the release built in the integration repository, exactly as it will be
published and signed.

In between stable releases, the vX.Y-test releases are built daily and
must be used instead for end-to-end testing so that problems can be
detected as soon as possible. For that to happen, the stable release
must be removed from the integration repository and this is done 24h
after they were published.

The vX.Y-test releases are removed if they have not been updated in 18
months. As of August 2024 it is possible for a LTS to still be needed
in tests over a year after it was last updated, although it is
unlikely that such a lack of activity happens, there is no reason to
remove the test release before that.
2024-08-10 15:16:00 +02:00
Gusted
6102f48c7d Merge pull request '[CHORE] Fix swagger deprecation message' (#4916) from gusted/swagger-deprecated into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4916
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-10 12:50:40 +00:00
Earl Warren
3b82a634c5 Merge pull request 'feat(i18n): make the test string more fun :D' (#4904) from n0toose/i18n-fun-test-string into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4904
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-10 06:03:51 +00:00
Earl Warren
f8728ad881 Merge pull request '[BUG] Return blocking errors as JSON errors' (#4914) from gusted/forgejo-block-json into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4914
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-10 05:52:27 +00:00
Earl Warren
40e51e4ca7 Merge pull request 'fix(ui): allow unreacting from comment popover' (#4798) from solomonv/forgejo:issue-reaction-fixes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4798
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-10 05:45:55 +00:00
Gusted
851d567776
[CHORE] Fix swagger deprecation message
- Fix "WARNING: item list for enum is not a valid JSON array, using the
old deprecated format" messages from
https://github.com/go-swagger/go-swagger in the CI.
2024-08-10 01:21:13 +02:00
Gusted
784173f7e9 Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2 (forgejo)' (#4910) from renovate/forgejo-major-eslint-stylistic-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4910
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 23:17:38 +00:00
Renovate Bot
ca00643416 Update dependency @stylistic/eslint-plugin-js to v2 2024-08-09 22:03:02 +00:00
Gusted
6ba4fb5cf6 Merge pull request 'Update vitest monorepo to v2 (forgejo) (major)' (#4913) from renovate/forgejo-major-vitest-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4913
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 20:38:56 +00:00
Gusted
9cc2fdffde Merge pull request 'Update dependency minimatch to v10 (forgejo)' (#4912) from renovate/forgejo-minimatch-10.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4912
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 20:20:27 +00:00
Gusted
967153ba45 Merge pull request 'Update dependency @stylistic/stylelint-plugin to v3 (forgejo)' (#4911) from renovate/forgejo-stylistic-stylelint-plugin-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4911
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 20:19:46 +00:00
Gusted
437b84a5f9 Merge pull request 'Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 (forgejo)' (#4909) from renovate/forgejo-github.com-editorconfig-checker-editorconfig-checker-v2-cmd-editorconfig-checker-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4909
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 20:19:32 +00:00
Panagiotis "Ivory" Vasilopoulos
57a2b99b3c feat(i18n): make the test string more fun :D 2024-08-09 21:51:07 +02: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
Gusted
d97cf0e854
[BUG] Return blocking errors as JSON errors
- These endspoints are since b71cb7acdc
JSON-based and should therefore return JSON errors.
- Integration tests adjusted.
2024-08-09 20:34:38 +02:00
Renovate Bot
f70d50a8dc Update vitest monorepo to v2 2024-08-09 18:13:31 +00:00
Renovate Bot
ade201095a Update dependency minimatch to v10 2024-08-09 18:13:13 +00:00
Renovate Bot
c541431773 Update dependency @stylistic/stylelint-plugin to v3 2024-08-09 18:12:59 +00:00
Gusted
0f7a98d34d Merge pull request '[CHORE] Fix darwin compatibility' (#4906) from gusted/forgejo-os-compile into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4906
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-09 17:33:47 +00:00
Solomon Victorino
b8a5ca2c40 fix(ui): allow unreacting from comment popover
- fix selectors for hasReacted
- don't send empty HTML on reaction errors
- add E2E test
2024-08-09 10:17:04 -06:00
forgejo-renovate-action
91115b39a9 Merge pull request 'Update x/tools to v0.24.0 (forgejo)' (#4895) from renovate/forgejo-xtools into forgejo 2024-08-09 15:53:49 +00:00
Gusted
ac8856ac2b
[CHORE] Fix darwin compatibility
- Always convert (syscall.Stat_t).Dev to uint64.
- Resolves #4905
2024-08-09 17:44:41 +02:00
Gusted
d5ba61a104 Merge pull request '[UI] Fix inconsitencies in link/login account page' (#4902) from gusted/forgejo-ui-linking into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4902
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-09 15:03:29 +00:00
Earl Warren
a486c684f9
Update x/tools to v0.24.0 (licenses updates) 2024-08-09 16:35:50 +02:00
Marcell Mars
d6647f710f tests additional grant scopes
- parsing scopes in `grantAdditionalScopes`
- read basic user info if `read:user`
- fail reading repository info if only `read:user`
- read repository info if `read:repository`
- if `setting.OAuth2.EnabledAdditionalGrantScopes` not provided it reads
  all groups (public+private)
- if `setting.OAuth2.EnabledAdditionalGrantScopes` provided it reads
  only public groups
- if `setting.OAuth2.EnabledAdditionalGrantScopes` and `read:organization`
 provided it reads all groups
2024-08-09 14:58:15 +02:00
Marcell Mars
8524589d8c show OAuth2 requested scopes in authorization UI
- by displaying the scopes requested for authorization in the OAuth2 app,
  users can make more informed decisions when granting access
2024-08-09 14:58:15 +02:00
Marcell Mars
7dbad27156 id_token & userinfo endpoint's public groups check
- if `groups` scope provided it checks if all, r:org or r:admin are
provided to pass all the groups. otherwise only public memberships
- in InfoOAuth it captures scopes from the token if provided in the
header. the extraction from the header is maybe a candidate for the
separate function so no duplicated code
2024-08-09 14:58:15 +02:00
Marcell Mars
4eb8d8c496 OAuth2 provider: support for granular scopes
- `CheckOAuthAccessToken` returns both user ID and additional scopes
- `grantAdditionalScopes` returns AccessTokenScope ready string (grantScopes)
   compiled from requested additional scopes by the client
- `userIDFromToken` sets returned grantScopes (if any) instead of default `all`
2024-08-09 14:58:15 +02:00
Renovate Bot
99d78fb9e7 Update x/tools to v0.24.0 2024-08-09 10:25:53 +00:00
forgejo-renovate-action
3301e7dc75 Merge pull request 'Update dependency vue to v3.4.37 (forgejo)' (#4893) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-08-09 09:22:36 +00:00
Gusted
75b3645bc3
[UI] Fix inconsitencies in link/login account page
- Add the 'correct' styling for column on the link account page, this
follows what was done for the login/register page in 629ca22a97.
- Move some if conditions to be outside of the container which allocates
space on the page, this ensures it's not being shown if it's not needed.
- Resolves #4844
2024-08-09 10:52:17 +02:00
Renovate Bot
000f3562c2 Update dependency vue to v3.4.37 2024-08-09 08:07:03 +00:00
Ivan Shapovalov
012a1e0497 log: journald integration (#2869)
Provide a bit more journald integration. Specifically:

- support emission of printk-style log level prefixes, documented in [`sd-daemon`(3)](https://man7.org/linux/man-pages/man3/sd-daemon.3.html#DESCRIPTION), that allow journald to automatically annotate stderr log lines with their level;
- add a new "journaldflags" item that is supposed to be used in place of "stdflags" when under journald to reduce log clutter (i. e. strip date/time info to avoid duplication, and use log level prefixes instead of textual log levels);
- detect whether stderr and/or stdout are attached to journald by parsing `$JOURNAL_STREAM` environment variable and adjust console logger defaults accordingly.

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/2869): <!--number 2869 --><!--line 0 --><!--description bG9nOiBqb3VybmFsZCBpbnRlZ3JhdGlvbg==-->log: journald integration<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2869
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Ivan Shapovalov <intelfx@intelfx.name>
Co-committed-by: Ivan Shapovalov <intelfx@intelfx.name>
2024-08-09 07:49:13 +00:00
Earl Warren
a72763f5a3 Merge pull request 'docs: add links to the v7.0.7 & v8.0.1 release notes' (#4899) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4899
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-09 07:34:40 +00:00
Earl Warren
ae85e285db Merge pull request 'disallow javascript: URI in the repository description' (#4896) from earl-warren/forgejo:wip-xss-repo-description into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4896
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-09 05:56:49 +00:00
Earl Warren
b87b38d3b9
docs: add links to the v7.0.7 & v8.0.1 release notes
They are now published in the milestone in part manually edited and in
part generated by the release notes assistant. Maintaining a single
file with all the release notes is prone to conflicts and requires
manual copy/pasting that is of little value.

It may make sense to transition to a release notes directory in which
the release notes assistant could create one file per release, with a
copy of the release notes edited in the milestone. This could be more
conveniently backported and would not require human intervention.
2024-08-09 07:26:50 +02:00
Gusted
bb448f3dc2
disallow javascript: URI in the repository description
- Fixes an XSS that was introduced in
https://codeberg.org/forgejo/forgejo/pulls/1433
- This XSS allows for `href`s in anchor elements to be set to a
`javascript:` uri in the repository description, which would upon
clicking (and not upon loading) the anchor element execute the specified
javascript in that uri.
- [`AllowStandardURLs`](https://pkg.go.dev/github.com/microcosm-cc/bluemonday#Policy.AllowStandardURLs) is now called for the repository description
policy, which ensures that URIs in anchor elements are `mailto:`,
`http://` or `https://` and thereby disallowing the `javascript:` URI.
It also now allows non-relative links and sets `rel="nofollow"` on
anchor elements.
- Unit test added.
2024-08-09 07:04:01 +02:00
Earl Warren
d7cb2ab3b2 Merge pull request 'feat(performance): remove BranchName in /:owner/:repo/commit/:commit' (#4891) from emilylange/feat-performance-remove-branchname into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4891
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-08 21:24:51 +00:00
emilylange
c1f85ce27b
feat(performance): remove BranchName in /:owner/:repo/commit/:commit
`BranchName` provides the nearest branch of the requested `:commit`.

It's plenty fast on smaller repositories.
On larger repositories like nixpkgs, however, this can easily take 2-3
seconds on a modern machine on a NVMe.

For context, at the time of writing, nixpkgs has over 650k commits and
roughly 250 branches.

`BranchName` is used once in the whole view:
The cherry-pick target branch default selection.

And I believe that's a logic error, which is why this patch is so small.

The nearest branch of a given commit will always be a branch the commit
is already part of. The branch you most likely *don't* want to
cherry-pick to.

Sure, one can technically cherry-pick a commit onto the same branch, but
that simply results in an empty commit.

I don't believe this is intended and even less so worth the compute.

Instead, the cherry-pick branch selection suggestion now always uses
the default branch, which used to be the fallback.

If a user wants to know which branches contain the given commit,
`load-branches-and-tags` exists and should be used instead.

Also, to add insult to injury, `BranchName` was calculated for both
logged-in and not logged-in users, despite its only consumer, the
cherry-pick operation, only being rendered when a given user has
write/commit permissions.

But this isn't particularly surprising, given this happens a lot in
Forgejo's codebase.
2024-08-08 22:29:42 +02:00
Earl Warren
7ac390bcb4 Merge pull request 'chore(ci): optimize end-to-end runs [skip ci]' (#4888) from wip-ci-end-to-end into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4888
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-08 20:24:10 +00:00
Yaroslav Halchenko
5ae2dbcb14 Adjust codespell config + make it fix few typos which sneaked in since addition of codespell support (#4857)
Now that my colleague just posted a wonderful blog post https://blog.datalad.org/posts/forgejo-runner-podman-deployment/ on forgejo runner, some time I will try to add that damn codespell action to work on CI here ;)  meanwhile some typos managed to sneak in and this PR should address them (one change might be functional in a test -- not sure if would cause a fail or not)

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4857
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
Co-committed-by: Yaroslav Halchenko <debian@onerussian.com>
2024-08-08 16:07:35 +00:00
Earl Warren
1f8e6b6e31
chore(ci): optimize end-to-end runs
* specify the version targeted by the pull request. The end-to-end
  tests previously compiled all known branches which was a waste. The
  pull request now must specify which version it is targeting so that
  only this version is recompiled and used for testing.
* when building the daily releases, use the release from the
  integration organization to ensure the tests are run against the
  latest build. Clarify in a comment why the lookup order of
  organizations is reversed in this particular case.

Refs: https://code.forgejo.org/forgejo/end-to-end/pulls/239
2024-08-08 17:53:12 +02:00
0ko
06d25815d3 Merge pull request 'chore(renovate): add labels and reviewer to renovate updates' (#4883) from viceice/chore/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4883
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-08 11:34:59 +00:00
Michael Kriese
62b6e48a9e
chore(renovate): add labels and reviewer to renovate updates 2024-08-08 11:42:32 +02:00
forgejo-renovate-action
8b79c5d7b6 Merge pull request 'Update renovate to v38.21.3 (forgejo)' (#4880) from renovate/forgejo-renovate into forgejo 2024-08-08 09:31:37 +00:00
Renovate Bot
52666d4a8a Update renovate to v38.21.3 2024-08-08 08:05:32 +00:00
Earl Warren
7cfa3305bf Merge pull request 'Update dependency tailwindcss to v3.4.8 (forgejo)' (#4873) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4873
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-08 07:29:03 +00:00
Exploding Dragon
1bc986423d fix: rpm sign resource leak (#4878)
Fixed the resource leak  in #4780.

Related:  [go-gitea/gitea#31794](https://github.com/go-gitea/gitea/pull/31794)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4878
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-08-08 07:28:09 +00:00
Codeberg Translate
abc3364a7b i18n: update of translations from Weblate (#4783)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4783): <!--number 4783 --><!--line 0 --><!--description aTE4bjogdXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIFdlYmxhdGU=-->i18n: update of translations from Weblate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: natalie_drowned02 <k_letovskiy02@protonmail.com>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: pswsm <pswsm@users.noreply.translate.codeberg.org>
Co-authored-by: dragon <dragon@users.noreply.translate.codeberg.org>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Marco Ciampa <ciampix@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4783
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-08 07:16:13 +00:00
Earl Warren
d9c87cf498 Merge pull request 'Update module golang.org/x/crypto to v0.26.0 (forgejo)' (#4874) from renovate/forgejo-golang.org-x-crypto-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4874
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-08 07:02:20 +00:00
Shivaram Lingamneni
878c236f49 cherry-pick OIDC changes from gitea (#4724)
These are the three conflicted changes from #4716:

* https://github.com/go-gitea/gitea/pull/31632
* https://github.com/go-gitea/gitea/pull/31688
* https://github.com/go-gitea/gitea/pull/31706

cc @earl-warren; as per discussion on https://github.com/go-gitea/gitea/pull/31632 this involves a small compatibility break (OIDC introspection requests now require a valid client ID and secret, instead of a valid OIDC token)

## Checklist

The [developer guide](https://forgejo.org/docs/next/developer/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Breaking features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4724): <!--number 4724 --><!--line 0 --><!--description T0lEQyBpbnRlZ3JhdGlvbnMgdGhhdCBQT1NUIHRvIGAvbG9naW4vb2F1dGgvaW50cm9zcGVjdGAgd2l0aG91dCBzZW5kaW5nIEhUVFAgYmFzaWMgYXV0aGVudGljYXRpb24gd2lsbCBub3cgZmFpbCB3aXRoIGEgNDAxIEhUVFAgVW5hdXRob3JpemVkIGVycm9yLiBUbyBmaXggdGhlIGVycm9yLCB0aGUgY2xpZW50IG11c3QgYmVnaW4gc2VuZGluZyBIVFRQIGJhc2ljIGF1dGhlbnRpY2F0aW9uIHdpdGggYSB2YWxpZCBjbGllbnQgSUQgYW5kIHNlY3JldC4gVGhpcyBlbmRwb2ludCB3YXMgcHJldmlvdXNseSBhdXRoZW50aWNhdGVkIHZpYSB0aGUgaW50cm9zcGVjdGlvbiB0b2tlbiBpdHNlbGYsIHdoaWNoIGlzIGxlc3Mgc2VjdXJlLg==-->OIDC integrations that POST to `/login/oauth/introspect` without sending HTTP basic authentication will now fail with a 401 HTTP Unauthorized error. To fix the error, the client must begin sending HTTP basic authentication with a valid client ID and secret. This endpoint was previously authenticated via the introspection token itself, which is less secure.<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4724
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shivaram Lingamneni <slingamn@cs.stanford.edu>
Co-committed-by: Shivaram Lingamneni <slingamn@cs.stanford.edu>
2024-08-08 06:32:14 +00:00
Earl Warren
c59c83024c
Update module golang.org/x/crypto to v0.26.0 (license update)
80fd97208d
2024-08-08 08:15:29 +02:00
Renovate Bot
64e56f0d0d Update module golang.org/x/crypto to v0.26.0 2024-08-08 00:03:21 +00:00
Renovate Bot
8deaea0b69 Update dependency tailwindcss to v3.4.8 2024-08-08 00:02:42 +00:00
Earl Warren
633406704c Merge pull request 'Revert telemetry integration' (#4866) from thefox/revert-otel into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4866
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-07 20:47:04 +00:00
0ko
bad3b32037 feat(i18n): allow different translations of creation links and titles (#4829)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4829
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-07 16:54:05 +00:00
TheFox0x7
2e2a044493
Revert "Open telemetry integration (#3972)"
This reverts commit c738542201.
2024-08-07 11:22:43 +02:00
Earl Warren
690b63fc74 Merge pull request '[BUG] Ensure all filters are persistent in issue filters' (#4852) from gusted/forgejo-filter-links into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4852
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-07 05:49:25 +00:00
Aravinth Manivannan
f9cbea3d6b feat: access ActivityPub client through interfaces to facilitate mocking in unit tests (#4853)
Was facing issues while writing unit tests for federation code. Mocks weren't catching all network calls, because was being out of scope of the mocking infra. Plus, I think we can have more granular tests.

This PR puts the client behind an interface, that can be retrieved from `ctx`. Context doesn't require initialization, as it defaults to the implementation available in-tree. It may be overridden when required (like testing).

## Mechanism

1. Get client factory from `ctx` (factory contains network and crypto parameters that are needed)
2. Initialize client with sender's keys and the receiver's public key
3. Use client as before.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4853
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
Co-committed-by: Aravinth Manivannan <realaravinth@batsense.net>
2024-08-07 05:45:24 +00:00
Earl Warren
1ddf44edd6 Merge pull request '[BUG] Render references to cross-repo issues with external issues' (#4860) from gusted/forgejo-ref-on-external into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4860
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-07 05:42:36 +00:00
Gusted
05e163aaf3
[BUG] Render references to cross-repo issues with external issues
- If you have the external issue setting enabled, any reference would
have been rendered as an external issue, however this shouldn't be
happening to references that refer to issues in other repositories.
- Unit test added.
2024-08-07 03:19:26 +02:00
Gusted
3bf87d157e Merge pull request 'Update dependency vue to v3.4.36 (forgejo)' (#4858) from renovate/forgejo-patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4858
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-07 00:48:35 +00:00
Renovate Bot
6f3a88971e Update dependency vue to v3.4.36 2024-08-07 00:03:03 +00:00
Gusted
85f455964d Merge pull request 'ci: add workflow_dispatch to renovate and mirror' (#4846) from viceice/workflow-dispatch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4846
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-06 21:39:35 +00:00
Gusted
feffdd90f0 Merge pull request 'Use FORGEJO_WORK_DIR in example systemd service' (#4851) from jondo/forgejo:jondo-patch-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4851
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 21:32:01 +00:00
Gusted
192177fc88
[BUG] Ensure all filters are persistent in issue filters
- Ensure that all filters are set in the issue filters links, thus
becoming persistent.
- Adds integration test
- Resolves #4843
2024-08-06 17:12:10 +02:00
jondo
ba9ce4b420 Switch to FORGEJO_WORK_DIR in the systemd service configuration file (#4850)
This is for https://codeberg.org/forgejo/forgejo/issues/4850
2024-08-06 14:56:13 +00:00
Gusted
7faea490fc Merge pull request '[UI] Do not include trailing EOL character when counting lines' (#4835) from gusted/forgejo-num-lines into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4835
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-06 12:23:24 +00:00
Michael Kriese
4fb19da661
ci: add workflow_dispatch to renovate and mirror 2024-08-06 13:52:36 +02:00
0ko
ecad5c9aae Merge pull request '[UI] Add background to reactions on hover' (#4836) from gusted/forgejo-reaction-bg into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4836
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-06 09:54:28 +00:00
Earl Warren
86dadda21e Merge pull request 'Update module github.com/go-logr/logr to v1.4.2 (forgejo)' (#4838) from renovate/forgejo-github.com-go-logr-logr-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4838
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-08-06 06:29:58 +00:00
Shiny Nematoda
06d2e90fa4 feat: highlighted code search results (#4749)
closes #4534

<details>
<summary>Screenshots</summary>

![](https://codeberg.org/attachments/0ab8a7b0-6485-46dc-a730-c016abb1f287)
</details>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4749
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-08-06 05:57:25 +00:00
Earl Warren
517637137c Merge pull request '[gitea] week 2024-32 cherry pick (gitea/main -> forgejo)' (#4801) from earl-warren/wcp/2024-32 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4801
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 05:47:20 +00:00
Earl Warren
fb311fcf10 Merge pull request 'Update dependency @playwright/test to v1.46.0 (forgejo)' (#4841) from renovate/forgejo-playwright-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4841
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 05:32:09 +00:00
Gusted
5cf976739c
[UI] Do not include trailing EOL character when counting lines
- Adjust the counting of the number of lines of a file to match the
amount of rendered lines. This simply means that a file with the content
of `a\n` will be shown as having `1 line` rather than `2 lines`. This
matches with the amount of lines that are being rendered (the last empty
line is never rendered) and matches more with the expecation of the
user (a trailing EOL is a technical detail).
- In the case there's no EOL, the reason why it was counting
'incorrectly' was to show if there was a trailing EOL or not, but now
text is shown to tell the user this.
- Integration test added.
- Resolves Codeberg/Community#1612
2024-08-06 04:36:57 +02:00
Renovate Bot
10647bb50f Update dependency @playwright/test to v1.46.0 2024-08-06 02:05:18 +00:00
Gusted
7fb82afa20 Merge pull request 'Update dependency postcss to v8.4.41 (forgejo)' (#4837) from renovate/forgejo-postcss-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4837
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 01:48:44 +00:00
Gusted
14850847ee Merge pull request '[BUG] Allow 4 charachter SHA in /src/commit' (#4828) from gusted/forgejo-short-sha into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4828
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-06 01:06:34 +00:00
Renovate Bot
4b8726e599 Update module github.com/go-logr/logr to v1.4.2 2024-08-06 00:16:56 +00:00
Renovate Bot
d122196fac Update dependency postcss to v8.4.41 2024-08-06 00:16:18 +00:00
Gusted
cc11b3027c
[UI] Add reaction hover background color
- Follows 595e8abd68
- Add the reaction hover background color variable, slightly lighter
than the active background color.
2024-08-06 02:07:02 +02:00
Gusted
b967fce25d
[BUG] Allow 4 charachter SHA in /src/commit
- Adjust the `RepoRefByType` middleware to allow for commit SHAs that
are as short as 4 characters (the minium that Git requires).
- Integration test added.
- Follow up to 4d76bbeda7
- Resolves #4781
2024-08-06 01:45:41 +02:00
Earl Warren
641b0f74b6 Merge pull request 'Remove dachary from CODEOWNERS' (#4826) from gusted-patch-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4826
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 21:08:12 +00:00
Earl Warren
ed3fe01dd3 Merge pull request '[CHORE] Remove SSH DSA tests' (#4827) from gusted/forgejo-rm-dsa into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4827
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 21:03:25 +00:00
Gusted
eb8c125788
[CHORE] Remove SSH DSA tests
- Partially resolves #4659
- Fixes CI.
2024-08-05 20:34:19 +02:00
Gusted
4d789163bc Remove dachary from CODEOWNERS
I've asked dachary personally if this okay and he agreed.
2024-08-05 18:12:11 +00:00
Earl Warren
b7a4703231 Merge pull request 'Update module github.com/google/go-github/v57 to v63 (forgejo)' (#4824) from renovate/forgejo-github.com-google-go-github-v57-63.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4824
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 15:07:43 +00:00
Earl Warren
d853c8465d
Update module github.com/google/go-github/v57 to v63 (license update) 2024-08-05 16:26:06 +02:00
Earl Warren
6e98a57096 Merge pull request 'Implement an instance-wide activitypub actor' (#4811) from algernon/forgejo:to-be-or-not-to-be into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4811
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 14:23:02 +00:00
Renovate Bot
eab599de41 Update module github.com/google/go-github/v57 to v63 2024-08-05 13:21:39 +00:00
Gergely Nagy
f121e87aa6
activitypub: Implement an instance-wide actor
An instance-wide actor is required for outgoing signed requests that are
done on behalf of the instance, rather than on behalf of other actors.
Such things include updating profile information, or fetching public
keys.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-05 10:50:26 +02:00
Earl Warren
057256553b Merge pull request 'Update module golang.org/x/oauth2 to v0.22.0 (forgejo)' (#4816) from renovate/forgejo-golang.org-x-oauth2-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4816
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-05 07:52:39 +00:00
Earl Warren
88d5d78403
Update module golang.org/x/oauth2 to v0.22.0 (license update) 2024-08-05 09:01:07 +02:00
Renovate Bot
8e3b33dd53
Update module golang.org/x/oauth2 to v0.22.0 2024-08-05 09:01:05 +02:00
Earl Warren
98457eb67d Merge pull request 'Update module golang.org/x/sys to v0.23.0 (forgejo)' (#4817) from renovate/forgejo-golang.org-x-sys-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4817
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-05 06:59:14 +00:00
TheFox0x7
c738542201 Open telemetry integration (#3972)
This PR adds opentelemetry and chi wrapper to have basic instrumentation

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/3972): <!--number 3972 --><!--line 0 --><!--description YWRkIHN1cHBvcnQgZm9yIGJhc2ljIHJlcXVlc3QgdHJhY2luZyB3aXRoIG9wZW50ZWxlbWV0cnk=-->add support for basic request tracing with opentelemetry<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3972
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-08-05 06:04:39 +00:00
0ko
7c74def6ff i18n(en): remove unused strings (#4805)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4805
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 05:54:29 +00:00
Earl Warren
e08e47bbec
Update module golang.org/x/sys to v0.23.0 (license updates) 2024-08-05 07:45:16 +02:00
forgejo-renovate-action
3d4271e731 Merge pull request 'Update renovate to v38.18.12 (forgejo)' (#4815) from renovate/forgejo-renovate into forgejo 2024-08-05 05:29:17 +00:00
Earl Warren
811d96e74a Merge pull request 'Lock file maintenance (forgejo)' (#4818) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4818
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 05:27:45 +00:00
Solomon Victorino
3ee5bc262f fix(ui): handle out-of-bounds end line in code selection (#4788)
- fallback to the last line, preventing TypeError
- add E2E test

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4788
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Solomon Victorino <git@solomonvictorino.com>
Co-committed-by: Solomon Victorino <git@solomonvictorino.com>
2024-08-05 04:45:07 +00:00
Renovate Bot
a3fa6c7d8e Lock file maintenance 2024-08-05 02:06:16 +00:00
Renovate Bot
2c95baffeb Update module golang.org/x/sys to v0.23.0 2024-08-05 02:04:33 +00:00
Renovate Bot
00ae44129d Update renovate to v38.18.12 2024-08-05 00:02:57 +00:00
Gergely Nagy
cd17eb0fa7
activitypub: Sign the Host header too
Mastodon with `AUTHORIZED_FETCH` enabled requires the `Host` header to
be signed too, add it to the default for `setting.Federation.GetHeaders`
and `setting.Federation.PostHeaders`.

For this to work, we need to sign the request later: not immediately
after `NewRequest`, but just before sending them out with `client.Do`.
Doing so also lets us use `setting.Federation.GetHeaders` (we were using
`.PostHeaders` even for GET requests before).

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-04 23:57:48 +02:00
Earl Warren
c031881a20 Merge pull request 'Update module github.com/meilisearch/meilisearch-go to v0.27.2 (forgejo)' (#4799) from renovate/forgejo-github.com-meilisearch-meilisearch-go-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4799
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-04 16:25:38 +00:00
Earl Warren
359f712b46
chore(release-notes): weekly cherry-pick week 2024-32 2024-08-04 18:24:10 +02:00
Lunny Xiao
46f9fc2bc6
Rename head branch of pull requests when renaming a branch (#31759)
Fix #31716

(cherry picked from commit 572aaebd96b43bc576fe32187be82f689e855464)
2024-08-04 18:24:10 +02:00
Lunny Xiao
19fe44e4aa
Fix wiki revision pagination (#31760)
Fix #31755

(cherry picked from commit 976f78eb772801a978e2fe9ab35dfb769a8f852b)
2024-08-04 18:24:10 +02:00
Earl Warren
5f1017f27d
chore: update .deadcode.out 2024-08-04 18:24:10 +02:00
Kemal Zebari
1aaa70fddb
Remove unused code from models/repos/release.go (#31756)
These blocks aren't used anywhere else when doing a grep search.

(cherry picked from commit 0e3d8f80486be11ff53bdd9030a8b32d4f477d19)
2024-08-04 18:24:10 +02:00
Jason Song
0c40cff9a4
Clear up old Actions logs (#31735)
Part of #24256.

Clear up old action logs to free up storage space.

Users will see a message indicating that the log has been cleared if
they view old tasks.

<img width="1361" alt="image"
src="https://github.com/user-attachments/assets/9f0f3a3a-bc5a-402f-90ca-49282d196c22">

Docs: https://gitea.com/gitea/docs/pulls/40

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 687c1182482ad9443a5911c068b317a91c91d586)

Conflicts:
	custom/conf/app.example.ini
	routers/web/repo/actions/view.go
  trivial context conflict
2024-08-04 18:24:10 +02:00
Denys Konovalov
5734499778
add skip secondary authorization option for public oauth2 clients (#31454) (migration v301)
(cherry picked from commit a8d0c879c38e21a8e78db627119bf622d919ee75)
2024-08-04 18:24:10 +02:00
Henry Goodman
ee8f3e09f8
Allow force push to protected branches (#28086) (migration v300)
Fixes #22722

Currently, it is not possible to force push to a branch with branch
protection rules in place. There are often times where this is necessary
(CI workflows/administrative tasks etc).

The current workaround is to rename/remove the branch protection,
perform the force push, and then reinstate the protections.

Provide an additional section in the branch protection rules to allow
users to specify which users with push access can also force push to the
branch. The default value of the rule will be set to `Disabled`, and the
UI is intuitive and very similar to the `Push` section.

It is worth noting in this implementation that allowing force push does
not override regular push access, and both will need to be enabled for a
user to force push.

This applies to manual force push to a remote, and also in Gitea UI
updating a PR by rebase (which requires force push)

This modifies the `BranchProtection` API structs to add:
- `enable_force_push bool`
- `enable_force_push_whitelist bool`
- `force_push_whitelist_usernames string[]`
- `force_push_whitelist_teams string[]`
- `force_push_whitelist_deploy_keys bool`

<img width="943" alt="image"
src="https://github.com/go-gitea/gitea/assets/79623665/7491899c-d816-45d5-be84-8512abd156bf">

branch `test` being a protected branch:

![image](https://github.com/go-gitea/gitea/assets/79623665/e018e6e9-b7b2-4bd3-808e-4947d7da35cc)
<img width="1038" alt="image"
src="https://github.com/go-gitea/gitea/assets/79623665/57ead13e-9006-459f-b83c-7079e6f4c654">

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 12cb1d2998f2a307713ce979f8d585711e92061c)
2024-08-04 18:24:10 +02:00
Jason Song
3fdaabcdcf
Use UTC as default timezone when schedule Actions cron tasks (#31742)
Fix #31657.

According to the
[doc](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onschedule)
of GitHub Actions, The timezone for cron should be UTC, not the local
timezone. And Gitea Actions doesn't have any reasons to change this, so
I think it's a bug.

However, Gitea Actions has extended the syntax, as it supports
descriptors like `@weekly` and `@every 5m`, and supports specifying the
timezone like `TZ=UTC 0 10 * * *`. So we can make it use UTC only when
the timezone is not specified, to be compatible with GitHub Actions, and
also respect the user's specified.

It does break the feature because the times to run tasks would be
changed, and it may confuse users. So I don't think we should backport
this.

## ⚠️ BREAKING ⚠️

If the server's local time zone is not UTC, a scheduled task would run
at a different time after upgrading Gitea to this version.

(cherry picked from commit 21a73ae642b15982a911837775c9583deb47220c)
2024-08-04 18:24:10 +02:00
Jason Song
f6b1407e4c
Add permission description for API to add repo collaborator (#31744)
Fix #31552.

(cherry picked from commit 333c9ed8cab961b6dd58b04edc47a57dc4d6dbab)
2024-08-04 18:24:10 +02:00
Jason Song
6844258c67
Clarify Actions resources ownership (#31724)
Fix #31707.

Also related to #31715.

Some Actions resources could has different types of ownership. It could
be:

- global: all repos and orgs/users can use it.
- org/user level: only the org/user can use it.
- repo level: only the repo can use it.

There are two ways to distinguish org/user level from repo level:
1. `{owner_id: 1, repo_id: 2}` for repo level, and `{owner_id: 1,
repo_id: 0}` for org level.
2. `{owner_id: 0, repo_id: 2}` for repo level, and `{owner_id: 1,
repo_id: 0}` for org level.

The first way seems more reasonable, but it may not be true. The point
is that although a resource, like a runner, belongs to a repo (it can be
used by the repo), the runner doesn't belong to the repo's org (other
repos in the same org cannot use the runner). So, the second method
makes more sense.

And the first way is not user-friendly to query, we must set the repo id
to zero to avoid wrong results.

So, #31715 should be right. And the most simple way to fix #31707 is
just:

```diff
-	shared.GetRegistrationToken(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID)
+	shared.GetRegistrationToken(ctx, 0, ctx.Repo.Repository.ID)
```

However, it is quite intuitive to set both owner id and repo id since
the repo belongs to the owner. So I prefer to be compatible with it. If
we get both owner id and repo id not zero when creating or finding, it's
very clear that the caller want one with repo level, but set owner id
accidentally. So it's OK to accept it but fix the owner id to zero.

(cherry picked from commit a33e74d40d356e8f628ac06a131cb203a3609dec)
2024-08-04 18:24:10 +02:00
Jason Song
2302cf63c8
Distinguish LFS object errors to ignore missing objects during migration (#31702)
Fix #31137.

Replace #31623 #31697.

When migrating LFS objects, if there's any object that failed (like some
objects are losted, which is not really critical), Gitea will stop
migrating LFS immediately but treat the migration as successful.

This PR checks the error according to the [LFS api
doc](https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses).

> LFS object error codes should match HTTP status codes where possible:
>
> - 404 - The object does not exist on the server.
> - 409 - The specified hash algorithm disagrees with the server's
acceptable options.
> - 410 - The object was removed by the owner.
> - 422 - Validation error.

If the error is `404`, it's safe to ignore it and continue migration.
Otherwise, stop the migration and mark it as failed to ensure data
integrity of LFS objects.

And maybe we should also ignore others errors (maybe `410`? I'm not sure
what's the difference between "does not exist" and "removed by the
owner".), we can add it later when some users report that they have
failed to migrate LFS because of an error which should be ignored.

(cherry picked from commit 09b56fc0690317891829906d45c1d645794c63d5)
2024-08-04 18:24:10 +02:00
Jason Song
51f414d466
Improve names of cron jobs for Actions (#31736)
Before:

<img width="1641" alt="image"
src="https://github.com/user-attachments/assets/60fa3f3e-cf19-4903-b080-616aef28057b">

After:

<img width="1674" alt="image"
src="https://github.com/user-attachments/assets/b04fd01e-838d-45c3-9655-cb39a2f7d1f2">

(cherry picked from commit 9ac57c957f9dc88b1394008d6efb79f29a4c3396)

Conflicts:
	options/locale/locale_en-US.ini
  trivial context conflict
2024-08-04 18:23:54 +02:00
Earl Warren
fd33cc5b45 Merge pull request 'Prevent uppercase in header of dashboard context selector' (#4806) from 0ko/forgejo:ui-dashboard-context-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4806
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-04 13:21:30 +00:00
0ko
a4f1d0bc43 fix(ui): prevent uppercase in header of dashboard context selector 2024-08-04 16:10:15 +05:00
yp05327
c784a58740
Fix the display of project type for deleted projects (#31732)
Fix: #31727
After:

![image](https://github.com/user-attachments/assets/1dfb4b31-3bd6-47f7-b126-650f33f453e2)

(cherry picked from commit 75d0b61546e00390afdd850149de525dd64336a5)

Conflicts:
	options/locale/locale_en-US.ini
  trivial conflict & fix excessive uppercase to unify with the other translations
2024-08-04 10:14:34 +02:00
yp05327
49eb831663
Fix Null Pointer error for CommitStatusesHideActionsURL (#31731)
Fix https://github.com/go-gitea/gitea/pull/30156#discussion_r1695247028

Forgot fixing it in #31719

(cherry picked from commit 0a11bce87f07233d5f02554b8f3b4a2aabd37769)
2024-08-04 10:14:34 +02:00
Jason Song
43b184cf07
Move registerActionsCleanup to initActionsTasks (#31721)
There's already `initActionsTasks`; it will avoid additional check for
if Actions enabled to move `registerActionsCleanup` into it.

And we don't really need `OlderThanConfig`.

(cherry picked from commit f989f464386139592b6911cad1be4c901eb97fe5)
2024-08-04 10:14:34 +02:00
Jason Song
92fbc8e216
Set owner id to zero when GetRegistrationToken for repo (#31725)
Fix #31707.

It's split from #31724.

Although #31724 could also fix #31707, it has change a lot so it's not a
good idea to backport it.

(cherry picked from commit 81fa471119a6733d257f63f8c2c1f4acc583d21b)
2024-08-04 10:14:34 +02:00
Bo-Yi Wu
6a4d1dfab8
fix(api): owner ID should be zero when created repo secret (#31715)
- Change condition to include `RepoID` equal to 0 for organization
secrets

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit d39bce7f003cf2137a5a561ed488c7b638e52275)

Conflicts:
	routers/api/v1/repo/action.go
  trivial context conflict (PathParams vs Params)
2024-08-04 10:14:34 +02:00
Jason Song
6e63afe31f
Fix API endpoint for registration-token (#31722)
Partially fix #31707. Related to #30656

(cherry picked from commit bf5ae79c5163b8dd6a3185711ad11893b1270f62)
2024-08-04 10:14:34 +02:00
yp05327
2be49a3745
Fix loadRepository error when access user dashboard (#31719)
(cherry picked from commit 7b388630ecb4537f9bb04e55cbb10eb7cf83b9c5)
2024-08-04 10:14:34 +02:00
Lunny Xiao
7850fa30a5
Make GetRepositoryByName more safer (#31712)
Fix #31708

(cherry picked from commit d109923ed8e58bce0ad26b47385edbc79403803d)
2024-08-04 10:14:34 +02:00
Earl Warren
170c1c5152
Hide the "Details" link of commit status when the user cannot access actions (followup)
commit.Status may be nil
2024-08-04 10:14:34 +02:00
Earl Warren
c8e5e39865
Hide the "Details" link of commit status when the user cannot access actions (testifylint) 2024-08-04 08:54:32 +02:00
Zettat123
0dbc623028
Hide the "Details" link of commit status when the user cannot access actions (#30156)
Fix #26685

If a commit status comes from Gitea Actions and the user cannot access
the repo's actions unit (the user does not have the permission or the
actions unit is disabled), a 404 page will occur after clicking the
"Details" link. We should hide the "Details" link in this case.

<img
src="https://github.com/go-gitea/gitea/assets/15528715/68361714-b784-4bb5-baab-efde4221f466"
width="400px" />

(cherry picked from commit 7dec8de9147b20c014d68bb1020afe28a263b95a)

Conflicts:
	routers/web/repo/commit.go
  trivial context commit
2024-08-04 08:47:07 +02:00
Exploding Dragon
f17194ca91 Arch packages implementation (#4785)
This PR is from https://github.com/go-gitea/gitea/pull/31037

This PR was originally created by @d1nch8g , and the original source code comes from https://ion.lc/core/gitea.

This PR adds a package registry for [Arch Linux](https://archlinux.org/) packages with support for package files, [signatures](https://wiki.archlinux.org/title/Pacman/Package_signing), and automatic [pacman-database](https://archlinux.org/pacman/repo-add.8.html) management.

Features:

1. Push any ` tar.zst ` package and Gitea sign it.
2. Delete endpoint for specific package version and all related files
3. Supports trust levels with `SigLevel = Required`.
4. Package UI with instructions to connect to the new pacman database and visualised package metadata

![](/attachments/810ca6df-bd20-44c2-bdf7-95e94886d750)

You can follow [this tutorial](https://wiki.archlinux.org/title/Creating_packages) to build a *.pkg.tar.zst package for testing

docs pr: https://codeberg.org/forgejo/docs/pulls/791

Co-authored-by: d1nch8g@ion.lc
Co-authored-by: @KN4CK3R
Co-authored-by: @mahlzahn
Co-authored-by: @silverwind
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4785
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-08-04 06:16:29 +00:00
0ko
22d3659803 i18n(en): remove unused string admin.auths.enable_auto_register (#4797)
Introduced in d2aff9a46a.
Removed in cd37fccdfb.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4797
Reviewed-by: Otto <otto@codeberg.org>
2024-08-04 03:09:02 +00:00
Renovate Bot
d0684334b3 Update module github.com/meilisearch/meilisearch-go to v0.27.2 2024-08-04 00:03:09 +00:00
Earl Warren
e99be039d4 Merge pull request 'chore(ci): do not hardcode go version, use go.mod instead' (#4792) from earl-warren/forgejo:wip-go-mod into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4792
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-08-03 14:51:59 +00:00
Earl Warren
94f3589623
chore(ci): do not hardcode go version, use go.mod instead 2024-08-03 11:53:55 +02:00
0ko
37151d75cb Merge pull request 'Refactor user-cards as a grid' (#4760) from 0ko/forgejo:ui-usercards-grid into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4760
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-02 17:43:40 +00:00
0ko
cad8d09ba8 ui: refactor user-cards as a grid 2024-08-02 19:27:31 +05:00
Earl Warren
63fdc1298f Merge pull request 'Soft-quota foundations' (#4212) from algernon/forgejo:quota/helpers into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4212
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-02 12:27:45 +00:00
Gergely Nagy
f826f673d1
feat(quota): Add a terse release not about quotas
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-02 11:10:34 +02:00
Gergely Nagy
67fa52dedb
feat(quota): Quota enforcement
The previous commit laid out the foundation of the quota engine, this
one builds on top of it, and implements the actual enforcement.

Enforcement happens at the route decoration level, whenever possible. In
case of the API, when over quota, a 413 error is returned, with an
appropriate JSON payload. In case of web routes, a 413 HTML page is
rendered with similar information.

This implementation is for a **soft quota**: quota usage is checked
before an operation is to be performed, and the operation is *only*
denied if the user is already over quota. This makes it possible to go
over quota, but has the significant advantage of being practically
implementable within the current Forgejo architecture.

The goal of enforcement is to deny actions that can make the user go
over quota, and allow the rest. As such, deleting things should - in
almost all cases - be possible. A prime exemption is deleting files via
the web ui: that creates a new commit, which in turn increases repo
size, thus, is denied if the user is over quota.

Limitations
-----------

Because we generally work at a route decorator level, and rarely
look *into* the operation itself, `size:repos:public` and
`size:repos:private` are not enforced at this level, the engine enforces
against `size:repos:all`. This will be improved in the future.

AGit does not play very well with this system, because AGit PRs count
toward the repo they're opened against, while in the GitHub-style fork +
pull model, it counts against the fork. This too, can be improved in the
future.

There's very little done on the UI side to guard against going over
quota. What this patch implements, is enforcement, not prevention. The
UI will still let you *try* operations that *will* result in a denial.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-02 11:10:34 +02:00
Gergely Nagy
a414703c09
tests: Add an IsTemplate option to DeclarativeRepoOptions
This lets us use `CreateDeclarativeRepoWithOptions` to create template
repositories.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-02 11:10:34 +02:00
Gergely Nagy
e1fe3bbdc0
feat(quota): Humble beginnings of a quota engine
This is an implementation of a quota engine, and the API routes to
manage its settings. This does *not* contain any enforcement code: this
is just the bedrock, the engine itself.

The goal of the engine is to be flexible and future proof: to be nimble
enough to build on it further, without having to rewrite large parts of
it.

It might feel a little more complicated than necessary, because the goal
was to be able to support scenarios only very few Forgejo instances
need, scenarios the vast majority of mostly smaller instances simply do
not care about. The goal is to support both big and small, and for that,
we need a solid, flexible foundation.

There are thee big parts to the engine: counting quota use, setting
limits, and evaluating whether the usage is within the limits. Sounds
simple on paper, less so in practice!

Quota counting
==============

Quota is counted based on repo ownership, whenever possible, because
repo owners are in ultimate control over the resources they use: they
can delete repos, attachments, everything, even if they don't *own*
those themselves. They can clean up, and will always have the permission
and access required to do so. Would we count quota based on the owning
user, that could lead to situations where a user is unable to free up
space, because they uploaded a big attachment to a repo that has been
taken private since. It's both more fair, and much safer to count quota
against repo owners.

This means that if user A uploads an attachment to an issue opened
against organization O, that will count towards the quota of
organization O, rather than user A.

One's quota usage stats can be queried using the `/user/quota` API
endpoint. To figure out what's eating into it, the
`/user/repos?order_by=size`, `/user/quota/attachments`,
`/user/quota/artifacts`, and `/user/quota/packages` endpoints should be
consulted. There's also `/user/quota/check?subject=<...>` to check
whether the signed-in user is within a particular quota limit.

Quotas are counted based on sizes stored in the database.

Setting quota limits
====================

There are different "subjects" one can limit usage for. At this time,
only size-based limits are implemented, which are:

- `size:all`: As the name would imply, the total size of everything
  Forgejo tracks.
- `size:repos:all`: The total size of all repositories (not including
  LFS).
- `size:repos:public`: The total size of all public repositories (not
  including LFS).
- `size:repos:private`: The total size of all private repositories (not
  including LFS).
- `size:git:all`: The total size of all git data (including all
  repositories, and LFS).
- `size:git:lfs`: The size of all git LFS data (either in private or
  public repos).
- `size:assets:all`: The size of all assets tracked by Forgejo.
- `size:assets:attachments:all`: The size of all kinds of attachments
  tracked by Forgejo.
- `size:assets:attachments:issues`: Size of all attachments attached to
  issues, including issue comments.
- `size:assets:attachments:releases`: Size of all attachments attached
  to releases. This does *not* include automatically generated archives.
- `size:assets:artifacts`: Size of all Action artifacts.
- `size:assets:packages:all`: Size of all Packages.
- `size:wiki`: Wiki size

Wiki size is currently not tracked, and the engine will always deem it
within quota.

These subjects are built into Rules, which set a limit on *all* subjects
within a rule. Thus, we can create a rule that says: "1Gb limit on all
release assets, all packages, and git LFS, combined". For a rule to
stand, the total sum of all subjects must be below the rule's limit.

Rules are in turn collected into groups. A group is just a name, and a
list of rules. For a group to stand, all of its rules must stand. Thus,
if we have a group with two rules, one that sets a combined 1Gb limit on
release assets, all packages, and git LFS, and another rule that sets a
256Mb limit on packages, if the user has 512Mb of packages, the group
will not stand, because the second rule deems it over quota. Similarly,
if the user has only 128Mb of packages, but 900Mb of release assets, the
group will not stand, because the combined size of packages and release
assets is over the 1Gb limit of the first rule.

Groups themselves are collected into Group Lists. A group list stands
when *any* of the groups within stand. This allows an administrator to
set conservative defaults, but then place select users into additional
groups that increase some aspect of their limits.

To top it off, it is possible to set the default quota groups a user
belongs to in `app.ini`. If there's no explicit assignment, the engine
will use the default groups. This makes it possible to avoid having to
assign each and every user a list of quota groups, and only those need
to be explicitly assigned who need a different set of groups than the
defaults.

If a user has any quota groups assigned to them, the default list will
not be considered for them.

The management APIs
===================

This commit contains the engine itself, its unit tests, and the quota
management APIs. It does not contain any enforcement.

The APIs are documented in-code, and in the swagger docs, and the
integration tests can serve as an example on how to use them.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-02 11:10:34 +02:00
Gergely Nagy
250f87db59
feat(api): An order_by param for user.ListMyRepos
Add an optional `order_by` parameter to the `user.ListMyRepos`
handler (which handles the `/api/v1/user/repos` route), allowing a user
to sort repos by name (the default), id, or size.

The latter will be useful later for figuring out which repos use most
space, which repos eat most into a user's quota.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-08-02 10:52:21 +02:00
Gusted
b0a104d3d4 Merge pull request 'Distinguish between new tags, releases and pre-releases on activity page' (#4782) from mahlzahn/forgejo:repo_activity_releases into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4782
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-02 08:11:39 +00:00
Exploding Dragon
471265c4e0 Add signature support for the RPM module (#4780)
This pull request comes from https://github.com/go-gitea/gitea/pull/27069.

If the rpm package does not contain a matching gpg signature, the installation will fail. See ([gitea/gitea#27031](https://github.com/go-gitea/gitea/issues/27031)) , now auto-signing all new rpm uploads.

This option is turned off by default for compatibility.

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4780): <!--number 4780 --><!--line 0 --><!--description QWRkIHNpZ25hdHVyZSBzdXBwb3J0IGZvciB0aGUgUlBNIG1vZHVsZQ==-->Add signature support for the RPM module<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4780
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-08-02 05:56:57 +00:00
Robert Wolff
2795f5bc0e feat(UI): fix links, add labels for releases on repo activity page 2024-08-02 07:56:03 +02:00
Earl Warren
35ea74576e Merge pull request 'fix(release-notes-assistant): categorize multiline drafts & cleanup & update milestones' (#4779) from earl-warren/forgejo:wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4779
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-01 19:33:02 +00:00
Earl Warren
9597e041da
fix(release-notes-assistant): categorize multiline drafts & cleanup
Upgrade to release-notes-assistant 1.1.1:

* multiline release notes drafts were incorrectly categorized
  according the first line, instead of for each line
* when there is a backport, link the original PR first
* remove spurious </a>
2024-08-01 20:56:34 +02:00
Earl Warren
9df2fbb187 Merge pull request 'feat(UI): add links to icons in repository file list' (#4648) from mahlzahn/forgejo:add_icon_links_file_list into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4648
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-01 14:34:18 +00:00
Robert Wolff
b7f2739dfe feat(UI): add links to icons in repository file list 2024-08-01 13:32:01 +02:00
Codeberg Translate
3d3ddd7704 [I18N] Translations update from Weblate (#4668)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: lotigara <lotigara@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: caesar <caesar@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4668
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-01 06:57:25 +00:00
forgejo-renovate-action
2021a351e5 Merge pull request 'Update dependency vue to v3.4.35 (forgejo)' (#4772) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-08-01 00:39:41 +00:00
Renovate Bot
c0dde47d37 Update dependency vue to v3.4.35 2024-08-01 00:02:22 +00:00
Earl Warren
6bb541e0d0 Merge pull request '[API] Add error messages to dispatch API' (#4768) from gusted/forgejo-fix-dispatch-api-error into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4768
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 21:04:01 +00:00
Gusted
db78a3abed
[API] Add error messages to dispatch API
- Add a error messages to the dispatch
API (https://code.forgejo.org/api/swagger#/repository/DispatchWorkflow)
when incorrect values are given. Otherwise an incorrect error message is
shown to the user.
- Relevant https://codeberg.org/forgejo/forgejo/issues/4765#issuecomment-2125392
2024-07-31 21:09:17 +02:00
Gusted
a05d4c6154 Merge pull request 'feat(UI): add package counter to repo/user/org overview pages' (#4697) from mahlzahn/forgejo:add_packages_counter into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4697
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-31 18:52:30 +00:00
0ko
ca5a5bf120 feat: allow color and background-color style properties for table cells (#4766)
* Allow adding text color and background color to HTML table headers and cells in markdown.
* Added a few test cases.

Preview and example: https://codeberg.org/attachments/98634f30-4fa2-4a76-adb3-6086af73744f

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4766
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 18:48:46 +00:00
Earl Warren
5a59866a32 Merge pull request 'fix(action): forgejo-backport-action committer name and email' (#4764) from mahlzahn/forgejo:fix_forgejo_backport_action_comitter_info into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4764
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 16:54:49 +00:00
Robert Wolff
4d19cc3e38 fix(action): forgejo-backport-action committer name and email 2024-07-31 17:43:36 +02:00
Earl Warren
3e28df8f67 Merge pull request 'fix: use url.JoinPath to join url parts' (#4761) from viceice/tripple-slash-review-url into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4761
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 14:00:32 +00:00
Michael Kriese
46357e7856
fix: use url.JoinPath to join url parts
This avoids duplicated or more slashes.

fixes #4759
2024-07-31 14:45:37 +02:00
Earl Warren
49eeec269a Merge pull request 'fix(UI): missing rebase command line instructions for rebase ff-only' (#4758) from mahlzahn/forgejo:fix_command_line_instructions_rebase_ff_only into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4758
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 11:00:54 +00:00
Earl Warren
73cef92d6d Merge pull request 'Update module github.com/meilisearch/meilisearch-go to v0.27.1 (forgejo)' (#4755) from renovate/forgejo-github.com-meilisearch-meilisearch-go-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4755
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-07-31 10:47:38 +00:00
Robert Wolff
994bd93e69 feat(UI): add package counter to repo/user/org overview pages
- add package counter to repo/user/org overview pages
    - add go unit tests for repo/user has/count packages
    - add many more unit tests for packages model
    - fix error for non-existing packages in DeletePackageByID and SetRepositoryLink
2024-07-31 12:40:24 +02:00
Robert Wolff
622ccd4654 fix(UI): missing rebase command line instructions for rebase ff-only 2024-07-31 11:36:46 +02:00
Earl Warren
da97544fa0 Merge pull request '[UI] Fix admin layout' (#4754) from gusted/forgejo-fix-admin into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4754
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 04:12:44 +00:00
Renovate Bot
ccdd5d375b Update module github.com/meilisearch/meilisearch-go to v0.27.1 2024-07-31 00:02:33 +00:00
Gusted
7ec6014a10
[UI] Fix admin layout
- Partially reverts a72b660cbb
- Restores the behavior of #3087
2024-07-30 23:35:22 +02:00
TheFox0x7
4de909747b Add testifylint to lint checks (#4535)
go-require lint is ignored for now

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-07-30 19:41:10 +00:00
Earl Warren
94933470cd Merge pull request 'Implement external release assets' (#1445) from maltejur/forgejo:forgejo-external-attachments into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1445
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-30 15:50:57 +00:00
Earl Warren
ef7313097c Merge pull request 'Refactor repo migration items' (#4710) from 0ko/forgejo:ui-migration-items into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4710
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-30 15:48:29 +00:00
Earl Warren
d40873e768 Merge pull request '[gitea] week 2024-31 cherry pick (gitea/main -> forgejo)' (#4716) from earl-warren/wcp/2024-31 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4716
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-30 15:45:27 +00:00
Earl Warren
a0577572b0 Merge pull request 'Update linters (forgejo)' (#4739) from renovate/forgejo-linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4739
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-30 15:43:48 +00:00
Earl Warren
aa28af85b7 Merge pull request 'docs(release-notes): 8.0.0 & 7.0.6 - updates' (#4750) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4750
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-30 14:53:33 +00:00
Earl Warren
af557bfe18
docs(release-notes): 8.0.0 & 7.0.6 - updates
- remove duplicate APA line
2024-07-30 16:28:02 +02:00
Earl Warren
1e8c9beee6 Merge pull request 'docs(release-notes): 8.0.0 & 7.0.6 - updates' (#4746) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4746
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-30 12:11:24 +00:00
Earl Warren
578ac60f5f Merge pull request 'chore(renovate): use mirror image' (#4745) from viceice/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4745
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-30 10:34:10 +00:00
Renovate Bot
69edd8a4fe Update linters 2024-07-30 10:02:20 +00:00
Earl Warren
538bf07c08
docs(release-notes): 8.0.0 & 7.0.6 - updates
- add the release notes for 7.0.6
- move the two removed frontend features first in both 8.0.0 & 7.0.6
- remove extra </a>
2024-07-30 10:14:32 +02:00
Michael Kriese
707318fcc8
chore(renovate): use mirror image 2024-07-30 09:23:44 +02:00
Earl Warren
f7bc512123 Merge pull request 'docs(release-notes): 8.0.0 - updates' (#4742) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4742
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-30 05:55:39 +00:00
Earl Warren
8c2cb172fe
docs(release-notes): 8.0.0 - updates 2024-07-30 06:52:46 +02:00
Earl Warren
7b798a88ee Merge pull request 'fix(UI): issue task list numbers, fix #4431' (#4452) from mahlzahn/forgejo:fix_issue_task_list_numbers_issue_4431 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4452
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-29 20:50:42 +00:00
Earl Warren
2a09f88fd6 Merge pull request 'Lock file maintenance (forgejo)' (#4723) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4723
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-29 20:27:30 +00:00
Malte Jürgens
a61e7c7a39
Implement external assets 2024-07-29 20:35:55 +02:00
Earl Warren
2e234300a2 Merge pull request 'fix: never set to nil: poster of an issue or comment; assignee of a comment' (#4729) from earl-warren/forgejo:wip-ghost-npe into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4729
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-29 14:30:21 +00:00
Gusted
be9ee471fd Merge pull request '[UI] Show AGit label on merged PR' (#4715) from gusted/agit into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4715
Reviewed-by: Otto <otto@codeberg.org>
2024-07-29 14:21:50 +00:00
Gusted
0851aca863 Merge pull request '[PORT] Enable no-jquery/no-parse-html-literal and fix violation (gitea#31684)' (#4719) from gusted/forgejo-gt-31684 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4719
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-29 14:18:03 +00:00
Earl Warren
e6786db393
fix: never set Poster or Assignee to nil
When a user is not found for whatever reason, it must be mapped to the
GhostUser.

Fixes: https://codeberg.org/forgejo/forgejo/issues/4718
2024-07-29 15:24:02 +02:00
forgejo-renovate-action
e8ea126611 Merge pull request 'Update renovate to v38.8.4 (forgejo)' (#4722) from renovate/forgejo-renovate into forgejo 2024-07-29 08:36:08 +00:00
Renovate Bot
5e3d4b001c Update renovate to v38.9.0 2024-07-29 08:02:14 +00:00
Renovate Bot
e7ed1d1ca2 Lock file maintenance 2024-07-29 00:04:22 +00:00
Earl Warren
5bbc9ef97c Merge pull request 'Update module github.com/blevesearch/bleve/v2 to v2.4.2 (forgejo)' (#4706) from renovate/forgejo-github.com-blevesearch-bleve-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4706
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-07-28 15:13:42 +00:00
silverwind
2cf91d58e7
[PORT] Enable no-jquery/no-parse-html-literal and fix violation (gitea#31684)
Tested it, path segment creation works just like before.

---

Conflict resolution: trivial, also ported code from
https://github.com/go-gitea/gitea/pull/31283
2024-07-28 16:52:02 +02:00
Robert Wolff
5bb191e14d remove commented leftovers 2024-07-28 16:27:51 +02:00
Robert Wolff
90fe38ec83 add integration test for check list numbers on issues list page 2024-07-28 14:18:34 +00:00
Robert Wolff
531a18810b fix typo in regexp 2024-07-28 14:18:34 +00:00
Robert Wolff
574265e4a8 fix golangci-lint regexpMust 2024-07-28 14:18:34 +00:00
Robert Wolff
58c60ec11c add issue checklist integration test 2024-07-28 14:18:34 +00:00
Robert Wolff
b2bbf48c18 simplify regex for checkbox detection 2024-07-28 14:18:34 +00:00
Robert Wolff
9f461e180a remove requirement on trailing character after check box 2024-07-28 14:18:34 +00:00
Robert Wolff
a96b86778f fix unchecking check boxes like [X] 2024-07-28 14:18:34 +00:00
Robert Wolff
b222c48060 fix counting of all / done issue tasks, fix #4431 2024-07-28 14:18:34 +00:00
Earl Warren
f0379489bf
chore(release-notes): weekly cherry-pick week 2024-31 2024-07-28 09:00:29 +02:00
Earl Warren
c55f3bf3c3
chore: update .deadcode.out 2024-07-28 09:00:29 +02:00
Zettat123
41d7521b97
Support pull_request_target event for commit status (#31703)
Fix [act_runner #573](https://gitea.com/gitea/act_runner/issues/573)

Before:

![image](https://github.com/user-attachments/assets/3944bf7f-7a60-4801-bcb3-5e158a180fda)

After:

![image](https://github.com/user-attachments/assets/cadac944-40bd-4537-a9d9-e702b8bc1ece)

(cherry picked from commit 4b376a0ed934ba77d91ab182215fcff07b13c8df)

Conflicts:
	services/actions/commit_status.go
  trivial context conflict
2024-07-28 09:00:29 +02:00
Adam Majer
94e9cbcd71
Add return type to GetRawFileOrLFS and GetRawFile (#31680)
Document return type for the endpoints that fetch specific files from a
repository. This allows the swagger generated code to read the returned
data.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit bae87dfb0958e6a2920c905e51c2a026b7b71ca6)
2024-07-28 09:00:29 +02:00
yp05327
d0e52fd641
Support delete user email in admin panel (#31690)
![QQ_1721784609320](https://github.com/user-attachments/assets/23f08bf3-93f4-44d7-963d-10380ef8c1f1)

![QQ_1721784616403](https://github.com/user-attachments/assets/667cbd1e-5e21-4489-8d18-2a7be85190db)

![QQ_1721784626722](https://github.com/user-attachments/assets/495beb94-dfa2-481c-aa60-d5115cad1ae1)

---------

Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit cc044818c33ff066c4e5869c9e75de9707def6ed)
2024-07-28 09:00:29 +02:00
Earl Warren
3d1b8f47c0
Use GetDisplayName() instead of DisplayName() to generate rss feeds (followup)
The test only exists in Forgejo and the behavior it verifies now require
setting.UI.DefaultShowFullName to be true.
2024-07-28 09:00:29 +02:00
Stanislas Dolcini
e465ac854d
Use GetDisplayName() instead of DisplayName() to generate rss feeds (#31687)
Fixes #31491 The RSS feed converted ignored the setting used in the
application.

(cherry picked from commit d8f82cbc780d09bb7ad074407a48480f0333b4b3)
2024-07-28 07:27:10 +02:00
Kemal Zebari
f61873c7e4
Properly filter issue list given no assignees filter (#31522)
Quick fix #31520. This issue is related to #31337.

(cherry picked from commit c0b5a843badf7afa1f1aeb8f41cac87806ee188e)
2024-07-28 07:24:21 +02:00
techknowlogick
2563d71728
Enable direnv (#31672)
This lets developers who have direnv enabled to load our nix flake
automatically when entering it

(cherry picked from commit 24f9390f349581e5beb74c54e1f0af1998c8be71)
2024-07-28 07:18:24 +02:00
Earl Warren
22de4ae9c4 Merge pull request 'Update dependency @vitejs/plugin-vue to v5.1.1 (forgejo)' (#4713) from renovate/forgejo-vitejs-plugin-vue-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4713
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-28 05:04:03 +00:00
Gusted
358ec8002e
[UI] Show AGit label on merged PR
- The label wasn't show on merged PRs.
- Integration test added
2024-07-28 02:29:58 +02:00
Renovate Bot
bd38b15e74 Update dependency @vitejs/plugin-vue to v5.1.1 2024-07-28 00:02:00 +00:00
Gusted
4c40bf5d29 Merge pull request '[SEC] Notify owner about TOTP enrollment' (#4704) from gusted/sec-more-totp into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4704
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-27 20:53:47 +00:00
Earl Warren
e7a12286dd Merge pull request 'feat: optimize the FindUnreferencedPackages package query' (#4711) from earl-warren/forgejo:wip-container-simplify into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4711
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-07-27 15:33:13 +00:00
Earl Warren
ff6aceaeac
feat: optimize the FindUnreferencedPackages package query
Replace a double select with a simple select.

The complication originates from the initial implementation which
deleted packages instead of selecting them. It was justified to
workaround a problem in MySQL. But it is just a waste of resources
when collecting a list of IDs.
2024-07-27 15:57:24 +02:00
0ko
dac78913aa i18n(en): new repo form: remove full stops from placeholders, clarify labels (#4709)
Just a small PR fixing some lines.

* removed full stop from placeholders, they were placed inconsistent and it doesn't really makes sense to have them in placeholders. It's usually either no full stop or ellipsis.
* s/Issue labels/Labels - obviously labels aren't used just for issues

That's about it. I may or may not send other improvements for this page later, this is just a simple PR that doesn't need testing.

Preview: https://codeberg.org/attachments/f7040bb4-9749-4cd2-9953-289e1103ea3e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4709
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-27 13:18:40 +00:00
0ko
2ad377130b ui: refactor repo migration items 2024-07-27 16:35:48 +05:00
Earl Warren
5d40264f0f Merge pull request 'Migrate renovate config' (#4708) from renovate/migrate-config into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4708
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-27 06:51:17 +00:00
Renovate Bot
a74f3832a5 Migrate config renovate.json 2024-07-27 06:09:28 +00:00
Earl Warren
d9c82089ee Merge pull request 'Update renovate to v38 (forgejo) (major)' (#4703) from renovate/forgejo-major-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4703
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-27 04:45:24 +00:00
Renovate Bot
ac61d697b6 Update module github.com/blevesearch/bleve/v2 to v2.4.2 2024-07-27 00:02:33 +00:00
Renovate Bot
5da7b3ae1f Update renovate to v38 2024-07-26 20:01:43 +00:00
Gusted
a7e96aae66
[SEC] Notify owner about TOTP enrollment
- In the spirit of #4635
- Notify the owner when their account is getting enrolled into TOTP. The
message is changed according if they have security keys or not.
- Integration test added.
2024-07-26 19:49:22 +02:00
Gusted
8db2534082 Merge pull request '[MAIL] Use correct function in mail footer' (#4702) from gusted/forgejo-fix-auth-mail into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4702
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-26 14:11:30 +00:00
Gusted
685a903cd5
[MAIL] Use correct function in mail footer
- Regression of #4635
- The authentication mails weren't being sent with links to the
instance, because the the wrong variable was used in the mail footer.
`$.AppUrl` should've been `AppUrl`.
- Unit test added.
2024-07-26 15:16:54 +02:00
Earl Warren
2285526e93 Merge pull request 'chore(renovate): fix renovate grouping' (#4700) from viceice/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4700
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-26 12:46:49 +00:00
Michael Kriese
bc259542b5
chore(renovate): fix renovate grouping 2024-07-26 14:07:39 +02:00
Earl Warren
904925ee4d Merge pull request 'Update dependency tailwindcss to v3.4.7 (forgejo)' (#4695) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4695
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-26 04:52:59 +00:00
Renovate Bot
c192e70b94 Update dependency tailwindcss to v3.4.7 2024-07-26 00:02:10 +00:00
Earl Warren
1f939a2a40 Merge pull request 'feat(release-notes-assistant): diff of the change in preview' (#4693) from twenty-panda/forgejo:wip-rna into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4693
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 20:51:16 +00:00
Earl Warren
90f80be3f0 Merge pull request 'Fix conversation template' (#4691) from 0ko/forgejo:ui-roles-reviews into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4691
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 20:46:11 +00:00
Twenty Panda
b85ec067ca feat(release-notes-assistant): diff of the change in preview 2024-07-25 22:32:14 +02:00
0ko
13cb4b3f2e fix(ui): fix conversation template 2024-07-25 23:51:17 +05:00
Earl Warren
edf2cbe768 Merge pull request '[I18N] Remove unneeded translation' (#4690) from gusted/forgejo-rm-unneeded-tr into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4690
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 16:04:49 +00:00
Gusted
76759715d2
[I18N] Remove unneeded translation
- This key isn't used, I added this on accident (likely bad copy-paste).
- Regression of #4635
2024-07-25 17:04:23 +02:00
Earl Warren
c43bb32010 Merge pull request 'fix(api): issue state change is not idempotent' (#4687) from earl-warren/forgejo:wip-issue-state-idempotency into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4687
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-25 14:20:34 +00:00
Earl Warren
e9e3b8c0f3
fix(api): issue state change is not idempotent
The PATCH if issue & pull request switched to use the service
functions instead. However, the service function changing the state is
not idempotent. Instead of doing nothing which changing from open to
open or close to close, it will fail with an error like:

 Issue [2472] 0 was already closed

Regression of: 6a4bc0289d

Fixes: https://codeberg.org/forgejo/forgejo/issues/4686
2024-07-25 15:16:44 +02:00
Earl Warren
f8bc48f8df Merge pull request 'Update dependency vue to v3.4.34 (forgejo)' (#4678) from renovate/forgejo-patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4678
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-25 08:50:10 +00:00
Earl Warren
8571f1d5d9 Merge pull request 'Update dependency monaco-editor to v0.50.0 (forgejo)' (#4604) from renovate/forgejo-monaco-editor-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4604
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-25 08:10:30 +00:00
Earl Warren
0713451c28 Merge pull request 'Update dependency postcss to v8.4.40 (forgejo)' (#4677) from renovate/forgejo-postcss-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4677
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-25 08:10:20 +00:00
Renovate Bot
03c1b61573 Update dependency vue to v3.4.34 2024-07-25 08:04:49 +00:00
Earl Warren
875e6496c6 Merge pull request '[CHORE] Remove AGPL-1.0 as allowed license' (#4673) from gusted/forgejo-rm-agpl into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4673
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-25 07:40:19 +00:00
Earl Warren
783fa3e108 Merge pull request 'fix(release-notes-assistant): remove extra newline on breaking bugs' (#4683) from earl-warren/forgejo:wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4683
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-25 07:32:51 +00:00
Earl Warren
4f7746427f
fix(release-notes-assistant): remove extra newline on breaking bugs 2024-07-25 08:26:03 +02:00
Robert Wolff
0a74c95b2a fix(ui): use right placeholder string in milestones search (#4628)
This PR fixes a wrong placeholder for the search for milestones. I tested it locally (see attachments, below).

Before: https://codeberg.org/attachments/ba845ce1-1f20-4131-a74d-7220986a4acf
After: https://codeberg.org/attachments/0c4e32ee-b1a8-4472-837d-daa2a2a50121

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4628
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
2024-07-25 03:33:44 +00:00
Gusted
56dbe3263f Merge pull request '[CHORE] Don't bundle elkjs' (#4670) from gusted/forgejo-elkjs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4670
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 00:15:35 +00:00
Renovate Bot
c23cac5073 Update dependency postcss to v8.4.40 2024-07-25 00:04:25 +00:00
Gusted
a6b4fb7729
[CHORE] Remove AGPL-1.0 as allowed license
- The last dependency using this license was removed in #4595 (thanks @Beowulf!).
2024-07-24 23:38:31 +02:00
Earl Warren
419c129ec7 Merge pull request 'Replace Gitea with Forgejo' (#4660) from yonas/forgejo:yonas-patch-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4660
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-24 21:35:14 +00:00
Earl Warren
c75c6b392c Merge pull request '[UI] Fix scoped-access-token' (#4669) from gusted/forgejo-fix-regg into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4669
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-24 21:34:19 +00:00
Gusted
510cbe2c92
[CHORE] Don't bundle elkjs
- `elkjs` is a library that's imported by `mermaid`, although they have
seperated this package to it's own mermaid
package (https://github.com/mermaid-js/mermaid/pull/5654), the stable
version doesn't have this patch.
- `elkjs` is licensed under the EPL-2.0 license (copyleft), which isn't
compatible with GPL unless the license author explcitly allow this via a
so called "secondary license". At the end of the day it cannot be
released under a MIT or GPL license.
- Use webpack's `externals` option to avoid bundling `elkjs` and instead
leave it as a `require` code.
- This is a 'dirty' way to ensure elkjs isn't bundled and has to be
tested manually to ensure this for every release (via the
`webpack-bundle-analyzer` plugin). If someone tries to use the elkjs
render, it will result in a non-descriptive error being shown.
2024-07-24 23:28:59 +02:00
Gusted
aa5163d5c4
[UI] Fix scoped-access-token
- Regression of #4571
- Refactor to not use the component API of Vue. The root cause is still
unknown.
2024-07-24 21:48:51 +02:00
Earl Warren
b55136d561 Merge pull request 'fix(release-notes-assistant): do not trigger on open' (#4665) from twenty-panda/forgejo:wip-rna-trigger into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4665
2024-07-24 16:32:43 +00:00
Twenty Panda
e9a3306f6e fix(release-notes-assistant): do not trigger on open
Forgejo sets a label and will notify this when opening the pull
request. Triggering when it opens will make two workflows for the same
SHA. Re-opening is a border case that is not needed.
2024-07-24 18:26:59 +02:00
Earl Warren
762f4b5408 Merge pull request 'fix(release-notes-assistant): ignore WIP prefixes' (#4663) from earl-warren/forgejo:wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4663
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-24 14:55:29 +00:00
Earl Warren
ba006b2eef
fix(release-notes-assistant): ignore WIP prefixes 2024-07-24 16:49:21 +02:00
yonas
9ad23f9ede Replace Gitea with Forgejo 2024-07-24 14:17:23 +00:00
Earl Warren
479a98fd18 Merge pull request 'docs(release-notes): 8.0.0 - updates' (#4657) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4657
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-24 13:17:13 +00:00
Earl Warren
77c30ad85b
docs(release-notes): 8.0.0 - updates 2024-07-24 15:14:38 +02:00
Codeberg Translate
7699d85f3b [I18N] Translations update from Weblate (#4568)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Localization
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4568)</a>: <!--number 4568 --><!--line 0 --><!--description W0kxOE5dIFRyYW5zbGF0aW9ucyB1cGRhdGUgZnJvbSBXZWJsYXRl-->[I18N] Translations update from Weblate<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
Co-authored-by: Bálint Gonda <balinteus@gmail.com>
Co-authored-by: Beowulf <Beowulf@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4568
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-07-24 08:41:30 +00:00
Earl Warren
a0dbc3ae70 Merge pull request 'fix(release-notes-assistant): add the Localization category' (#4655) from earl-warren/forgejo:wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4655
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-24 07:18:41 +00:00
Earl Warren
bca3f857dc Merge pull request 'Update dependency @vitejs/plugin-vue to v5.1.0 (forgejo)' (#4653) from renovate/forgejo-vitejs-plugin-vue-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4653
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-24 05:20:30 +00:00
Earl Warren
54e364b7bc
fix(release-notes-assistant): add the Localization category
The Localization category groups translations updates towards the end
of the release notes.
2024-07-24 06:22:35 +02:00
Earl Warren
1a2c611c42 Merge pull request 'feat(release-notes-assistant): if no labels, fallback to prefix' (#4651) from twenty-panda/forgejo:wip-rna into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4651
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 04:04:47 +00:00
Renovate Bot
1f4666c6cd Update dependency @vitejs/plugin-vue to v5.1.0 2024-07-24 00:04:06 +00:00
Twenty Panda
7db4dfa768 fix(release-notes-assistant): upgrade to convert \r\n
When a milestone or a pull request body is \r\n separated, they are
converted to newlines. Otherwise it makes it more difficult to compare
lines.
2024-07-24 00:07:53 +02:00
Twenty Panda
db64236f85 feat(release-notes-assistant): if no labels, fallback to prefix
* support feat: fix: feat!: fix! conventional commits prefixes
* add unit tests
2024-07-24 00:07:29 +02:00
Earl Warren
14d079a1eb Merge pull request '[FEAT] Enable INVALIDATE_REFRESH_TOKENS' (#4633) from gusted/sec-oauth into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4633
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 20:45:22 +00:00
Earl Warren
5a922ca983 Merge pull request 'Release note for #4595' (#4634) from beowulf/release-notes/4595.md into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4634
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 18:18:30 +00:00
Gusted
ea1a0ebbc3 Merge pull request '[SECURITY] Notify users about account security changes' (#4635) from gusted/sec-notify into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4635
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 17:50:59 +00:00
Beowulf
44156b6006
added release notes for pr 4595
(removed support for the APA citation format)
2024-07-23 18:47:42 +02:00
Gusted
4383da91bd
[SECURITY] Notify users about account security changes
- Currently if the password, primary mail, TOTP or security keys are
changed, no notification is made of that and makes compromising an
account a bit easier as it's essentially undetectable until the original
person tries to log in. Although other changes should be made as
well (re-authing before allowing a password change), this should go a
long way of improving the account security in Forgejo.
- Adds a mail notification for password and primary mail changes. For
the primary mail change, a mail notification is sent to the old primary
mail.
- Add a mail notification when TOTP or a security keys is removed, if no
other 2FA method is configured the mail will also contain that 2FA is
no longer needed to log into their account.
- `MakeEmailAddressPrimary` is refactored to the user service package,
as it now involves calling the mailer service.
- Unit tests added.
- Integration tests added.
2024-07-23 18:31:47 +02:00
Earl Warren
ded237ee77 Merge pull request '[gitea] week 2024-30 cherry pick (gitea/main -> forgejo)' (#4607) from algernon/wcp/2024-30 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4607
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 16:01:28 +00:00
banaanihillo
522e652e8d [accessibility] Add keyboard support for test actions (#4490)
- Existing gear icon keyup handler fixed:
moved the handler onto its descendant button,
to prevent it from incorrectly firing on the check-box elements
- Check-box elements: keyup elements for space and enter added,
as well as tabindex elements to make them able to gain focus

<!--
Before submitting a PR, please read the contributing guidelines:
https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
-->

To test the check boxes:
- Set up an action, and visit the action's job page
- Navigate onto the job container (via Tab et al.)
- Use the gear icon with Space or Enter
- Tick the check-box items with Space or Enter

To test the elements beside the chevron icons:
- Navigate onto the element via Tab et al.
- Open/close them via Space or Enter

I have not had a chance to test the latter fix (https://codeberg.org/forgejo/forgejo/issues/4476#issuecomment-2092312) myself yet; feel free to reject this one in case the latter fix does not work as it should, and I will break this up into two separate pull requests.

<!--start release-notes-assistant-->

## Draft release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/4490)</a>: <!--number 4490 --><!--line 0 --><!--description W2FjY2Vzc2liaWxpdHldIEFkZCBrZXlib2FyZCBzdXBwb3J0IGZvciB0ZXN0IGFjdGlvbnM=-->[accessibility] Add keyboard support for test actions<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4490
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: banaanihillo <banaanihillo@noreply.codeberg.org>
Co-committed-by: banaanihillo <banaanihillo@noreply.codeberg.org>
2024-07-23 15:37:19 +00:00
Earl Warren
dd9abfcc09 Merge pull request 'fix(release-notes-assistant): upgrade to always insert a newline' (#4646) from twenty-panda/forgejo:wip-rna into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4646
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 13:20:18 +00:00
Gusted
3ba64bd038 Merge pull request 'Reserve the devtest username' (#4638) from ikuyo/forgejo:reserve-devtest into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4638
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-23 12:59:16 +00:00
Twenty Panda
80a1461e7d fix(release-notes-assistant): upgrade to always insert a newline
* if <!-- is inserted just after a <!-- --> it will not render
  well, it needs to be separated by a newline
* do not use ? in sed -E, it is not the same as with JavaScript
2024-07-23 13:53:46 +02:00
Earl Warren
1fa7d1cbcf Merge pull request 'fix(release-notes-assistant): be more conservative when cleaning up' (#4644) from twenty-panda/forgejo:wip-rna into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4644
2024-07-23 09:42:20 +00:00
Twenty Panda
043214d751 fix(release-notes-assistant): be more conservative when cleaning up
Do not replace http*: it breaks URLs.
2024-07-23 11:37:40 +02:00
Earl Warren
6e86f4056e Merge pull request 'fix(ci): use a PAT for release-notes-assistant' (#4643) from earl-warren/forgejo:wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4643
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-23 08:20:01 +00:00
Earl Warren
9bbe00c84b
fix(ci): use a PAT for release-notes-assistant
GITHUB_TOKEN does not have permission to write the repository and is
not allowed to edit or comment on pull requests because of that. A PAT
from a regular user who does **not** have permission to write to the
repository either but who is in a the contributors team will have
permissions to do that because there is a "write pull request"
permission given to the team.
2024-07-23 10:02:00 +02:00
Earl Warren
2c2f2ffee2 Merge pull request 'update the PR description with the release notes draft' (#4612) from wip-rna-preview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4612
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-23 07:30:59 +00:00
Twenty Panda
5c734d8885
tests: update the PR description with the release notes draft
If the 'worth a release-note' label is set, add a release note entry
to the description of the pull request as a preview.

* use the `release-notes/<pr-number>.md` file if any
* otherwise use the pull request title

Refs: https://code.forgejo.org/forgejo/release-notes-assistant
2024-07-23 09:27:43 +02:00
Earl Warren
03b95d20fa Merge pull request 'feat(ui): sort milestones by name by default instead of the due date' (#4625) from gusted/forgejo-gt-27084 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4625
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 06:08:24 +00:00
Ikuyo
859cc23dc2
Add missing trailing comma 2024-07-23 11:04:57 +05:00
Earl Warren
767f0ed63f Merge pull request '[CHORE] Add playwright eslint plugin' (#4631) from gusted/playwright-eslint into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4631
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-23 06:02:12 +00:00
Earl Warren
d58b9b4fe0 Merge pull request 'feat(cli): allow updates to runners' secrets' (#4619) from tseeker/forgejo:20240722-update-secret into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4619
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-23 04:59:51 +00:00
0ko
e03922a009 Merge pull request '[I18N] Add common section to new translation files' (#4632) from gusted/tr-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4632
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-23 04:14:22 +00:00
Ikuyo
90c0e9dace
Add devtest in reserved usernames test 2024-07-23 08:38:55 +05:00
Ikuyo
93d0836241
Reserve devtest username 2024-07-23 08:18:20 +05:00
forgejo-renovate-action
2ad871e653 Merge pull request 'Update dependency @playwright/test to v1.45.3 (forgejo)' (#4637) from renovate/forgejo-playwright-monorepo into forgejo 2024-07-23 00:42:45 +00:00
Renovate Bot
1d5286943f Update dependency @playwright/test to v1.45.3 2024-07-23 00:03:37 +00:00
Gusted
2f98430e6f Merge pull request 'Update dependency webpack to v5.93.0 (forgejo)' (#4484) from renovate/forgejo-webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4484
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-22 22:41:44 +00:00
Gusted
89b1723d35
[FEAT] Enable INVALIDATE_REFRESH_TOKENS
- It's possible to detect if refresh tokens are used more than once, if
it's used more than it's a indication of a replay attack and it should
invalidate the associated access token. This behavior is controlled by
the `INVALIDATE_REFRESH_TOKENS` setting.
- Altough in a normal scenario where TLS is being used, it should be
very hard to get to situation where replay attacks are being used, but
this is better safe than sorry.
- Enable `INVALIDATE_REFRESH_TOKENS` by default.
2024-07-22 20:45:13 +02:00
Gusted
a67e420c38
[I18N] Add common section to new translation files
- Follow up for #4576
- Weblate currently cannot parse ini files if they contain keys that
don't belong to a section.
2024-07-22 20:14:24 +02:00
Gusted
40baa96fc3
[CHORE] Add playwright eslint plugin
- Add https://github.com/playwright-community/eslint-plugin-playwright
as a linter for the playwright tests.
- `no-networkidle` and `no-conditional-in-test` are disabled as fixing
those doesn't seem to really improve testing quality for our use case.
- Some non-recommended linters are enabled to ensure consistency (the
prefer rules).
2024-07-22 20:03:32 +02:00
0ko
de24846309 Merge pull request 'Allow .webp attachments by default' (#4605) from 0ko/forgejo:webp into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4605
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-22 15:34:32 +00:00
0ko
e819c1622e i18n: restore Malayalam and Serbian files, remove ml-IN from the language selector (#4576)
* Closes https://codeberg.org/forgejo/forgejo/issues/4563
* A followup to my 2024-February investigation in the Localization room

* Restore Malayalam and Serbian locales that were deleted in 067b0c2664 and f91092453e. Bulgarian was also deleted, but we already have better Bulgarian translation.
* Remove ml-IN from the language selector. It was not usable for 1.5 years, has ~18% completion and was not maintained in those ~1.5 years. It could also have placeholder bugs due to refactors.

Restoring files gives the translators a base to work with and makes the project advertised on Weblate homepage for logged in users in the Suggestions tab. Unlike Gitea, we store our current translations directly in the repo and not on a separate platform, so it makes sense to add these files back.
Removing selector entry avoids bugs and user confusion. I will make a followup for the documentation.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4576
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-22 14:08:15 +00:00
silverwind
f37d8fc0ed
Remove unneccessary uses of word-break: break-all (#31637)
Fixes: https://github.com/go-gitea/gitea/issues/31636

1. Issue sidebar topic is disussed in
https://github.com/go-gitea/gitea/issues/31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 0c1127a2fb4c07576b4a2e4cffbcd2b0c8670a27)
2024-07-22 15:50:57 +02:00
Gergely Nagy
0792f81e04
Add a release note for cherry-picked features
This adds a release note file for features cherry picked during the
2024-30 weekly gitea->forgejo cherry pick.

Thanks @earl-warren for the notes themselves!

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-07-22 15:46:01 +02:00
Rowan Bohde
21fdd28f08
allow synchronizing user status from OAuth2 login providers (#31572)
This leverages the existing `sync_external_users` cron job to
synchronize the `IsActive` flag on users who use an OAuth2 provider set
to synchronize. This synchronization is done by checking for expired
access tokens, and using the stored refresh token to request a new
access token. If the response back from the OAuth2 provider is the
`invalid_grant` error code, the user is marked as inactive. However, the
user is able to reactivate their account by logging in the web browser
through their OAuth2 flow.

Also changed to support this is that a linked `ExternalLoginUser` is
always created upon a login or signup via OAuth2.

Ideally, we would also refresh permissions from the configured OAuth
provider (e.g., admin, restricted and group mappings) to match the
implementation of LDAP. However, the OAuth library used for this `goth`,
doesn't seem to support issuing a session via refresh tokens. The
interface provides a [`RefreshToken`
method](https://github.com/markbates/goth/blob/master/provider.go#L20),
but the returned `oauth.Token` doesn't implement the `goth.Session` we
would need to call `FetchUser`. Due to specific implementations, we
would need to build a compatibility function for every provider, since
they cast to concrete types (e.g.
[Azure](https://github.com/markbates/goth/blob/master/providers/azureadv2/azureadv2.go#L132))

---------

Co-authored-by: Kyle D <kdumontnu@gmail.com>
(cherry picked from commit 416c36f3034e228a27258b5a8a15eec4e5e426ba)

Conflicts:
	- tests/integration/auth_ldap_test.go
	  Trivial conflict resolved by manually applying the change.
	- routers/web/auth/oauth.go
	  Technically not a conflict, but the original PR removed the
	  modules/util import, which in our version, is still in use. Added it
	  back.
2024-07-22 15:44:13 +02:00
6543
004cc6dc0a
Add option to change mail from user display name (#31528)
Make it posible to let mails show e.g.:

`Max Musternam (via gitea.kithara.com) <gitea@kithara.com>`

Docs: https://gitea.com/gitea/docs/pulls/23

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit 0f533241829d0d48aa16a91e7dc0614fe50bc317)

Conflicts:
	- services/mailer/mail_release.go
	  services/mailer/mail_test.go

	  In both cases, applied the changes manually.
2024-07-22 15:44:13 +02:00
Lunny Xiao
54f2dcff9d
Upgrade xorm to v1.3.9 and improve some migrations Sync (#29899)
Co-authored-by: 6543 <6543@obermui.de>
(cherry picked from commit 0d08bb6112884411eb4f58b056278d3c824a8fc0)
2024-07-22 15:44:13 +02:00
6543
d0227c236a
Issue Templates: add option to have dropdown printed list (#31577)
Issue template dropdown can have many entries, and it could be better to
have them rendered as list later on if multi-select is enabled.

so this adds an option to the issue template engine to do so.

DOCS: https://gitea.com/gitea/docs/pulls/19

---

## demo:

```yaml
name: Name
title: Title
about: About
labels: ["label1", "label2"]
ref: Ref
body:
  - type: dropdown
    id: id6
    attributes:
      label: Label of dropdown (list)
      description: Description of dropdown
      multiple: true
      list: true
      options:
        - Option 1 of dropdown
        - Option 2 of dropdown
        - Option 3 of dropdown
        - Option 4 of dropdown
        - Option 5 of dropdown
        - Option 6 of dropdown
        - Option 7 of dropdown
        - Option 8 of dropdown
        - Option 9 of dropdown
```

![image](https://github.com/user-attachments/assets/102ed0f4-89da-420b-ab2a-1788b59676f9)

![image](https://github.com/user-attachments/assets/a2bdb14e-43ff-4cc6-9bbe-20244830453c)

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit 1064e817c4a6fa6eb5170143150505503c4ef6ed)
2024-07-22 15:44:13 +02:00
Gusted
b67fa954a6
Make it consistent with the other sorting filters 2024-07-22 15:01:36 +02:00
Bartlomiej Komendarczuk
5e8a830505
[PORT] Added default sorting milestones by name (gitea#27084)
Resolves https://github.com/go-gitea/gitea/issues/26996
Added default sorting for milestones by name.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

---

Conflict resolution: trivial, was due to the improvement made to 'the due
date sorting' strings.

(cherry picked from commit e8d4b7a8b198eca3b0bd117efb422d7d7cac93fe)
2024-07-22 14:55:58 +02:00
Earl Warren
d405143919 Merge pull request 'fix(actions): no edited event triggered when a title is changed' (#4618) from twenty-panda/forgejo:wip-notify-title into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4618
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 11:45:48 +00:00
Emmanuel BENOÎT
320ab7ed7f
feat(cli): allow updates to runners' secrets
This commit allows the `forgejo-cli actions register` command to change
an existing runner's secret, as discussed in #4610.

It refactors `RegisterRunner` to extract the code that hashes the token,
moving this code to a method called `UpdateSecret` on `ActionRunner`.
A test for the method has been added.

The `RegisterRunner` function is updated so that:
- it relies on `ActionRunner.UpdateSecret` when creating new runners,
- it checks whether an existing runner's secret still matches the one
  passed on the command line,
- it updates the runner's secret if it wasn't created and it no longer
  matches.

A test has been added for the new behaviour.
2024-07-22 11:55:43 +02:00
Twenty Panda
f6000c3760 fix(actions): no edited event triggered when a title is changed
When the title of an issue or a pull request is changed, the edited
event must be triggered, in the same way it is when the body of the
description is changed.

The web endpoints and the API endpoints for both pull requests and
issues rely on issue_service.ChangeTitle which calls
notify_service.IssueChangeTitle.
2024-07-22 11:25:20 +02:00
Emmanuel BENOÎT
fdb1874ada feat(cli): add --keep-labels flag to forgejo actions register (#4610)
This commit adds a new flag, `--keep-labels`, to the runner registration CLI command. If this flag is present and the runner being registered already exists, it will prevent the runners' labels from being reset.

In order to accomplish this, the signature of the `RegisterRunner` function from the `models/actions` package has been modified so that the labels argument can be nil. If it is, the part of the function that updates the record will not change the runner.

Various tests have been added for this function, for the following cases: new runner with labels, new runner without label, existing runner with labels, existing runner without labels.

The flag has been added to the CLI command, the action function has been updated to read the labels parameters through a separate function (`getLabels`), and test cases for this function have been added.

<!--
Before submitting a PR, please read the contributing guidelines:
https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4610
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>
2024-07-22 07:33:45 +00:00
Earl Warren
8030ebf64c Merge pull request 'Update module xorm.io/xorm to v1.3.9 (forgejo)' (#4608) from renovate/forgejo-xorm.io-xorm-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4608
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 06:37:34 +00:00
Earl Warren
7511ae532e docs: add a PR checklist template (#4564)
Manual testing of  this template can be done with the new playground created for that purpose, see https://code.forgejo.org/forgejo/pr-and-issue-templates/pulls/19.

![image](/attachments/1ee36ae1-669f-47d8-8307-9734faa0dc2a)

## Testing instructions

* Fork https://code.forgejo.org/forgejo/pr-and-issue-templates
* Create a pull request against https://code.forgejo.org/forgejo/pr-and-issue-templates
* See that the commit message is on top and the checklist below it

---

Use cases:

* https://codeberg.org/forgejo/forgejo/pulls/4553
* https://codeberg.org/forgejo/forgejo/pulls/4554

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4564
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: thefox <thefox@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-07-22 05:23:54 +00:00
Earl Warren
5a41d902bd Merge pull request 'Lock file maintenance (forgejo)' (#4616) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4616
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 04:34:15 +00:00
Earl Warren
b9272b2923 Merge pull request 'Update renovate to v37.438.2 (forgejo)' (#4615) from renovate/forgejo-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4615
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-22 04:33:33 +00:00
Renovate Bot
fdf07888c3 Lock file maintenance 2024-07-22 00:07:27 +00:00
Renovate Bot
20de7e5fdf Update renovate to v37.438.2 2024-07-22 00:04:06 +00:00
Renovate Bot
1c63c47f5f Update module xorm.io/xorm to v1.3.9 2024-07-21 16:03:40 +00:00
0ko
78a0ca1c9d feat: allow .webp attachments by default 2024-07-21 13:01:08 +05:00
0ko
86298c5be2 Merge pull request 'English improvements' (#4599) from 0ko/forgejo:i18n-english-20240720 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4599
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-21 06:51:21 +00:00
Earl Warren
914f75533f Merge pull request '[BUG] Fix panic on too high page number' (#4603) from gusted/forgejo-commit-panic into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4603
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-07-21 05:59:40 +00:00
0ko
d3bb19e03b i18n(en): clarify texts on suspended account screen 2024-07-21 09:01:50 +05:00
0ko
19dbefc5c8 i18n(en): don't advertize trying to run Forgejo on Windows
Co-authored-by: Otto <fnetx@noreply.codeberg.org>
2024-07-21 09:01:32 +05:00
Gusted
15540445d9 Merge pull request '[BUG] Don't panic on empty blockquote' (#4602) from gusted/forgejo-md-panic into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4602
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-07-21 00:09:56 +00:00
Renovate Bot
ba7a442644 Update dependency monaco-editor to v0.50.0 2024-07-21 00:03:40 +00:00
Gusted
6a49e3f468
[BUG] Fix panic on too high page number
- Fixes a panic where the file history router would panic if the page
number was set to a page where no commits would be returned. It now
returns a 404 in such case.
- Regresion of a5b1c1b0b3
- Panic log provided by @algernon.
- Minimal integration test added.

Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-07-21 02:01:54 +02:00
Gusted
efd63ec1d8
[BUG] Don't panic on empty blockquote
- On a empty blockquote the callout feature would panic, as it expects
to always have at least one child.
- This panic cannot result in a DoS, because any panic that happens
while rendering any markdown input will be recovered gracefully.
- Adds a simple condition to avoid this panic.
2024-07-21 01:10:20 +02:00
forgejo-renovate-action
3beaee62bb Merge pull request 'Update dependency vue to v3.4.33 (forgejo)' (#4583) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-07-20 17:44:11 +00:00
0ko
c235e9b919 ui: encourage participation in the localization of Forgejo in language settings (#4596)
Changes:
- clarify how the language selector works as this is not very unclear: the footer selector is per-session and the settings selector is per-account, usually users need the 2nd
- tell about how to participate in improvement of localization via this link: https://forgejo.org/docs/latest/developer/localization/. Test that the link is present by extending and existing test

Preview:
- https://codeberg.org/attachments/f5d04fa1-2e9a-46e4-ac94-d8effefb9762
- https://codeberg.org/attachments/2a820bf5-1326-4c4a-9aff-4b9b70ee1bc0

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4596
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 16:38:59 +00:00
Renovate Bot
f92bb4f8ee Update dependency vue to v3.4.33 2024-07-20 16:18:45 +00:00
Gusted
75af19a497 Merge pull request 'Remove APA as cite format' (#4595) from beowulf/remove-apa-cite-format into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4595
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-20 15:20:23 +00:00
0ko
db73870e0e i18n(en): clarify texts in modals for leaving orgs and teams 2024-07-20 19:29:12 +05:00
Beowulf
7dc0b2bab6
Remove APA as cite format
This removes APA as cite format, because it depends on an copyleft
dependency (https://github.com/Juris-M/citeproc-js).
2024-07-20 15:48:57 +02:00
Earl Warren
eb61437a52 Merge pull request '[UI] Convert milestone to HTMX' (#4542) from gusted/htmx-milestone into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4542
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 07:49:28 +00:00
Earl Warren
280db0bf37 Merge pull request '[CHORE] Use better license checker' (#4574) from gusted/forgejo-license-js into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4574
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 07:48:01 +00:00
Earl Warren
622479ef7f Merge pull request '[BUG] Add early-return to loading items from SpecList' (#4582) from gusted/forgejo-early-return into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4582
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-20 07:40:24 +00:00
0ko
f3207f92e7 Merge pull request '[UI] Replace vue-bar-graph with chart.js' (#4571) from gusted/forgejo-activity-bar into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4571
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-20 03:50:17 +00:00
Gusted
f7dac2c3d9
[BUG] Add early-return to loading items from SpecList
- Add an early-return to `LoadSchedules` and `LoadRepos` of the
`SpecList` type, @Beowulf noticed that useless queries were being run
every 30 seconds. These stemmed from these two functions being run even
if there were no scheduled actions.
- No tests were added, because there is zero testing infrastructure or
fixtures for the actions specifications models. I feel these are trivial
enough to not require any tests.
2024-07-20 01:27:11 +02:00
Gusted
2d3b7ae939 Merge pull request 'Update dependency dayjs to v1.11.12 (forgejo)' (#4575) from renovate/forgejo-dayjs-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4575
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-19 23:04:08 +00:00
Gusted
a83002679d
[UI] Replace vue-bar-graph with chart.js
- The usage of the `vue-bar-graph` is complicated, because of the `GSAP`
dependency they pull in, the dependency uses a non-free license.
- The code is rewritten to use the `chart.js` library, which is already
used to draw other charts in the activity tab. Due to the limitation of
`chart.js`, we have to create a plugin in order to have images as labels
and do click handling for those images.
- The chart isn't the same as the previous one, once again simply due to
how `chart.js` works, the amount of commits isn't drawn anymore in the
bar, you instead have to hover over it or look at the y-axis.
- Resolves #4569
2024-07-19 21:07:18 +02:00
Gusted
06513103c9
[CHORE] Use better license checker
- The current way of detecting javascript licenses relies on
`license-checker-webpack-plugin`, which gets it information from
Webpack. However this isn't quite acurate as libraries might bundle
their dependencies into a output file, at which point Webpack no longer
sees that such dependency is used. For example, `vue-bar-graph` did
this which bundled `GSAP`.
- The new approach uses `license-checker-rseidelsohn`, which simply
scans all non-development (determined by `package.json`) packages and
read their LICENSE information, this might result in extra dependencies
being included into `license.txt` which aren't used in the final output
file (for example they would've been tree-shaken out by webpack), but
this takes a better safe than sorry approach as currently licenses are
missing from dependencies that are being bundled into Forgejo's
javascript code.
2024-07-19 19:49:29 +02:00
Renovate Bot
bf5db77aff Update dependency dayjs to v1.11.12 2024-07-19 00:03:48 +00:00
Earl Warren
3e8f975345 Merge pull request 'Remove hardcoded filenames for better readability' (#4225) from Xinayder/forgejo:alpine-noarch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4225
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-18 13:28:09 +00:00
Codeberg Translate
a9d32b588a i18n: update of translations from Weblate (#4451)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: manolosd <manolosd@users.noreply.translate.codeberg.org>
Co-authored-by: Nifou <Nifou@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: ch0ccyra1n <ch0ccyra1n@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4451
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-07-18 05:14:01 +00:00
Earl Warren
aaf90f6506 Merge pull request 'Add tenv linter and fix current issues' (#4556) from thefox/add-tenv-linter into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4556
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-18 05:01:16 +00:00
Earl Warren
acf64bdefa Merge pull request 'Update dependency esbuild-loader to v4.2.2 (forgejo)' (#4557) from renovate/forgejo-esbuild-loader-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4557
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-18 04:56:08 +00:00
Earl Warren
022bd27b8a Merge pull request 'Update dependency vue to v3.4.32 (forgejo)' (#4558) from renovate/forgejo-patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4558
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-18 04:55:42 +00:00
Earl Warren
9b5878de9e Merge pull request 'fix: label selector popup width (issue creation)' (#4551) from beowulf/fix-label-selector-width-new-issue into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4551
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-18 04:34:24 +00:00
Renovate Bot
61b3015c74 Update dependency vue to v3.4.32 2024-07-18 00:08:24 +00:00
Renovate Bot
dd1531aaf8 Update dependency esbuild-loader to v4.2.2 2024-07-18 00:07:53 +00:00
Alexandre Oliveira
ef815db8f2 Remove hardcoded filenames for better readability 2024-07-17 23:20:48 +02:00
TheFox0x7
3fca6c0bf5
test: enforce tenv usage in tests 2024-07-17 23:07:41 +02:00
Beowulf
b32a03531c
Fix label selector popup width (issue creation)
This aligns the popup width of the label selector during issue creation
to the width of the label selector in an already created issue.

(The inherited width from "ui form" is reset to prevent width: 100% on the
input element in the search box.)
2024-07-17 20:14:02 +02:00
Earl Warren
20f5f050f3 Merge pull request 'Revert "ui: update pull request icons (#4455)" (partial)' (#4550) from earl-warren/forgejo:wip-agpl into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4550
2024-07-17 17:04:48 +00:00
Earl Warren
c349da723c
Revert "ui: update pull request icons (#4455)" (partial)
This reverts commit 8e56f61d0f.

Refs: https://codeberg.org/forgejo/discussions/issues/192
2024-07-17 16:56:25 +02:00
Earl Warren
a0676486dd Merge pull request 'Update dependency tailwindcss to v3.4.6 (forgejo)' (#4519) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4519
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-17 14:35:23 +00:00
Earl Warren
125e4832e0 Merge pull request 'Update module github.com/go-testfixtures/testfixtures/v3 to v3.12.0 (forgejo)' (#4485) from renovate/forgejo-github.com-go-testfixtures-testfixtures-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4485
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-17 14:07:10 +00:00
Gusted
d731dc793b
[UI] Convert milestone to HTMX
- Currently if you want to update the milestone of an issue or pull
request, your whole page will be reloaded to reflect the newly set
milestone. This is quite unecessary, as only the milestone text is
updated and a new timeline event is added.
- This patch converts the milestone section in the issue/pull request
sidebar to use HTMX, so it becomes a progressive element and avoids
reloading the whole page to update the milestone.
- The update of the milestone section itself is quite straightforward
and nothing special is happening. To support adding new timeline events,
a new element `#insert-timeline` is conviently placed after the last
timeline event, which can be used with
[`hx-swap-oob`](https://htmx.org/attributes/hx-swap-oob/) to position
new timeline events before that element.
- Adds E2E test.
2024-07-17 14:52:00 +02:00
Earl Warren
011a7cffd2 Merge pull request 'fix: labels set during issue creation are not displayed' (#4546) from 0ko/forgejo:ui-labels-aaa into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4546
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-17 12:03:43 +00:00
0ko
326958316d ui: fix issue labels 2024-07-17 16:19:44 +05:00
Earl Warren
b77d7e842c Merge pull request 'Revert: Update module github.com/redis/go-redis/v9 to v9.5.4 (forgejo)' (#4543) from earl-warren/forgejo:wip-redis-disappear into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4543
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-17 06:58:57 +00:00
Gusted
8a1924b51a [PORT] Use FullName in Emails to address the recipient if possible (gitea#31527) (#4516)
Before we had just the plain mail address as recipient. But now we provide additional Information for the Mail clients.

---
Porting information:

- Two behavior changes are noted with this patch, the display name is now always quoted although in some scenarios unnecessary it's a safety precaution of Go. B encoding is used when certain characters are present as they aren't 'legal' to be used as a display name and Q encoding would still show them and B encoding needs to be used, this is now done by Go's `address.String()`.
- Update and add new unit tests.

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4516
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2024-07-17 05:13:59 +00:00
Earl Warren
c560595e1f
Revert "Update module github.com/redis/go-redis/v9 to v9.5.4"
This reverts commit dd6413d350.
2024-07-17 06:36:42 +02:00
Earl Warren
8901fac2bf
Revert "update redis mock"
This reverts commit dd9f885293.
2024-07-17 06:36:36 +02:00
Earl Warren
3c8cd43fec Merge pull request '[UI] Fix HTMX support for profile card' (#4538) from gusted/htmx-support into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4538
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-17 03:55:01 +00:00
forgejo-renovate-action
c813f020e0 Merge pull request 'Update dependency @playwright/test to v1.45.2 (forgejo)' (#4540) from renovate/forgejo-playwright-monorepo into forgejo 2024-07-17 02:03:43 +00:00
Renovate Bot
1fe4c33b6a Update dependency @playwright/test to v1.45.2 2024-07-17 00:10:44 +00:00
Gusted
14d9c386fd
[UI] Fix HTMX support for profile card
- There were two issues with the profile card since the introduction of
HTMX in 3e8414179c. If an HTMX request
resulted in a flash message, it wasn't being shown and HTMX was
replacing all the HTML content instead of morphing it into the existing
DOM which caused event listeners to be lost for buttons.
- Flash messages are now properly being shown by using `hx-swap-oob`
and sending the alerts on a HTMX request, this does mean it requires
server-side changes in order to support HTMX requests like this, but
it's luckily not a big change either.
- Morphing is now enabled for the profile card by setting
`hx-swap="morph"`, and weirdly, the morphing library was already
installed and included as a dependency. This solves the issue of buttons
losing their event listeners.
- This patch also adds HTMX support to the modals feature, which means
that the blocking feature on the profile card now takes advantage of
HTMX.
- Added a E2E test.
2024-07-17 01:41:32 +02:00
Gusted
984d0127f1
Enable multiStatements for MySQL 2024-07-16 23:16:03 +02:00
Renovate Bot
f472f59513 Update dependency tailwindcss to v3.4.6 2024-07-16 16:10:40 +00:00
Earl Warren
48587aca23 Merge pull request 'docs(e2e): explain how to use VSCodium or VSCode' (#4531) from earl-warren/forgejo:wip-docs-e2e into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4531
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-16 15:52:25 +00:00
Earl Warren
5fc3916fff
docs(e2e): explain how to use VSCodium or VSCode
Imported from the docs to keep them in one place.
2024-07-16 17:22:39 +02:00
Solomon Victorino
df22f8da5f fix: preserve object format dropdown options on /repo/create error (#4360)
To reproduce:
- make the repo creation form return with an error, like a duplicate name
- click on the Object format dropdown
- the options are missing as the listbox is empty

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4360
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Solomon Victorino <git@solomonvictorino.com>
Co-committed-by: Solomon Victorino <git@solomonvictorino.com>
2024-07-16 14:42:35 +00:00
Bram Hagens
8e56f61d0f ui: update pull request icons (#4455)
Added a new icon for closed PRs (similar to GitHub, GitLab, etc),
Fixes https://codeberg.org/forgejo/forgejo/issues/4454.

Before:
- https://codeberg.org/attachments/b17c5846-506f-4b32-97c9-03f31c5ff758
- https://codeberg.org/attachments/babcd011-d340-4a9e-94db-ea17ef6d3c2b
- https://codeberg.org/attachments/dbca009a-413e-48ab-84b1-55ad7f4fcd3d

After:
- https://codeberg.org/attachments/3e161f7b-4172-4a8c-a8eb-54bcf81c0cae
- https://codeberg.org/attachments/0c308f7e-25a0-49a3-9c86-1b1f9ab39467
- https://codeberg.org/attachments/b982b6b8-c78a-4332-8269-50d01de834e0

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4455
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Bram Hagens <bram@bramh.me>
Co-committed-by: Bram Hagens <bram@bramh.me>
2024-07-16 14:38:46 +00:00
Earl Warren
fb10e63489 docs(release-notes): 8.0.0 (#4483)
* Generated by https://code.forgejo.org/forgejo/release-notes-assistant
* Some parts were manually edited
* The pull requests that were not included are archived at https://codeberg.org/forgejo/forgejo/issues/4473
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-07-16 14:05:56 +00:00
Earl Warren
4d3d58715b Merge pull request 'Update module github.com/minio/minio-go/v7 to v7.0.74 (forgejo)' (#4520) from renovate/forgejo-github.com-minio-minio-go-v7-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4520
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 13:50:54 +00:00
Earl Warren
c5682f5756 Merge pull request 'docs: rework the user interface bug report template' (#4530) from earl-warren/forgejo:wip-bug-report-template into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4530
Reviewed-by: Victoria <efertone@noreply.codeberg.org>
2024-07-16 13:38:49 +00:00
Earl Warren
fa263edcc3
docs: rework the user interface bug report template
* move `id: can-reproduce` to first position to give incentivize reproducers.
  If the description comes first, the person filing the bug report
  will describe the problem in plain English. It is better if the
  first thing they do, if at all possible, is to create a reproducer
  and provide a link.
* remove `id: os-ver` as it has never been relevant.
* do not require `id: forgejo-ver` because it does not matter that much
  as long as it can be reproduced on try.next.
* remove "If the error appears to relate to Forgejo the server" as it
  has never been relevant.
* require the description
2024-07-16 14:52:41 +02:00
Earl Warren
0accdded17
docs(issues): encourage the use of conventional commits
It is not enforced but it is widely spread and encouraging its use may
lead to more uniform issue titles overall.

https://www.conventionalcommits.org/en/v1.0.0/
2024-07-16 14:33:21 +02:00
Earl Warren
b5efeec7fe Merge pull request 'Load attachments for /issues/comments/{id}' (#4523) from algernon/forgejo:all-your-assets-are-belong-to-the-api into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4523
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 12:14:56 +00:00
Earl Warren
feb85faae2 Merge pull request '[gitea] week 2024-29 cherry pick (gitea/main -> forgejo)' (#4488) from algernon/wcp/2024-29 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4488
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-16 10:51:36 +00:00
Earl Warren
d12a4afc8a Merge pull request 'fix(ci): use 512MB for elasticsearch instead of 32GB' (#4525) from earl-warren/forgejo:wip-ci-elasticsearch into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4525
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-16 10:30:28 +00:00
Gergely Nagy
fc4f914e71
Load attachments for /issues/comments/{id}
The `/repos/{owner}/{repo}/issues/comments/{id}` API endpoint returns an
`assets` field, but the route handler did not load attachments, thus,
the field was never populated.

This patch fixes that, and adds a test to exercise it. The test fails
without the fix.

This addresses a bug discovered in Codeberg/Community#1607.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-07-16 11:09:54 +02:00
Earl Warren
d1dadf4e06
fix(ci): use 512MB for elasticsearch instead of 32GB
It can be observed that when elasticsearch runs in the CI the process
uses 32GB of resident memory.

Set Xmx and Xms to no more than the threshold that the JVM uses for
compressed object pointers (compressed oops); the exact threshold
varies but is near 32 GB. You can verify that you are under the
threshold by looking for a line in the logs like the following:

Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docker.html
Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/heap-size.html
2024-07-16 08:10:58 +02:00
Renovate Bot
6a3415abbb Update module github.com/minio/minio-go/v7 to v7.0.74 2024-07-16 02:05:23 +00:00
Renovate Bot
09c2ab9be8
Update module github.com/go-testfixtures/testfixtures/v3 to v3.12.0 2024-07-15 21:39:38 +02:00
Earl Warren
573ba5e9ac Merge pull request 'docs(release-notes): proofread multiline release-notes files' (#4515) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4515
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-15 19:24:00 +00:00
Earl Warren
c0f20a4e0a
docs(release-notes): proofread multiline release-notes files
It is not yet possible to manually edit them in the release notes
because the release notes assistant does not support that.
2024-07-15 21:22:56 +02:00
Earl Warren
56ee58c239 Merge pull request '[CHORE] Use github.com/ProtonMail/go-crypto' (#4506) from gusted/proton-openpgp into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4506
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-15 16:49:05 +00:00
Earl Warren
f4b8ffcca4 Merge pull request '[CHORE] Update jsonschema library to v6' (#4496) from gusted/update-jsonscheme into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4496
Reviewed-by: Otto <otto@codeberg.org>
2024-07-15 16:47:37 +00:00
Earl Warren
e98c9d2a06 Merge pull request 'docs: rework the bug report template' (#4514) from earl-warren/forgejo:wip-bug-report-template into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4514
Reviewed-by: Victoria <efertone@noreply.codeberg.org>
Reviewed-by: jean-daricade <jean-daricade@noreply.codeberg.org>
2024-07-15 16:38:54 +00:00
Gusted
45341ee9ce
[CHORE] Use github.com/ProtonMail/go-crypto
- We were previously using `github.com/keybase/go-crypto`, because the
package for openpgp by Go itself is deprecated and no longer
maintained. This library provided a maintained version of the openpgp
package. However, it hasn't seen any activity for the last five years,
 and I would therefore consider this also unmaintained.
- This patch switches the package to `github.com/ProtonMail/go-crypto`
which provides a maintained version of the openpgp package and was
already being used in the tests.
- Adds unit tests, I've carefully checked the callstacks to ensure the
OpenPGP-related code was covered under either a unit test or integration
tests to avoid regression, as this can easily turn into security
vulnerabilities if a regression happens here.
- Small behavior update, revocations are now checked correctly instead
of checking if they merely exist and the expiry time of a subkey is used
if one is provided (this is just cosmetic and doesn't impact security).
- One more dependency eliminated :D
2024-07-15 17:27:37 +02:00
Gusted
45401e044f
[CHORE] Update jsonschema library to v6
- Update the `github.com/santhosh-tekuri/jsonschema` library from v5 to
v6.
- Update the migration loader function to a type, which is now required
in V6.
- `github.com/santhosh-tekuri/jsonschema/v6` was already used by gof3,
so removing the v5 library and using the v6 library reduces the binary
size of Forgejo.
  - Before: 95912040 bytes
  - After: 95706152 bytes
2024-07-15 17:20:50 +02:00
Earl Warren
38e91fc76f
docs: rework the bug report template
* move `id: can-reproduce` to first position to give incentivize reproducers.
  If the description comes first, the person filing the bug report
  will describe the problem in plain English. It is better if the
  first thing they do, if at all possible, is to create a reproducer
  and provide a link.
* remove `id: screenshots` as they can be copy/pasted to the
  description when relevant. They are more important int the UI
  bug report template but not so much here.
* remove `id: git-ver` as it is almost never relevant. If it is, this
  can be included in the description but clutters the template most of
  the time.
* remove `id: os-ver` as it is redundant with what `id: run-info`
  requires.
* dev.next.forgejo.org is running the latest development branch
* link to dev.next.forgejo.org instead of next.forgejo.org
2024-07-15 15:49:44 +02:00
Earl Warren
74206dc009 Merge pull request 'Lock file maintenance (forgejo)' (#4509) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4509
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-15 05:17:07 +00:00
Earl Warren
22b470387f Merge pull request 'Update renovate to v37.431.4 (forgejo)' (#4508) from renovate/forgejo-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4508
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-15 05:15:35 +00:00
Renovate Bot
20161546d5 Update renovate to v37.431.4 2024-07-15 04:03:33 +00:00
0ko
af4b32aece ui(admin): improve names of user settings and add descriptions
Changes
* checkbox titles are no longer strong.
* added descriptions to all options. Mostly from memory, but there are a few sources:
   - https://docs.gitea.com/help/faq#active-user-vs-login-prohibited-user
   - https://docs.gitea.com/help/faq#restricted-users
* for git hooks, I just moved tooltip into description.
* renamed titles. The only important one is: "Disable sign-in" -> "Suspended account" as it has a change of terminology. We don't seem to have anything about this option in our docs though. This is what the option really does. In fact, it does not invalidate current sessions of the user, but shows them the same "Sign-in prohibited" screen for all actions.

Preview: https://codeberg.org/attachments/e5649045-dfe8-4327-869f-cb2530ca6b17
(the text of the last one is slightly outdated after review)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4499
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-15 03:57:56 +00:00
Renovate Bot
71f5dbccb6 Lock file maintenance 2024-07-15 00:07:24 +00:00
Earl Warren
717495a980 Merge pull request '[port] Use old behavior for telegram webhook (gitea#31588)' (#4504) from algernon/forgejo:gitea/port/31588 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4504
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-14 20:25:49 +00:00
wxiaoguang
38dce65dc1
Use old behavior for telegram webhook (#31588)
Fix #31182

(cherry picked from commit 43c63c33aea1b0725ed1fe7b4a55dd85050f0beb)
2024-07-14 20:53:26 +02:00
Earl Warren
84e6f03134 Merge pull request 'Fix CI status link in dashboard' (#4481) from beowulf/fix-ci-status-link-on-dashboard into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4481
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-14 17:38:06 +00:00
Earl Warren
ce37e736ab Merge pull request '[CHORE] Move test related function to own package' (#4493) from gusted/reduce-binary-size into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4493
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-14 17:33:22 +00:00
Otto
f255923b67 Merge pull request 'tests(e2e): only run one test, not all of them each time' (#4492) from earl-warren/forgejo:wip-fix-e2e into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4492
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-14 15:09:56 +00:00
Gusted
138942c09e
[CHORE] Move test related function to own package
- Go's deadcode eliminator is quite simple, if you put a public function
in a package `aa/bb` that is used only by tests, it would still be built
if package `aa/bb` was imported. This means that if such functions use
libraries relevant only to tests that those libraries would still be
be built and increase the binary size of a Go binary.
- This is also the case with Forgejo, `models/migrations/base/tests.go`
contained functions exclusively used by tests which (skipping some steps
here) imports https://github.com/ClickHouse/clickhouse-go, which is
2MiB. The `code.gitea.io/gitea/models/migrations/base` package is
imported by `cmd/doctor` and thus the code of the clickhouse library is
also built and included in the Forgejo binary, although entirely unused
and not reachable.
- This patch moves the test-related functions to their own package, so
Go's deadcode eliminator knows not to build the test-related functions
and thus reduces the size of the Forgejo binary.
- It is not possible to move this to a `_test.go` file because Go does
not allow importing functions from such files, so any test helper
function must be in a non-test package and file.
- Reduction of size (built with `TAGS="sqlite sqlite_unlock_notify" make
build`):
  - Before: 95912040 bytes (92M)
  - After: 92306888 bytes (89M)
2024-07-14 17:00:49 +02:00
0ko
6fb258967d Merge pull request '[UI] Remove unnecessary vertical space in empty labels list' (#4486) from gusted/space-label-list into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4486
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-14 14:33:48 +00:00
Earl Warren
e3665c3042
tests(e2e): only run one test, not all of them each time 2024-07-14 14:19:05 +02:00
Beowulf
1088c057e0
Fixed link to commit status and tooltip on dashboard
Regression introduced by 5a18b74632
2024-07-14 13:03:03 +02:00
6543
c440c5b3d9
Fix update flake (#31626)
(cherry picked from commit 957c75bfd21b7ff15c37eae5c8cd86bae974ac5d)
2024-07-14 11:35:15 +02:00
Sunny Wan
c773ca37ad
Display app name in the registration email title (#31562)
I changed the title of the registation email from "Welcome to Gitea" to
"Welcome to (appname)". I did this by substituting 'Gitea' in
register_notify to %s and formating the registration title in mail.go. I
changed this for all the languages I could, but I struggled to changed
the translation file for Farsi. I have attached the screenshots of
before and after and the related issue below.

Related issue:
https://github.com/go-gitea/gitea/issues/31108

Before change:
![Screenshot from 2024-07-04
22-32-17](https://github.com/go-gitea/gitea/assets/94445569/4178b51c-1acc-45f4-9750-dff41564a709)

After:
![Screenshot from 2024-07-04
22-32-01](https://github.com/go-gitea/gitea/assets/94445569/9cd7a58d-c0f5-4a3c-a66c-805c55411eaa)

---------

Signed-off-by: Sunny Wan <Sunnywan2020@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
(cherry picked from commit 4913edaa70a48f7c5a524f680ca921ed515d6ec2)

Conflicts:
	- options/locale/locale_en-US.ini
      Applied the change manually. Confliced because we don't have `register_notify.title`.
	- services/mailer/mail.go
      Adapted the change to Forgejo. We don't have `u.EmailTo` due to
      not picking gitea#31527 (yet).
2024-07-14 11:33:02 +02:00
Tobias Balle-Petersen
6fafd5c991
Fix: Allow org team names of length 255 in create team form (#31564)
Gitea 1.22.1 was supposed to allow for team names of length 255 (up from
30) after the following PR was merged in:
https://github.com/go-gitea/gitea/pull/31410. However, the length of
team names was still limited to 30 as described in this issue:
https://github.com/go-gitea/gitea/issues/31554.

One more change to _gitea_ needs to be made to allow for the longer team
names, as there is a 30 character limit here:
2c92c7c522/services/forms/org.go (L65)

This PR changes that value to 255.

(cherry picked from commit 4ea2a6de81ab6adde436d77e2743095fafa6a7a9)
2024-07-14 11:16:34 +02:00
delvh
3794079610
Add YEAR, MONTH, MONTH_ENGLISH, DAY variables for template repos (#31584)
Fixes #31583

(cherry picked from commit 7bb38358114ef7f55ee9f56838df74f1dda969aa)
2024-07-14 11:14:11 +02:00
6543
412633b669
Don't show hidden labels when filling out an issue template (#31576)
Related to #31574

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit d7c7a789947080be76d94f28f3f7f8788a545f7d)
2024-07-14 10:39:08 +02:00
Gusted
013b89eb13
[UI] Remove unnecessary vertical space in empty labels list
- Don't show the labels-list element, if no labels are selected.
- The labels-list was taking up vertical space, even if no labels were
selected which caused an inconsistency in how the sidebar looked.
- Adds integration test
2024-07-14 05:38:45 +02:00
Renovate Bot
fc49367f79 Update dependency webpack to v5.93.0 2024-07-14 00:06:01 +00:00
Earl Warren
6e83c39f13 Merge pull request 'Update module github.com/redis/go-redis/v9 to v9.5.4 (forgejo)' (#4468) from renovate/forgejo-github.com-redis-go-redis-v9-9.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4468
2024-07-13 19:01:25 +00:00
Earl Warren
010dc1ef86 Merge pull request 'Fix AGit pull request instructions' (#4475) from beowulf/fix-agit-checkout-instruction into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4475
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-13 17:52:34 +00:00
Beowulf
0a5fa31edb
Fix AGit checkout instruction
The checkout instruction for pull requests created with the AGit
workflow where incorrect.
2024-07-13 18:13:43 +02:00
Victoria Nadasdi
dd9f885293
update redis mock
Signed-off-by: Victoria Nadasdi <victoria@efertone.me>
2024-07-13 11:11:45 +02:00
Earl Warren
28b81cd878 Merge pull request 'Update dependency stylelint to v16.7.0 (forgejo)' (#4470) from renovate/forgejo-linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4470
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-13 04:51:04 +00:00
Renovate Bot
bfd05dfa78 Update dependency stylelint to v16.7.0 2024-07-13 02:03:46 +00:00
Renovate Bot
dd6413d350 Update module github.com/redis/go-redis/v9 to v9.5.4 2024-07-13 00:06:19 +00:00
Earl Warren
02e1ef685c Merge pull request 'Fix: Name conan remote forgejo' (#4461) from Kwonunn/forgejo:fix-conan-remote into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4461
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-12 13:19:57 +00:00
Kwonunn
6efaf155d9 Fix: Name conan remote forgejo 2024-07-12 14:05:43 +02:00
0ko
5e7c7e981e Improvements to English locale (#4453)
A few fixes and improvements.

Notable changes:

- `issues.ref_closing_from` now makes sense.
https://codeberg.org/attachments/c091cc42-f0bf-4a14-8e43-8c66ead5ef06

- `pulls.cmd_instruction_hint`: removed full stop.
https://codeberg.org/attachments/41fcf979-3a5b-48f8-9e60-bde0b06dd522

- `settings.wiki_rename_branch_main_desc`: fix based on change in stalled 3546 so the sentence makes sense.

- `find_file.go_to_file`: better describe what the button does
https://codeberg.org/attachments/e181e486-3376-446d-a994-bfe65c125a70

- `repos.unadopted.no_more`: it's also shown when there are no results, not when the server "ran out of results"
https://codeberg.org/attachments/9077cbc4-f9e7-4ee5-ad86-6cfff41fec37

- `security.txt`: rephrase to decrease brokenness of English.

- `translation_meta`: added a special string, can be used to trigger Weblate to create a PR, which is usable for debugging

Co-authors:
- https://codeberg.org/Cyborus
- https://codeberg.org/toolforger
- https://codeberg.org/woutput

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4453
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-12 11:58:50 +00:00
0ko
16224ebd33 ui: use alt bg color for labels in hovered menu items (#4458)
A followup for https://codeberg.org/forgejo/forgejo/pulls/2935.
Re-use the alt bg color for labels inside menu items that are hovered, to keep the label box visible.

Preview: https://codeberg.org/attachments/d649b2d9-0838-49af-be6a-766de2faf52e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4458
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-12 11:12:51 +00:00
Earl Warren
e5379117fb Merge pull request 'docs(release-notes): flatten release-notes files [skip ci]' (#4448) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4448
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-11 13:14:30 +00:00
Earl Warren
1171069ced
docs(release-notes): flatten release-notes files
It is not for the developer to keep them sorted in a hierarchy when
the release they belong to can be deduced from the tag of the release
into which they were merged. The release notes assistant does that
work instead.

Some files appeared in more than one directory (feat and fix for
instance) when the PR contains multiple unrelated commits which is
what happens on a regular basis with the weekly cherry-pick of
Gitea. Those files were merged into one and each line changed to start
with a conventional commit prefix (feat: fix:).

Each line in a file will be a separate line in the release notes, they
are not groupped together even when they relate to the same PR. The
determination of the category in which they should be displayed will
be based on regular expressions using either the PR title or the line
to add to the release notes itself.

Unify the content of each file to either be a bullet list of
independent pull requests or be folded into a single line if it is
multiline. Multiline content belongs to the documentation.

Refs: https://code.forgejo.org/forgejo/release-notes-assistant
Refs: https://www.conventionalcommits.org/en/v1.0.0/
2024-07-11 14:20:34 +02:00
Codeberg Translate
78c5e0b56c i18n: update of translations from Weblate (#4330)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4330
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-07-11 06:33:51 +00:00
Xavier Vello
147ae2c5be Fix opengraph meta for wiki pages (#4427)
Fixes https://codeberg.org/forgejo/forgejo/issues/4417 by adding a conditional branch to the `head_opengraph` template to match wiki pages. I tried to be consistent with the other types:

- `og:title` is the wiki page title
- `og:url` is built via `{{AppUrl}}{{.Link}}` like it is done for commit and file views. This has the caveat of doubling the slash (see test below). Should we `{{trimSuffix "/" AppUrl}}` to remove this, if sprig is available?
- `og:description` is the repository description to match GH behaviour. Also, the first sentences of the page might not be descriptive enough. Should we prefix the repo description with the repo name?
- `og:type` and `og:image` are common

Added a `TestOpenGraphProperties` integration test using existing fixtures. Coverage is not 100% but can be improved later.

## Output on a test repo

```html
<meta property="og:title" content="Project architecture">
<meta property="og:url" content="http://localhost:3000//xvello/wiki-test/wiki/Project-architecture">
<meta property="og:description" content="description for a test project">
<meta property="og:type" content="object">
<meta property="og:image" content="http://localhost:3000/avatars/3dd4d1e4eef065d1b4ad4bdb081ab6e7">
```

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4427
Co-authored-by: Xavier Vello <xavier.vello@gmail.com>
Co-committed-by: Xavier Vello <xavier.vello@gmail.com>
2024-07-10 18:29:35 +00:00
Earl Warren
9b8622bc58 Merge pull request 'docs(release-notes): fix artifact range requests [skip ci]' (#4443) from earl-warren/forgejo:wip-release-notes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4443
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-10 18:27:03 +00:00
Earl Warren
52775aa66a
docs(release-notes): fix artifact range requests
Refs: https://codeberg.org/forgejo/forgejo/pulls/4218
2024-07-10 08:52:06 +02:00
Earl Warren
436f8fda07 Merge pull request 'Make user privacy settings more clear' (#4439) from 0ko/forgejo:ui-settings-activity into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4439
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-10 06:09:52 +00:00
ThetaDev
e80f8ff69f fix artifact range requests (#4218)
I noticed that Forgejo does not allow HTTP range requests when downloading artifacts. All other file downloads like releases and packages support them.

So I looked at the code and found that the artifact download endpoint uses a simple io.Copy to serve the file contents instead of using the established `ServeContentByReadSeeker` function which does take range requests into account.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4218
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: ThetaDev <thetadev@magenta.de>
Co-committed-by: ThetaDev <thetadev@magenta.de>
2024-07-10 05:28:01 +00:00
Shiny Nematoda
928f188689 fix(code search): various ui/ux improvements raised by user research (#4332)
various improvements from [user research](https://codeberg.org/forgejo/user-research/src/branch/main/interviews/2024-06/issues%28search%2Cfeatures%29%2Cselfhosting%2CCI%2Caccessibility%2Ccodesearch.md)

- filenames are links to the respective files
  fixes: `fold menu: user clicked and expected to view file, instead the file collapsed`

- refactor(searchfile.tmpl): ordered lists with lines grouped together instead of table
  fixes: `multiple matches per file are "merged", only visible in the code lines (no visual separation)`

- feat: display fuzzy as "Either" when using git-grep which is much more accurate than "fuzzy"
  git-grep does not support fuzzy searching, in this context selecting fuzzy searching worked similar to an OR of white space separated keywords
  fixes: `typo doesn't bring results in fuzzy search`

---

<details>
<summary>Before</summary>

![1](https://codeberg.org/attachments/5173357f-8dce-470c-9a9e-84a30517c216)
</details>

<details>
<summary>After</summary>

![after](https://codeberg.org/attachments/f8ec15dd-08ce-41f2-9326-d823de6f2395)
</details>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4332
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-07-10 05:25:32 +00:00
Earl Warren
2d85d51879 docs(release-notes): for pull requests #4400, #4375 [skip ci] (#4442)
Refs: https://codeberg.org/forgejo/forgejo/pulls/4400
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4442
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-07-10 05:14:16 +00:00
0ko
29a1c786a3 ui(settings): make user privacy settings more clear 2024-07-10 10:07:23 +05:00
Earl Warren
8acaa427d6 Merge pull request 'Port of Refactor login page' (#4400) from 0ko/forgejo:ui-login-redesign into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4400
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-10 04:15:56 +00:00
Earl Warren
cd70d36bbb Merge pull request 'Update module golang.org/x/tools to v0.23.0 (forgejo)' (#4441) from renovate/forgejo-xtools into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4441
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-10 04:13:47 +00:00
Renovate Bot
6154befef6 Update module golang.org/x/tools to v0.23.0 2024-07-10 00:01:50 +00:00
Earl Warren
1efec2adab Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.14.0 (forgejo)' (#4429) from renovate/forgejo-github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4429
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-09 21:58:01 +00:00
Earl Warren
51c5b993ab Merge pull request 'chore(renovate): group x/tools/* upgrade' (#4436) from earl-warren/forgejo:wip-renovate-x/tools into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4436
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-09 06:57:02 +00:00
Earl Warren
e2d09101d4
docs(release-notes): display URLs in .sh-session files 2024-07-09 08:24:46 +02: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
Earl Warren
f915532703
chore(renovate): group x/tools/* upgrade
Refs: https://codeberg.org/forgejo/forgejo/pulls?q=x%2Ftools&type=all
2024-07-09 07:23:22 +02:00
Earl Warren
6c9e0a6641 Merge pull request 'test: add valkey to remote cache test' (#4434) from jthvai/forgejo:test-valkey into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4434
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-09 05:21:15 +00:00
Earl Warren
cf5fb9a2e7 Merge pull request 'Update module golang.org/x/net to v0.27.0 (forgejo)' (#4430) from renovate/forgejo-golang.org-x-net-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4430
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-09 05:02:44 +00:00
Earl Warren
6c2106b5be Merge pull request 'Update module golang.org/x/tools/cmd/deadcode to v0.23.0 (forgejo)' (#4433) from renovate/forgejo-golang.org-x-tools-cmd-deadcode-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4433
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-09 04:54:08 +00:00
Elias Elwyn
f3f6bc5b33
test: add valkey to remote cache test 2024-07-09 14:26:46 +10: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
a8f35f6edd Update module github.com/buildkite/terminal-to-html/v3 to v3.14.0 2024-07-09 00:03:10 +00:00
Earl Warren
764b9abc6b Merge pull request 'tests: run JavaScript tests when web_src/js is modified' (#4419) from earl-warren/forgejo:wip-e2e into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4419
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-08 18:50:02 +00:00
banaanihillo
099682892b accessibility: anchor elements' missing href added (#4375)
Add an empty hash `href="#"` attribute to anchors that did not yet have any `href` attribute, as a quick work-around to make those elements possible to interact with via keyboard. See discussion on linked issue (https://codeberg.org/forgejo/forgejo/issues/4273) for more information on how the button-like elements like this could eventually be improved even more.

Fixes https://codeberg.org/forgejo/forgejo/issues/4273.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4375
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: banaanihillo <banaanihillo@noreply.codeberg.org>
Co-committed-by: banaanihillo <banaanihillo@noreply.codeberg.org>
2024-07-08 17:32:59 +00:00
Earl Warren
a6a64f1fdc
tests: run JavaScript tests when web_src/js is modified
otherwise they are not useful
2024-07-08 19:26:14 +02:00
Earl Warren
dd39b6d1bc Merge pull request 'Update renovate to v37.425.2 (forgejo)' (#4418) from renovate/forgejo-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4418
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-08 13:42:29 +00:00
Renovate Bot
faaf03a44a Update renovate to v37.425.2 2024-07-08 13:01:21 +00:00
Earl Warren
01bda22721 Merge pull request 'Fix branch selector in commit graph' (#4401) from beowulf/fix-commit-graph-branch-selector into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4401
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-08 11:21:54 +00:00
Earl Warren
964310b7ba Merge pull request 'chore(renovate): remove schedules for stable branches' (#4409) from viceice/renovate-schedules into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4409
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-08 08:17:11 +00:00
Michael Kriese
f4a9fb73b4
chore(renovate): remove schedules for stable branches 2024-07-08 09:03:37 +02:00
Earl Warren
567fccb02e Merge pull request 'Update module golang.org/x/crypto to v0.25.0 (forgejo)' (#4408) from renovate/forgejo-golang.org-x-crypto-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4408
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-08 05:42:30 +00:00
Renovate Bot
1630a94cfa Update module golang.org/x/net to v0.27.0 2024-07-08 00:05:03 +00:00
Renovate Bot
e4e2e91467 Update module golang.org/x/crypto to v0.25.0 2024-07-08 00:04:57 +00:00
Earl Warren
8d64891b8b Merge pull request '[BUG] Fix mobile UI for organisation creation' (#4382) from gusted/mobile-org into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4382
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-07 19:28:30 +00:00
Beowulf
11ff38dd40
fix branch selector in commit graph
Regression from 5ef80ceb64
2024-07-07 20:26:30 +02:00
0ko
7d5972d330 i18n: separate string for OpenID 2024-07-07 22:23:11 +05:00
0ko
2a03e2c6b9 i18n: cleanup 2024-07-07 22:18:39 +05:00
0ko
458bbe3f1a ui: remove non-working passkey link 2024-07-07 22:11:50 +05:00
Earl Warren
502adec4ce Merge pull request '[CHORE] Remove github.com/yuin/goldmark-meta' (#4383) from gusted/chore-goldmark-meta into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4383
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-07 13:47:30 +00:00
0ko
dcd1039215 i18n: fix strings related to sign in
Improve localizability, clean up.
2024-07-07 14:40:50 +05:00
0ko
577dc2d7d6 i18n: fix sign up strings
To avoid conflicting with existing strings in translations. Also improve localizability.
2024-07-07 14:37:45 +05:00
Anbraten
629ca22a97 Refactor login page (#31530)
As requested in
https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646.
This PR refactor the login page:

![Screenshot from 2024-07-04
19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953)

![Screenshot from 2024-07-04
19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f)

![Screenshot from 2024-06-30
09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666)
- [x] use separate box for passkey login and go to registration
- [x] move forgot passoword next to password label
- [x] fix password required label `*` and padding
- [x] remove tabs from login page

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 9c00dda33ad7bd594dd8f331fa1bf0acefc2ca54)

Conflict resolution:
* signin_navbar.tmpl has been deleted
* additions in form.css
* major code changes in signin_openid
* ...
2024-07-07 14:22:44 +05:00
Brecht Van Lommel
33f9fb8150
Fix slow patch checking with commits that add or remove many files (#31548)
Running git update-index for every individual file is slow, so add and
remove everything with a single git command.

When such a big commit lands in the default branch, it could cause PR
creation and patch checking for all open PRs to be slow, or time out
entirely. For example, a commit that removes 1383 files was measured to
take more than 60 seconds and timed out. With this change checking took
about a second.

This is related to #27967, though this will not help with commits that
change many lines in few files.

(cherry picked from commit b88e5fc72d99e9d4a0aa9c13f70e0a9e967fe057)
2024-07-07 07:33:01 +02:00
charles
f92591b825
Fix markdown preview $$ support (#31514)
close #31481

currently `$$A + B$$ test` will ignore text after $$ block

test text

![圖片](https://github.com/go-gitea/gitea/assets/30816317/39b2974b-c0b6-48a0-87d0-5f4a13615eed)

before fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/15469e4c-474d-4128-b46f-d6cadaafbd68)

after fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/c1025eef-177f-4ade-988f-510e7039f3f9)

github display

![圖片](https://github.com/go-gitea/gitea/assets/30816317/97cd1e10-ac94-4899-86d8-8e359ef1d694)

(cherry picked from commit f0033051d5ce07f5a18d2aacef6bfdca5fc69014)
2024-07-07 07:29:49 +02: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
0ko
c19222b22f ui: improve button gap consistency in repos (#4365)
Improve UI in a few areas in a similar way to dc0d3a40ab. Ensure consistent 0.5em gaps in button rows, make buttons have more consistent horizontal paddings for better clickability.

Preview:
https://codeberg.org/attachments/cfca200a-3b68-4ba8-9876-75cea7822a00
https://codeberg.org/attachments/aaa5d387-919b-45af-8854-6d0f5273125f
https://codeberg.org/attachments/989225b7-b1dd-491d-bf76-7e4a962ea54e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4365
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-07 03:21:58 +00:00
Gusted
cf8f26d616
[CHORE] Remove github.com/yuin/goldmark-meta
- Remove a unused dependency. This dependency was added to handle YAML
'frontmatter' meta, parsing them and converting them to a table or
details in the resulting HTML. As can be read in the issue that reported
the behavior of YAML frontmatter being rendered literally,
https://github.com/go-gitea/gitea/issues/5377.
- It's an unused dependency as the codebase since then moved on to do this YAML
parsing and rendering on their own, this was implemented in
812cfd0ad9.
- Adds unit tests that was related to this functionality, to proof the
codebase already handles this and to prevent regressions.
2024-07-07 03:18:13 +02:00
Gusted
610487eb83
[BUG] Fix mobile UI for organisation creation
- Don't make checkpoints or radio inputs full width on a small screen,
these obviously shouldn't try to take up the whole width of a container.
- Wrap the label for organisation permission box inside a `<span
class="inline field">`, so it gets a left-margin from the `.inline.field
> :first-child` selector. This make the checkboxes and radio buttons
groups look indented from the left.
- Resolves #4361
2024-07-07 01:37:38 +02:00
Earl Warren
3ff661fe9e Merge pull request '[BUG] Use correct SHA in GetCommitPullRequest' (#4377) from gusted/commit-to-pull into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4377
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-06 20:59:18 +00:00
Earl Warren
bf0c9837cc Merge pull request '[ENHANCEMENT] Improve caching of contributor stats' (#4367) from gusted/contributors-stats-cache into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4367
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-06 20:12:35 +00:00
Gusted
a8460bb132
[BUG] Use correct SHA in GetCommitPullRequest
- The param wasn't `sha`, it was `ref`. Use this instead.
- Adds new integration tests.
- Resolves #4190
- Resolves #4025
2024-07-06 22:04:31 +02:00
Gusted
70a7d6a0de
[ENHANCEMENT] Improve caching of contributor stats
- It was noticed [in the Forgejo matrix channel](https://matrix.to/#/!qjPHwFPdxhpLkXMkyP:matrix.org/$vk78UR0eFCwQMDMTZ7-DWjMVB_LIAwHW6SkjhEcGkQQ?via=matrix.org) that the generation of the Forgejo project contributor stats was taking quite a while on codeberg.org. This was continued with the fact that a few moments later it was once again generating them again; it seemed like they weren't being cached while they were.
- The problem was that the cache TTL is hardcoded to ten minutes and not to the configured TTL. This patch changes that by using the configured TLL for the contributor cache, as this is a computationally heavy operation and should be cached for as long as possible for a good user experience. This doesn't impact the accuracy of this feature because the commit ID of the default branch is used as a cache key.
- Also changed in this patch, is that errors aren't cached and are instead being logged, this is more helpful to the administrator. For the user essentially nothing changed on this side, the contributor stats just looks like it's loading indefinitely.
- Realistically, testing this isn't possible, as the cache library Forgejo currently uses doesn't expose the TTL or expiration time of a key. Manually testing this behavior is quite lengthy, as one of the steps would need to be "wait for ten minutes" and describe how you can notice the data was cached or was just generated, and because you could use different types of cache, it will be quite hard to write down how you could check the TTL of a key for a particular cache (I'm not even sure it's even possible for some).
2024-07-06 21:23:46 +02:00
Mai-Lapyst
98c8d45f0b Fixes an visual bug where the info box to dispatch a workflow is shown even for users that lack permissions to actualy run the workflow. (#4305)
Example: Visit https://v8.next.forgejo.org/Mai-Lapyst/test/actions?workflow=dispatch.yaml&actor=0&status=0 without being logged in.

![image](/attachments/98e74104-4d60-4f7f-b17c-7e76467cd397)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4305
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-07-06 05:30:58 +00:00
Earl Warren
c49afdf0ff Merge pull request 'Lock file maintenance (forgejo)' (#4344) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4344
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-05 12:18:20 +00:00
Renovate Bot
e487dfbbc6 Lock file maintenance 2024-07-05 10:42:17 +00:00
Earl Warren
c953aafb05 Merge pull request 'chore(renovate): fix base branches regex' (#4338) from viceice/renovat-base-branches-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4338
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-05 10:17:40 +00:00
Michael Kriese
065102c263
chore(renovate): fix base branches regex 2024-07-05 12:10:51 +02:00
Earl Warren
9a618fbb25 Merge pull request 'chore(renovate): add base branches' (#4317) from viceice/renovat-base-branches into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4317
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-05 06:03:59 +00:00
Earl Warren
c5028d72a6 Merge pull request 'Update module github.com/microcosm-cc/bluemonday to v1.0.27' (#4333) from renovate/github.com-microcosm-cc-bluemonday-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4333
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-05 05:25:08 +00:00
Earl Warren
860b33696d Merge pull request 'Update module github.com/buildkite/terminal-to-html/v3 to v3.13.0' (#4313) from renovate/github.com-buildkite-terminal-to-html-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4313
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-05 05:04:36 +00:00
Otto Richter
fafc4f6ad9 test: issue sidebar testing using playwright (#4319)
Conclusion of https://codeberg.org/forgejo/forgejo/issues/3499

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4319
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
2024-07-05 05:03:45 +00:00
Renovate Bot
a8df27e5a1
Update module github.com/microcosm-cc/bluemonday to v1.0.27 2024-07-05 06:36:35 +02:00
Gusted
3c7a830fda Merge pull request 'Update module google.golang.org/grpc to v1.65.0' (#4314) from renovate/google.golang.org-grpc-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4314
Reviewed-by: thefox <thefox@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-04 22:19:07 +00:00
TheFox0x7
79b91930fa chore(license): license path change for protobuf 2024-07-04 22:19:07 +00:00
Renovate Bot
1c49047390 Update module google.golang.org/grpc to v1.65.0 2024-07-04 22:19:07 +00:00
Gusted
3eb178db49
[CHORE] Update terminal-to-html dependency
- Update the `github.com/buildkite/terminal-to-html/v3` dependency from
version v3.10.1 to v3.13.0.
- Version v3.12.0 introduced an incompatible change, the return type of
`AsHTML` changed from `[]byte` to `string`. That same version also
introduced streaming mode
https://github.com/buildkite/terminal-to-html/pull/126, which allows us
to avoid reading the whole input into memory.
- Closes #4313
2024-07-04 23:41:17 +02:00
Earl Warren
741191a498 Merge pull request 'build(go-licenses): support go toolchain mismatch' (#4322) from viceice/build-go-licenses into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4322
2024-07-04 14:15:08 +00:00
Earl Warren
3a442b9f09 Merge pull request 'Update module github.com/blevesearch/bleve/v2 to v2.4.1' (#4311) from renovate/github.com-blevesearch-bleve-v2-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4311
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-04 14:06:19 +00:00
Earl Warren
ec883971ef Merge pull request 'Update dependency esbuild-loader to v4.2.0' (#4165) from renovate/esbuild-loader-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4165
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-04 12:54:54 +00:00
Michael Kriese
b31e21d80e
build(go-licenses): support go toolchain mismatch 2024-07-04 14:42:26 +02:00
0ko
aa7657c544 ui(blame): remove broken padding (#4318)
This padding causes visual bug, because it only applies to the first line and not to the rest in case the line is broken into multiple.
I don't think it's actually needed here for good look, so I decided to remove it. In case decreased padding looks worse, the padding can be grown back via other element so it wouldn't cause this bug.

Preview: https://codeberg.org/attachments/56fd2ee8-4955-409d-998f-1feba987b9af

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4318
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-04 11:46:31 +00:00
Earl Warren
4c4aaea26d Merge pull request 'Update dependency katex to v0.16.11' (#4291) from renovate/katex-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4291
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-04 10:19:32 +00:00
Michael Kriese
c38acaff81
chore(renovate): add base branches 2024-07-04 09:43:53 +02:00
Earl Warren
763f4659cc Merge pull request 'Update dependency eslint-plugin-vue to v9.27.0' (#4312) from renovate/linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4312
2024-07-04 07:35:39 +00:00
Codeberg Translate
2a643d2136 [I18N] Translations update from Weblate (#4251)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: ZDev <ZDev@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Marco Ciampa <ciampix@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Co-authored-by: revi <revi@omglol.email>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4251
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-07-04 06:41:53 +00:00
Renovate Bot
15d25db3f8 Update dependency eslint-plugin-vue to v9.27.0 2024-07-04 06:07:24 +00:00
Earl Warren
938e6c0fd7 Merge pull request 'test: remove performance sensitive test' (#4315) from earl-warren/forgejo:wip-redis-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4315
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-04 05:39:07 +00:00
Earl Warren
11596374ba
test: remove performance sensitive test
A test must not fail depending on the performance of the machine it
runs on. It creates false negative and serves no purpose. These are
not benchmark tests for the hardware running them.
2024-07-04 07:03:54 +02:00
Renovate Bot
319c4efbe7 Update module github.com/blevesearch/bleve/v2 to v2.4.1 2024-07-04 00:02:31 +00:00
Earl Warren
e19be90a6b Merge pull request 'Update module github.com/minio/minio-go/v7 to v7.0.73' (#4292) from renovate/github.com-minio-minio-go-v7-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4292
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 19:39:12 +00:00
Earl Warren
dc0fa915d4
docs(release-notes): 7.0.5 [skip ci] 2024-07-03 21:02:39 +02:00
Earl Warren
4b485825c9
docs(release-notes): KaTeX add support for \emph 2024-07-03 20:38:22 +02:00
Earl Warren
11433a5378
docs(licenses): add github.com/go-ini/ini 2024-07-03 20:35:07 +02:00
Renovate Bot
4101260d6e Update module github.com/minio/minio-go/v7 to v7.0.73 2024-07-03 18:07:19 +00:00
Earl Warren
a6756ed3b8 Merge pull request 'test(js): false negative in sleep test' (#4285) from earl-warren/forgejo:wip-js-utils into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4285
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-03 17:12:27 +00:00
Earl Warren
d1c5ddc5a6 Merge pull request 'Update dependency @playwright/test to v1.45.1' (#4290) from renovate/playwright-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4290
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 17:11:53 +00:00
Earl Warren
9e6b6f5a06 Merge pull request 'Update module golang.org/x/tools/gopls to v0.16.1' (#4293) from renovate/golang.org-x-tools-gopls-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4293
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 17:11:18 +00:00
Earl Warren
0ab2852114 Merge pull request 'fix(ci): do not block pull request CI when go-versions lags behind' (#4298) from earl-warren/forgejo:wip-go-version-lag-workaround into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4298
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-03 17:10:17 +00: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
e510f2e84d Update dependency @playwright/test to v1.45.1 2024-07-03 16:03:51 +00:00
Earl Warren
d1139ac55f Merge pull request 'Update dependency go to v1.22.5' (#4286) from renovate/patch-golang-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4286
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-03 14:57:04 +00:00
Earl Warren
ee7f568aed
fix(ci): do not block pull request CI when go-versions lags behind
When a new go version is published, it takes about 24h for
https://github.com/actions/go-versions to be updated (see
https://github.com/actions/go-versions/pull/102 for example).

In the meantime the setup-go action that depends on it will install a
version of go that fails golang.org/x/vuln/cmd/govulncheck.

Move the security check to be the last step of the test job instead of
the first. It will still block the PRs from being merged but it will
allow the PR authors to keep working and look at the test results in
the meantime.

Fixes: https://codeberg.org/forgejo/forgejo/issues/4294
2024-07-03 15:57:35 +02:00
Renovate Bot
fa1a853db0 Update dependency go to v1.22.5 2024-07-03 08:23:00 +00:00
Renovate Bot
f752ab5edd Update dependency katex to v0.16.11 2024-07-03 00:02:23 +00:00
Earl Warren
17139b649b Merge pull request 'fix(hook): ignore unknown push options instead of failing' (#4253) from twenty-panda/forgejo:pr-3706 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4253
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-02 20:17:51 +00:00
Twenty Panda
5561e80b04 fix(hook): ignore unknown push options instead of failing
If a repository has

git config --add push.pushOption submit=".sourcehut/*.yml"

it failed when pushed because of the unknown submit push
option. It will be ignored instead.

Filtering out the push options is done in an earlier stage, when the
hook command runs, before it submits the options map to the private
endpoint.

* move all the push options logic to modules/git/pushoptions
* add 100% test coverage for modules/git/pushoptions

Test coverage for the code paths from which code was moved to the
modules/git/pushoptions package:

* cmd/hook.go:runHookPreReceive
* routers/private/hook_pre_receive.go:validatePushOptions
  tests/integration/git_push_test.go:TestOptionsGitPush runs through
  both. The test verifying the option is rejected was removed and, if
  added again, will fail because the option is now ignored instead of
  being rejected.

* cmd/hook.go:runHookProcReceive
* services/agit/agit.go:ProcReceive
  tests/integration/git_test.go: doCreateAgitFlowPull runs through
  both. It uses variations of AGit related push options.

* cmd/hook.go:runHookPostReceive
* routers/private/hook_post_receive.go:HookPostReceive
  tests/integration/git_test.go:doPushCreate called by TestGit/HTTP/sha1/PushCreate
  runs through both.
  Note that although it provides coverage for this code path it does not use push options.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3651
2024-07-02 21:39:01 +02:00
Earl Warren
a0d9d8d576
test(js): false negative in sleep test
It is entirely possible that the difference between the specified
sleep time and the actual sleep time is greater than 15 seconds.

https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#Notes

> Note that in either case, the actual delay may be longer than
> intended; see Reasons for delays longer than specified below.

It is however an error for the delay to be shorter.

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
 FAIL  web_src/js/utils.test.js > sleep
AssertionError: expected false to be truthy
 ❯ testSleep web_src/js/utils.test.js:192:48
    190|   const endTime = Date.now();    // Record the end time
    191|   const actualSleepTime = endTime - startTime;
    192|   expect(Math.abs(actualSleepTime - ms) <= 15).toBeTruthy();
       |                                                ^
    193| }
    194|
 ❯ web_src/js/utils.test.js:184:3
2024-07-02 19:35:35 +02:00
Earl Warren
c7bb90bc6b Merge pull request '[gitea] week 2024-27 cherry pick (gitea/main -> forgejo)' (#4266) from earl-warren/wcp/2024-27 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4266
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-07-02 08:29:04 +00:00
Earl Warren
9524361bb4
docs(release-notes): development continues to Forgejo 9.0.0 2024-07-01 18:17:11 +02:00
Renovate Bot
1576ea38f8 Update dependency esbuild-loader to v4.2.0 2024-07-01 14:02:08 +00:00
Earl Warren
c521e58190 Merge pull request 'Lock file maintenance' (#4280) from renovate/lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4280
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-01 13:35:05 +00:00
Earl Warren
f9ad844fd6 Merge pull request 'ci(release): upgrade v*.next.forgejo.org when the release is ready' (#4281) from earl-warren/forgejo:wip-demo-upgrade into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4281
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-01 13:25:22 +00:00
Earl Warren
abf72a42e7
ci(release): upgrade v*.next.forgejo.org when the release is ready
The https://v$major.next.forgejo.org instances are polling for new
releases with a cron job every hour. This is not only a waste of
resources because there is nothing most of the time, it also imposes a
delay of maximum one hour when there is a new release.

When the release is published, notify the corresponding instance that
an upgrade is ready. In the request will 404 but leave a trace in the
logs which can trigger an upgrade script if wakeup-on-logs is
configured accordingly.

  GET https://v$major.next.forgejo.org/.well-known/wakeup-on-logs/forgejo-v$major

* v8 - a daemon watching on the web server logs was installed for
  https://v8.next.forgejo.org and will perform the upgrade.
* v7 - nothing will happen for https://v7.next.forgejo.org because
  it still relies on the hourly cron job.
* v1.21 - nothing will happen because https://v1.next.forgejo.org does
  not exist.

See also:

* https://forgejo.org/docs/next/developer/infrastructure
* https://code.forgejo.org/infrastructure/wakeup-on-logs
2024-07-01 12:52:59 +02:00
Earl Warren
c5362d5f9e Merge pull request 'Update renovate to v37.421.2' (#4278) from renovate/renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4278
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-01 05:15:47 +00:00
Renovate Bot
15f9dde1c9 Lock file maintenance 2024-07-01 00:03:45 +00:00
Renovate Bot
db8fb0021f Update renovate to v37.421.2 2024-07-01 00:01:26 +00:00
Danko Aleksejevs
36b6444f34 Remove tab key handling in markdown editor, add toolbar buttons instead, re #4072 #4142 (#4263)
We haven't decided much (to my knowledge), and I've been using the main branch in production (as one does) and found out even I myself rely on Tab sometimes working to move focus and have been caught off guard by it indenting lines instead.

So this removes Tab handling and instead adds two new buttons to the toolbar. The indentation logic is unchanged (other than now focusing the textarea during button handling, to ensure execCommand works, and thus undo history is preserved).

I'm not sure which terminology to use in tooltips. Could also add keyboard shortcuts for the whole toolbar eventually, but as is this is hopefully an better solution to the problems I previously created than un-merging the whole thing :)

<img width="414" alt="Screenshot with two new buttons" src="/attachments/b7af3aa4-a195-48d1-be0a-1559f25dce8e">

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4263
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2024-06-30 13:03:32 +00:00
Earl Warren
7b80ac476f Merge pull request 'Fixes git references wrongly transmitted to the action run' (#4272) from Mai-Lapyst/forgejo:fix-workflow_dispatch-gitrefs into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4272
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-30 08:26:12 +00:00
Mai-Lapyst
9b225b56a9
Fixes git references wrongly transmitted to the action run 2024-06-30 06:17:40 +02:00
mritunjayr
9634d954d4 test: add test coverage for web_src/js/utils/time.test.js (#4252)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4252
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: mritunjayr <mritunjaykumar694@gmail.com>
Co-committed-by: mritunjayr <mritunjaykumar694@gmail.com>
2024-06-29 09:08:29 +00:00
Shiny Nematoda
8546b01249 [FEAT] branch/tag dropdown for git-grep (#4262)
#3654 introduced support for searching non-default branches and tags.

However, the results page lacked any indicator (aside from the url) on which branch/tag the searcg was performed. A branch dropdown was introduced to the code search page when git-grep is used both as an indicator and as a intrusive way to switch between branches/tags.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4262
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-29 06:57:34 +00:00
Earl Warren
a2426e2f90
docs(release-notes): week 2024-27 cherry pick 2024-06-29 08:03:51 +02:00
Royce Remer
45181ee945
Support legacy _links LFS batch responses (#31513)
Support legacy _links LFS batch response.

Fixes #31512.

This is backwards-compatible change to the LFS client so that, upon
mirroring from an upstream which has a batch api, it can download
objects whether the responses contain the `_links` field or its
successor the `actions` field. When Gitea must fallback to the legacy
`_links` field a logline is emitted at INFO level which looks like this:
```
...s/lfs/http_client.go:188:performOperation() [I] <LFSPointer ee95d0a27ccdfc7c12516d4f80dcf144a5eaf10d0461d282a7206390635cdbee:160> is using a deprecated batch schema response!
```

I've only run `test-backend` with this code, but added a new test to
cover this case. Additionally I have a fork with this change deployed
which I've confirmed syncs LFS from Gitea<-Artifactory (which has legacy
`_links`) as well as from Gitea<-Gitea (which has the modern `actions`).

Signed-off-by: Royce Remer <royceremer@gmail.com>
(cherry picked from commit df805d6ed0458dbec258d115238fde794ed4d0ce)
2024-06-29 07:56:18 +02:00
kiatt210
9d1c72ae7c
Fix web notification icon not updated once you read all notifications (#31447)
Fix #29065
Remove status filtering from GetUIDsAndNotificationCounts sql.

---------

Co-authored-by: kiatt210 <kiatt210@github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 6a96deb5898745d957ffd7860b2b6821c673e907)
2024-06-29 07:33:37 +02:00
Earl Warren
153758d4de Merge pull request 'Update dependency vue to v3.4.31' (#4264) from renovate/patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4264
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-29 05:21:46 +00:00
Renovate Bot
699e4fec73 Update dependency vue to v3.4.31 2024-06-29 04:01:21 +00:00
0ko
f703399770 Merge pull request 'Improve button gap consistency' (#4254) from 0ko/forgejo:ui-button-row into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4254
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-06-29 03:23:17 +00:00
0ko
28ceec6fad ui: fix wrong string used in a search box (#4258)
Resolves https://codeberg.org/forgejo/forgejo/issues/4256.
Fixes regression caused by https://github.com/go-gitea/gitea/pull/29530/files#diff-b46ae540c8eb41d1ccaa1659489fcc47d72eee4c4f04dc83c5ccf4d6d1a3395eR45.

Preview:
Before - https://codeberg.org/forgejo/forgejo/attachments/d629f2e9-0d07-4719-9250-52d3ba9f4a9e
After - https://codeberg.org/forgejo/forgejo/attachments/6a5f5cb2-124d-4673-a387-8483125a89eb

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4258
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-06-28 16:28:03 +00:00
Earl Warren
616291485e Merge pull request 'Update module golang.org/x/tools/gopls to v0.16.0' (#4242) from renovate/golang.org-x-tools-gopls-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4242
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-28 14:10:33 +00:00
Renovate Bot
6f423143ea
Update module golang.org/x/tools/gopls to v0.16.0 2024-06-28 15:35:02 +02:00
0ko
dc0d3a40ab ui: improve button gap consistency 2024-06-28 13:11:32 +05:00
0ko
7299b2def4 chore: rename class issue-title-buttons to button-row 2024-06-28 13:11:16 +05:00
Mai-Lapyst
51735c415b Add support for workflow_dispatch (#3334)
Closes #2797

I'm aware of https://github.com/go-gitea/gitea/pull/28163 exists, but since I had it laying around on my drive and collecting dust, I might as well open a PR for it if anyone wants the feature a bit sooner than waiting for upstream to release it or to be a forgejo "native" implementation.

This PR Contains:
- Support for the `workflow_dispatch` trigger
- Inputs: boolean, string, number, choice

Things still to be done:
- [x] API Endpoint `/api/v1/<org>/<repo>/actions/workflows/<workflow id>/dispatches`
- ~~Fixing some UI bugs I had no time figuring out, like why dropdown/choice inputs's menu's behave weirdly~~ Unrelated visual bug with dropdowns inside dropdowns
- [x] Fix bug where opening the branch selection submits the form
- [x] Limit on inputs to render/process

Things not in this PR:
- Inputs: environment (First need support for environments in forgejo)

Things needed to test this:
- A patch for https://code.forgejo.org/forgejo/runner to actually consider the inputs inside the workflow.
  ~~One possible patch can be seen here: https://code.forgejo.org/Mai-Lapyst/runner/src/branch/support-workflow-inputs~~
  [PR](https://code.forgejo.org/forgejo/runner/pulls/199)

![image](/attachments/2db50c9e-898f-41cb-b698-43edeefd2573)

## Testing

- Checkout PR
- Setup new development runner with [this PR](https://code.forgejo.org/forgejo/runner/pulls/199)
- Create a repo with a workflow (see below)
- Go to the actions tab, select the workflow and see the notice as in the screenshot above
- Use the button + dropdown to run the workflow
  - Try also running it via the api using the `` endpoint
- ...
- Profit!

<details>
<summary>Example workflow</summary>

```yaml
on:
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log Level'
        required: true
        default: 'warning'
        type: choice
        options:
        - info
        - warning
        - debug
      tags:
        description: 'Test scenario tags'
        required: false
        type: boolean
      boolean_default_true:
        description: 'Test scenario tags'
        required: true
        type: boolean
        default: true
      boolean_default_false:
        description: 'Test scenario tags'
        required: false
        type: boolean
        default: false
      number1_default:
        description: 'Number w. default'
        default: '100'
        type: number
      number2:
        description: 'Number w/o. default'
        type: number
      string1_default:
        description: 'String w. default'
        default: 'Hello world'
        type: string
      string2:
        description: 'String w/o. default'
        required: true
        type: string

jobs:
  test:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - run: whoami
      - run: cat /etc/issue
      - run: uname -a
      - run: date
      - run: echo ${{ inputs.logLevel }}
      - run: echo ${{ inputs.tags }}
      - env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
      - run: echo "abc"
```
</details>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3334
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-06-28 05:17:11 +00:00
Chl
544cbc6f01 Optimization of labels handling in issue_search (#4228)
This PR optimizes the SQL query and de-duplicate the labels' ids when generating the query string, on the issue page.

<hr/>

### Background

Some time ago, BingBot and some other crawlers have been putting my instance on its knees with requests containing a lot of label ids, like this one :

```
[07/Aug/2023:11:28:37 +0200] "GET /Dolibarr/sendrecurringinvoicebymail/issues?q=&type=all&sort=&state=closed&labels=1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c2%2c10%2c2%2c1%2c1%2c10%2c10%2c7%2c6%2c10%2c10%2c3%2c2%2c1%2c5%2c10%2c1%2c6%2c2%2c7%2c3%2c7%2c6%2c10%2c1%2c10%2c1%2c1%2c7%2c7%2c1%2c1%2c1%2c1%2c10%2c10%2c1%2c2%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c2%2c1%2c12%2c6%2c6%2c10&milestone=0&project=-1&poster=0 HTTP/1.1" 499 0 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/103.0.5060.134 Safari/537.36"
```

Since each of the label ids implies a join, it grows exponentially expensive for the database engine (at least on PostgreSQL but SQLite suffers a little too).

Thus, this PR proposes two enhancements:

* rewrite the database query to use only one squashed condition,
* deduplicate the label ids when generating the URL.

### Performance comparison

Here are some timings on Postgresql-backed, Forgejo 7.0.4 instances :
```sh
$ time curl -s -o /dev/null "http://localhost:3000/toto/tata/issues?q=&type=all&sort=&labels=19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25&state=open&milestone=0&project=0&assignee=0&poster=0"

real    0m10,491s
user    0m0,017s
sys     0m0,008s
```
...and with the patch:
```sh
$ time curl -s -o /dev/null "http://localhost:3000/toto/tata/issues?q=&type=all&sort=&labels=19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25%2c19%2c25&state=open&milestone=0&project=0&assignee=0&poster=0"

real    0m0,094s
user    0m0,012s
sys     0m0,013s
```

### Annex

This issue was originally proposed to [Gitea](https://github.com/go-gitea/gitea/pull/26460) but didn't get much attention, and I switched to Forgejo in the meantime :)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4228
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Chl <chl@xlii.si>
Co-committed-by: Chl <chl@xlii.si>
2024-06-28 05:11:57 +00:00
vikaschoudhary
2121a29f89 test: add test coverage for web_src/js/utils.js (#4235)
[Added tests for methods]
---------------------------------
- isDarkTheme
- getCurrentLocale
- parseDom
- serializeXml
- sleep
- toAbsoluteUrl

[Pending tests for methods]
---------------------------------
- convertImage
- blobToDataURI

Co-authored-by: Vikas Choudhary <vikaschoudharycs097@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4235
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: vikaschoudhary <vikaschoudhary@noreply.codeberg.org>
Co-committed-by: vikaschoudhary <vikaschoudhary@noreply.codeberg.org>
2024-06-27 15:46:46 +00:00
Codeberg Translate
8afdafebf9 i18n: Translations update from Weblate (#4168)
Translations update from https://translate.codeberg.org/projects/forgejo/forgejo/.

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: overloop <overloop@users.noreply.translate.codeberg.org>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: bart <bart@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: sunwoo1524 <sunwoo1524@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4168
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-06-26 11:07:32 +00:00
Earl Warren
282dfa1bea Merge pull request 'Clarify author label in tooltip' (#4201) from 0ko/forgejo:ui-author-tooltip into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4201
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-26 08:38:55 +00:00
Earl Warren
096afcb690 Merge pull request 'chore(renovate): add shared go preset' (#4246) from viceice/renovate-go-preset into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4246
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-26 08:36:39 +00:00
Earl Warren
a3a8b0e7d1 Merge pull request 'Update module github.com/yuin/goldmark to v1.7.4' (#4240) from renovate/github.com-yuin-goldmark-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4240
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-06-26 07:51:29 +00:00
Earl Warren
84f8aa9aa9 Merge pull request 'Update dependency minimatch to v9.0.5' (#4239) from renovate/minimatch-9.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4239
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-26 07:45:58 +00:00
Earl Warren
383677f3f1 Merge pull request 'Update module golang.org/x/image to v0.18.0' (#4241) from renovate/golang.org-x-image-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4241
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-26 07:32:01 +00:00
Michael Kriese
35b0181df0
chore(renovate): add shared go preset 2024-06-26 09:24:17 +02:00
Renovate Bot
bdd71ff840 Update dependency minimatch to v9.0.5 2024-06-26 06:20:05 +00:00
Renovate Bot
d9b83719d6 Update module github.com/yuin/goldmark to v1.7.4 2024-06-26 06:19:55 +00:00
Renovate Bot
83d7be3447 Update module golang.org/x/image to v0.18.0 2024-06-26 06:19:47 +00:00
Earl Warren
ae2d504beb Merge pull request 'chore(renovate): set group name for renovate' (#4236) from viceice/renovate-group into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4236
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-26 06:19:15 +00:00
Earl Warren
86b94c3b7f Merge pull request 'fix(security): GO-2024-2947' (#4245) from earl-warren/forgejo:wip-retryable into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4245
Reviewed-by: thefox <thefox@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-26 06:14:48 +00:00
Earl Warren
91f16dfcb7
fix(security): GO-2024-2947
Vulnerability #1: GO-2024-2947
    Leak of sensitive information to log files in
    github.com/hashicorp/go-retryablehttp
  More info: https://pkg.go.dev/vuln/GO-2024-2947
  Module: github.com/hashicorp/go-retryablehttp
    Found in: github.com/hashicorp/go-retryablehttp@v0.7.5
    Fixed in: github.com/hashicorp/go-retryablehttp@v0.7.7
    Example traces found:
      #1: services/migrations/gitlab.go:500:74: migrations.GitlabDownloader.GetComments calls gitlab.DiscussionsService.ListMergeRequestDiscussions, which eventually calls retryablehttp.Client.Do
2024-06-26 07:35:19 +02:00
Michael Kriese
f84f0df9b5
chore(renovate): set group name for renovate 2024-06-25 16:01:04 +02:00
0ko
0c4716b047 Clarify author label in tooltip 2024-06-25 18:30:06 +05:00
Earl Warren
a1024ee392 Merge pull request 'chore(renovate): sync renovate versions' (#4234) from viceice/renovate-sync into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4234
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-25 08:17:45 +00:00
Michael Kriese
28abbcc858
chore(renovate): sync renovate versions 2024-06-25 08:27:54 +02:00
Earl Warren
c6a6294046 Merge pull request '[gitea] week 2024-26 cherry pick (gitea/main -> forgejo)' (#4213) from earl-warren/wcp/2024-26 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4213
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-25 06:15:54 +00:00
Earl Warren
335d664e7c Merge pull request 'Update dependency @playwright/test to v1.45.0' (#4230) from renovate/playwright-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4230
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-25 05:38:59 +00:00
Renovate Bot
04458ad31d Update dependency @playwright/test to v1.45.0 2024-06-25 00:02:30 +00:00
0ko
c82547bf30 Size/gap changes and cleanup in commit graph (#4214)
Changes:
* increased font size of tag/branch labels from tiny to normal, so they're readable, it doesn't impact layout
* increased font size of branch selector from tiny to small, so it's readable and usable. Branch selector on main repo tab has the same size
* increased gap between the icon and the text in the selector, it is too small currently
* removed obsolete CSS rule, it wasn't fully utilized in the first place, it is no longer needed with the other changes

Preview:
Before: https://codeberg.org/attachments/e6eccdde-59fe-446c-99ed-d8a2f1dce9bd
First: https://codeberg.org/attachments/6d710118-18cb-4258-9d9a-79dfca377294
Last: https://codeberg.org/attachments/fc9517aa-d498-43cc-a186-a184e4c6fe8c

Before: https://codeberg.org/attachments/057f971b-2c3b-4500-923f-49f4e545daf6
First: https://codeberg.org/attachments/de4683ad-95da-48d5-b2ac-b9567fed6fcd
Last: https://codeberg.org/attachments/2abb0333-dea1-4123-b3ee-9cb54dca98cd

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4214
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-24 18:59:57 +00:00
Earl Warren
a3491f064f Merge pull request 'test(js): make test-frontend-coverage displays vitest coverage' (#4224) from earl-warren/forgejo:wip-frontend-coverage into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4224
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-24 08:41:59 +00:00
0ko
1496bb6079 Better logic for showing user feed/public activity elements (#4189)
There are a few changes of template logic which defines when which elements should be shown on profile page. The motivation is to have the elements when needed and don't when they're not relevant.

## Changes

### RSS button

Now displayed if:
* feeds are enabled
AND one or more of:
* the current user is an admin
* the current user is viewing their profile
* the activity is publicly available

So, basically in cases when the .rss feed actually contains any events. Before this change this button was constantly shown and was giving an empty feed if it was unavailable.

### Public activity tab

The tab is displayed if:
* the current user is an admin
* the current user is viewing their profile
* the activity is publicly available
* the current tab is this exact tab, for example, in case it was accessed by adding `?tab=activity` to the URL, so that the UI is not broken w/o a highlighted tab

So, this tab is not displayed when it's not going to contain any information, but still can be accessed.

### Banner "This user has disabled the public visibility of the activity."

For admins:
* always show the big blue banner to warn that sharing a screenshot of this publicly is bad idea

For self:
* always display a little note about the current visibility status with a "Change" link

For others:
* only display a little note to explain why the activity is not shown

### Heatmap and activity feed

Elements are only displayed when relevant, instead of keeping empty leftovers, for easier testing. This template change is also covered by test. **Everything in this Changes section is covered by test unless I forgot something.**

## Preview

There's obviously too many states to screenshot, here are highlights:

![](https://codeberg.org/attachments/47559531-9bcd-46c0-90d4-8b51512da752)
_Warning admin for why they're seeing the information_

![](https://codeberg.org/attachments/3107bf62-955b-4fe5-bce3-6305a928afe1)
_Viewing self - private_

![](https://codeberg.org/attachments/afb63ead-fb0b-4fc7-9d8b-c6c09e9ae62b)
_Viewing self - public_

![](https://codeberg.org/attachments/df3c090a-7490-4827-b33b-771fd4fa0a9f)
_Don't have access to the information_

![](https://codeberg.org/attachments/2dd2b0ac-2fe0-4453-aa4b-e91fd08f4411)
_The tab is not shown when the activity can't be accessed_

![](https://codeberg.org/attachments/ed4c61de-b3b7-4523-b92b-bc76e1d8b7c5)
_Can't access the RSS feed_

![](https://codeberg.org/attachments/5a27f2be-d79c-4fb4-85a5-758348398f1b)
_Can access the RSS feed_

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4189
Reviewed-by: Otto <otto@codeberg.org>
2024-06-24 08:19:11 +00:00
Earl Warren
536efeb26e
test(js): make test-frontend-coverage displays vitest coverage 2024-06-24 10:03:42 +02:00
Earl Warren
104ceef548 Merge pull request 'Update module github.com/yuin/goldmark to v1.7.3' (#4222) from renovate/github.com-yuin-goldmark-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4222
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-24 06:37:52 +00:00
Renovate Bot
e91961224d
Update module github.com/yuin/goldmark to v1.7.3 2024-06-24 08:03:18 +02:00
Earl Warren
b02b1832b4 Merge pull request 'Update dependency eslint-plugin-vue-scoped-css to v2.8.1' (#4221) from renovate/linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4221
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-24 05:51:26 +00:00
Earl Warren
130c03c8b8 Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.414.1' (#4220) from renovate/ghcr.io-visualon-renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4220
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-24 05:42:04 +00:00
Renovate Bot
dfb7d3364c Update dependency eslint-plugin-vue-scoped-css to v2.8.1 2024-06-24 00:02:54 +00:00
Renovate Bot
3244c96f1c Update ghcr.io/visualon/renovate Docker tag to v37.414.1 2024-06-24 00:02:22 +00:00
Earl Warren
e8db5ff7fe Merge pull request 'test: coverage for /repos/{owner}/{repo}/issues?project=' (#4217) from twenty-panda/forgejo:wip-filter-project into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4217
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-23 19:34:04 +00:00
Twenty Panda
b18ba810a5 test: coverage for /repos/{owner}/{repo}/issues?project=
Refs: https://codeberg.org/forgejo/forgejo/pulls/4215#issuecomment-2040651
2024-06-23 19:57:07 +02:00
silverwind
374964cd07
Fix deprecated Dockerfile ENV format (#31450)
See
https://docs.docker.com/reference/build-checks/legacy-key-value-format/.
Fixes these warnings seen during the docker build:

```
 4 warnings found (use --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 9)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 75)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 76)
 ```

Introduced in: https://github.com/moby/buildkit/pull/4923

(cherry picked from commit 996037fb6a61b1a7f9a0a837fd87bbeab9cad154)

Conflicts:
	Dockerfile.rootless
	trivial context conflict
2024-06-23 13:20:40 +02:00
wxiaoguang
d42165f0bb
Fix the link for .git-blame-ignore-revs bypass (#31432)
A quick fix for #31429

(cherry picked from commit ed5ded3ff86fc7c3eccfe28e59b30728e6bf9fbc)
2024-06-23 13:07:53 +02:00
charles
59532d93ef
Fix the wrong line number in the diff view page when expanded twice. (#31431)
close #31149, regression of #29385 (incorrect `data-query=`)

(cherry picked from commit c60ef946b1c5ed3347224cda5d3e17592cd16e5e)

Conflicts:
	templates/repo/diff/blob_excerpt.tmpl
	trivial context conflict
2024-06-23 12:48:08 +02:00
Brecht Van Lommel
585d62c0cd
Fix labels and projects menu overflow on issue page (#31435)
It was correct only on the new issue page.

Resolves #31415

(cherry picked from commit 5afafe22a34183c9c053a7ceac2c9dc05d9943e2)
2024-06-23 12:41:07 +02:00
Sumit
979eb1aa0c
[Fix] Account Linking UpdateMigrationsByType (#31428)
Fix https://github.com/go-gitea/gitea/issues/31427

(cherry picked from commit 17b3a38577d6e1d50ba5565ca3b1f2f57a04bf32)
2024-06-23 12:40:53 +02:00
charles
b53be9d45c
Fix markdown math brackets render problem (#31420)
Close #31371, support `($ ... $)` like GitHub

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 90a3c20e7996e2db577a51d37f2190e2e990a22a)

Conflicts:
	modules/markup/markdown/markdown_test.go
	trivial context conflict
2024-06-23 12:40:06 +02:00
silverwind
4ebe8c1270
Reduce air verbosity (#31417)
Make `air` log less. Uses the option added in
https://github.com/air-verse/air/pull/367.

(cherry picked from commit 1c1545268743d7d4536a5ff2a137af7c255f45c8)
2024-06-23 12:30:09 +02:00
Tobias Balle-Petersen
cdefd617d0
Increase max length of org team names from 30 to 255 characters (#31410)
This PR modifies the structs for editing and creating org teams to allow
team names to be up to 255 characters. The previous maximum length was
30 characters.

(cherry picked from commit 1c26127b520858671ce257c7c9ab978ed1e95252)
2024-06-23 12:21:38 +02:00
wxiaoguang
75bbca68ce
Refactor markup code (#31399)
1. use clearer names
2. remove deadcode
3. avoid name shadowing
4. eliminate some lint warnings

(cherry picked from commit 5a7376c0605415e63cb5b3b8f89ead01e567229b)

Conflicts:
	modules/markup/html.go
	simple code divergence, trivial logic
2024-06-23 11:53:36 +02:00
Earl Warren
9c48511c69
[PORT] Add cache test for admins (#31265)
* the cache was not refactored in Forgejo
* fix the test modifying a global variable
2024-06-23 11:38:35 +02:00
6543
77da92f42a
Add cache test for admins (#31265)
Add a test to probe the cache similar to the email test func.

![image](https://github.com/go-gitea/gitea/assets/24977596/700e2733-586d-4091-900f-f5f71e6e94bf)

![image](https://github.com/go-gitea/gitea/assets/24977596/2a953802-18fc-4e81-a37d-24ebe1297365)

![image](https://github.com/go-gitea/gitea/assets/24977596/e00d62ad-bb60-41cc-9138-09993daee156)

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 363c1235987793dffa5cc851aaae585eb81f091e)

Conflicts:
	options/locale/locale_en-US.ini
	templates/admin/self_check.tmpl
	trivial context conflict
2024-06-23 11:27:03 +02:00
Earl Warren
299ef6e6db Merge pull request 'chore(dependency): raise the renovate PRs from 5 to 10' (#4211) from earl-warren/forgejo:wip-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4211
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-23 08:46:22 +00:00
GiteaBot
40cd885c11
[skip ci] Updated licenses and gitignores
(cherry picked from commit 129206da4543f2024601af20dac3eaf978d0c432)
2024-06-23 10:37:24 +02:00
Earl Warren
5239d9c823
chore(dependency): raise the renovate PRs from 5 to 10
Now that the backlog has been resoloved, it is not uncommon for a few
upgrade to wait for a few days before a ruling is made on wether they
should be upgraded or not.

That may leave one or two slots for other upgrades although there may
be more that could be decided immediately.

Raising the concurrency to 10 leaves room for such bursts and avoid
creating a backlog that is not justified by delays related to the
availability of contributors.
2024-06-23 09:35:36 +02:00
Earl Warren
dac93c2475 Merge pull request 'Update module github.com/go-chi/chi/v5 to v5.0.14' (#4209) from renovate/github.com-go-chi-chi-v5-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4209
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-23 06:46:31 +00:00
Earl Warren
a659bafaa3 Merge pull request 'Update dependency vue to v3.4.30' (#4208) from renovate/patch-vue-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4208
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-23 06:39:43 +00:00
Renovate Bot
11e847ac74 Update module github.com/go-chi/chi/v5 to v5.0.14 2024-06-23 00:03:30 +00:00
Renovate Bot
75e1f073cc Update dependency vue to v3.4.30 2024-06-23 00:02:48 +00:00
Earl Warren
a010b138b4 Merge pull request 'Update dependency webpack to v5.92.1' (#4112) from renovate/webpack-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4112
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 13:37:53 +00:00
Earl Warren
32d1114948 Merge pull request 'Improve wording in user blocking modal' (#4204) from 0ko/forgejo:i18n-block-user-modal into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4204
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 12:22:03 +00:00
0ko
5d741259da [I18N] Improve wording in user blocking modal 2024-06-22 13:19:59 +05:00
Earl Warren
804aa99f06 Merge pull request 'Update dependency happy-dom to v14.12.3' (#4200) from renovate/happy-dom-14.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4200
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-22 06:32:55 +00:00
Renovate Bot
fea8f3c185 Update dependency happy-dom to v14.12.3 2024-06-22 00:03:09 +00:00
Renovate Bot
c07cc28d88 Update module code.forgejo.org/f3/gof3/v3 to v3.4.0 (#4196)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.forgejo.org/f3/gof3/v3 | require | minor | `v3.3.1` -> `v3.4.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDkuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwOS4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiXX0=-->

Co-authored-by: Twenty Panda <twenty-panda@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4196
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-06-21 13:51:59 +00:00
Earl Warren
7b23019040 Merge pull request 'Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.1' (#4191) from renovate/ghcr.io-devcontainers-features-git-lfs-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4191
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-21 08:57:01 +00:00
Earl Warren
a97adc6626
chore(dependency): group devcontainer packages and update quarterly 2024-06-21 10:18:29 +02:00
Earl Warren
96d6b0ce94 Merge pull request 'Update dependency renovate to v37.413.4' (#4192) from renovate/renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4192
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-21 07:00:55 +00:00
Earl Warren
0e7095720b Merge pull request 'Show edit tab initially also when saved in preview tab previously' (#3969) from beowulf/show-edit-tab-initially-also-editing-comments-multiple-times-and-saving-in-preview-mode into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3969
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-06-21 06:54:54 +00:00
oliverpool
65f8c22cc7 [BUG] admin oauth2 source required check (#4194)
#4059 was unfortunately incomplete: some custom_url fields are currently shown, even if they are not used by the provider. Moreover the `Use Custom URLs Instead of Default URLs` is always checked by default.

Manual testing:
- go to http://localhost:3000/admin/auths
- click on `Add authentication source`
- Choose `Authentication type`: `OAuth2`
- Choose `OAuth2 provider`: `GitLab`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially unchecked**
- enable the `Use Custom URLs Instead of Default URLs` checkbox
- verify that only the fields "Authorize", "Token" and "Profile" URLs are shown (no "Email URL", nor "Tenant").
- Switch the `OAuth2 provider` to `Azure AD v2`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially checked**
- verify that only the field "Tenant" is shown (with the default "organizations").

![image](/attachments/0e2b1508-861c-4b0e-ae6a-6eb24ce94911)

Note: this is loosely based on the upstream fix https://github.com/go-gitea/gitea/pull/31246 which I initially overlooked.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4194
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-06-21 06:21:37 +00:00
Renovate Bot
24915f4df5 Update dependency renovate to v37.413.4 2024-06-21 02:02:15 +00:00
Renovate Bot
c2c45520a5 Update ghcr.io/devcontainers/features/git-lfs Docker tag to v1.2.1 2024-06-20 00:01:42 +00:00
Renovate Bot
7c3a0d39e6 Update dependency webpack to v5.92.1 2024-06-19 18:01:53 +00:00
Earl Warren
d03a169dae Merge pull request 'Add headers to follower lists' (#4174) from 0ko/forgejo:ui-profile-followers-title into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4174
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 09:54:41 +00:00
0ko
53215726e1 Add headers to follower lists 2024-06-19 11:53:59 +05:00
Earl Warren
b51f9fa37e Merge pull request '[SWAGGER] Make UserSettings definition an non-array' (#4182) from gusted/forgejo-api into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4182
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 06:36:45 +00:00
Earl Warren
f78269d16e Merge pull request 'Update module github.com/go-chi/chi/v5 to v5.0.13' (#4180) from renovate/github.com-go-chi-chi-v5-5.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4180
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-19 05:34:52 +00:00
Gusted
5926ed1f73
[SWAGGER] Make it consistent with reality
- Make the `UserSettings` definition an non-array, this is consistent
with the existing endpoints that uses this definition.
- Resolves #4179
2024-06-19 07:16:42 +02:00
Renovate Bot
07e26508b0 Update module github.com/go-chi/chi/v5 to v5.0.13 2024-06-19 00:02:33 +00:00
Earl Warren
7aa3b41dfe Merge pull request 'Port: Fix Activity Page Contributors dropdown (gitea#31264)' (#4176) from Mai-Lapyst/forgejo:cherrypick-31264 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4176
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 19:41:47 +00:00
Earl Warren
87625a23bb Merge pull request 'fix(renovate): add renovate.json validation to lint-backend' (#4172) from earl-warren/forgejo:wip-ci-renovate into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4172
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-18 19:38:09 +00:00
wxiaoguang
35447463ba
Fix Activity Page Contributors dropdown (#31264)
Fix #31261

(cherry picked from commit e728fd741be7848d476663eec1c9caaf34b46e61)
2024-06-18 20:05:23 +02: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
0ko
24ac2d4236 A few cosmetic improvements to the installation page (#4170)
* reword one field description
* fix top margin caused by docker installation hint in the form

## Preview

https://codeberg.org/attachments/ddcdf3f3-c31e-4ecd-b172-ac80431737cb

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4170
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 09:49:56 +00:00
Earl Warren
328b5d79d3 Merge pull request '[gitea] week 2024-25 cherry pick (gitea/main -> forgejo)' (#4145) from earl-warren/wcp/2024-25 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4145
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-18 07:56:20 +00:00
Earl Warren
79e4667ce4 Merge pull request 'Update module github.com/gorilla/feeds to v1.2.0' (#4166) from renovate/github.com-gorilla-feeds-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4166
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 07:46:05 +00:00
Renovate Bot
a815eb552a
Update module github.com/gorilla/feeds to v1.2.0
Refs: https://github.com/go-gitea/gitea/pull/31400
2024-06-18 09:06:46 +02:00
Earl Warren
d7ce508894 Merge pull request 'Update dependency vite-string-plugin to v1.3.4' (#4164) from renovate/vite-string-plugin-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4164
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-18 06:52:04 +00:00
Renovate Bot
704f1205a6 Update dependency vite-string-plugin to v1.3.4 2024-06-18 06:02:32 +00:00
Codeberg Translate
1f386d4a83 [I18N] Translations update from Weblate (#4098)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: sinsky <sinsky@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: bbjubjub2494 <bbjubjub2494@users.noreply.translate.codeberg.org>
Co-authored-by: lotigara <lotigara@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4098
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-06-18 05:27:03 +00:00
Shiny Nematoda
b5d96e7db7 [FEAT] expose fuzzy search for issues/repo (#4160)
Ports fuzzy search for `/issues` and `/pulls` from gitea.
Adds fuzzy search for `/user/repo/issues` and `/user/repo/pulls`.

---
## Notes
### Port: [`gitea#be5be0ac81`](be5be0ac81)

- CONFLICT (content): Merge conflict in routers/web/user/home.go

Conflict resolved by
  1. keeping both `PageIsOrgIssues` and the newly introduced `IsFuzzy`
  2. using `pager.AddParam(ctx, "fuzzy", "IsFuzzy")` rather than `pager.AddParamString("fuzzy", fmt.Sprintf("%v", isFuzzy))`

- CONFLICT (content): Merge conflict in templates/user/dashboard/issues.tmpl

Conflict resolved by keeping the changes from #4096, and picking the `&fuzzy=${{.IsFuzzy}}` inclusion to all urls and `{{if .PageIsPulls}}...`

### Port: [`gitea#fede3cbada`](fede3cbada)

- CONFLICT (content): Merge conflict in templates/user/dashboard/issues.tmpl

Conflict resolved by keeping previous changes and picking the replacement of `{{if .PageIsPulls}}...` with `{{template "shared/search/combo_fuzzy"...` which contains the replacement of `explorer.go` to `explorer.go_to`

### Fixup commit

replaces `Iif` with `if` which was introduced in gitea#fede3cbada

### Feature commit

adds in support for /user/repo/(issues|pulls) + test

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4160
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-17 18:58:24 +00:00
Earl Warren
bd23b8c75f Merge pull request 'test(dump): don't depend on directory listing order' (#4161) from emilylange/fix-dump-go-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4161
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-17 18:53:07 +00:00
emilylange
230a677c74
test(dump): don't depend on directory listing order
cmd/dump.go uses os.Readdir to list the directory.

This is fine on its own, but TestAddRecursiveExclude in cmd/dump_test.go
depends on the order of the directory listing, which is where the issue
lays.

Directory listings using os.Readdir (lstat) don't actually guarantee an
order. They can differ due to a number of factors. Most notably the OS,
file system and settings.

As such, the test should not check the /order of the files/ added to the
archive, but instead simply check whether the archive /contains/ them.

So this is precisely what this commit does.

Note that only TestAddRecursiveExclude/File_inside_directory/No_exclude
has been observed to fail due to this, but all TestAddRecursiveExclude
subtests have been updated for consistency.
2024-06-17 17:54:59 +02:00
oliverpool
82ae7460bf [BUG] admin authentication source JS errors (#4059)
While trying to understand #1236, I was quite confused not to see the `Use Custom URLs` checkbox.

This checkbox disappeared in b95a893b22 (because `getElementById` does not expect a `#` as first char), fixed in 4e816e1326.

After solving this, switching from `Nextcloud` to `OpenID Connect` triggered a JS error, which is addressed in 3efa4d836a.

Manual testing:
- go to http://localhost:3000/admin/auths
- click on `Add authentication source`
- Choose `Authentication type`: `OAuth2`
- Choose `OAuth2 provider`: `Nextcloud`
- check that the `Use Custom URLs Instead of Default URLs` checkbox toggles the fields below
- let the checkbox be checked
- Switch the `OAuth2 provider` to `OpenID Connect`
- ensure that no JS error is shown
- Switch the `OAuth2 provider` to `Mastodon`
- check that the fields below `Use Custom URLs Instead of Default URLs` have the right defaults (mastodon.social)

![2024-06-07-101638.png](/attachments/5bd6692e-3457-4dd8-b1c1-50e9a95a3100)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4059
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-06-17 10:05:59 +00:00
Earl Warren
edab0f3a25 Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.409.1' (#4155) from renovate/ghcr.io-visualon-renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4155
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-17 00:52:07 +00:00
Renovate Bot
db767e2d12 Update ghcr.io/visualon/renovate Docker tag to v37.409.1 2024-06-17 00:02:26 +00:00
Earl Warren
f3c475eeba Merge pull request 'Fix bug in GetIssueStats' (#4124) from JakobDev/forgejo:statfix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4124
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-16 18:27:50 +00:00
Earl Warren
22aa2b6341 Merge pull request 'Add Org-Readme to search with priority' (#4147) from beowulf/add-org-readme-to-search-with-priority into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4147
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-16 18:17:45 +00:00
Earl Warren
8cbd46a023 Merge pull request 'fix(repository): git push to an adopted repository fails' (#4149) from twenty-panda/forgejo:wip-sync-adopt into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4149
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-16 18:13:54 +00:00
Lunny Xiao
8efef06fb1 fix(repository): git push to an adopted repository fails
Fix adopt repository has empty object name in database (#31333)

Fix #31330
Fix #31311

A workaround to fix the old database is to update object_format_name to
`sha1` if it's empty or null.

(cherry picked from commit 1968c2222dcf47ebd1697afb4e79a81e74702d31)

With tests services/repository/adopt_test.go
2024-06-16 19:06:06 +02:00
JakobDev
0233ee0c0d
Run make fmt 2024-06-16 15:59:59 +02:00
Beowulf
b03cc85f79
add org readme to search with priority
This adds org-mode readmes to the extensions that are prioritized when
searching for readme. Org-mode readmes come after markdown readmes in
terms of priority and before txt readmes.

Closes #4073
2024-06-16 15:27:28 +02:00
Beowulf
c984e62378 Restore old image pasting behavior (#3965)
This removes the difference between high density images and other images regarding the pasting.

## Why

With this change, all images are clickable by default again. I don't think there is any problem regarding the img size because 1. it is the old behaviour, 2. the comment container already limits the size of the image.

## Alternatives

We can add an a-tag automatically when the user pastes an image. I do not prefer this because this adds a really long text (it's already bad with the img-tag) e.g.: `<a href="/attachments/28cf2254-13be-46c6-a433-efc77f556083" target="_blank"><img width="385" alt="grafik" src="/attachments/28cf2254-13be-46c6-a433-efc77f556083"></a>`

## Testing

1. Open an issue or pull request
2. Paste an image in the comment text box
3. The image should be pasted with valid Markdown syntax

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3965
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2024-06-16 12:45:34 +00:00
0ko
0a026a9cd8 Reorder repo tabs (#4139)
More info in the linked PR.

---

Make positioning of the repo tabs make more sense. This is an isolated implementation for one of many changes discussed in the referenced issue, it will work good without the other changes too.

## Changes

- Actions are moved to the edge. This tab is the least relevant to both visitors and developers. The first don't really need it at all, the second only visit it when something goes unexpected (run did not happen or attached to the wrong event), or just to see the run queue to know when their actions is going to get processed. This is not a tab with always-relevant information.

- put Packages after releases. The Packages are like a download page for Releases, but for released packages instead of binaries/source code. It is relevant to Releases, so it should stay close, but it is secondary to Releases by importance. For example, because they don't actually contain release notes unlike Releases.

- the above makes Projects appear next to Issues and Pull requests which I think is nice as they're related.

## Preview

### v7
https://codeberg.org/attachments/c434e8fd-aaab-4c27-9071-2a3ba68ad4b7

### This PR
https://codeberg.org/attachments/74743c03-883e-40cf-8cb1-384d1d8cf63c

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4139
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-06-16 12:36:41 +00:00
Earl Warren
133d62a2ef Merge pull request 'fix(f3): do not run the F3 CLI if F3 is disabled' (#4148) from earl-warren/forgejo:wip-f3 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4148
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-16 12:07:36 +00:00
Earl Warren
053eb65a0b
docs(release-notes): week 2024-25 cherry pick
Refs: https://codeberg.org/forgejo/forgejo/pulls/4145
2024-06-16 13:42:59 +02:00
Zoupers Zou
baad8337f9
Fix #31185 try fix lfs download from bitbucket failed (#31201)
Fix #31185

(cherry picked from commit e25d6960b5749fbf7f88ebb6b27878c0459817da)
2024-06-16 13:42:59 +02:00
Earl Warren
41bea7c23a
chore: update deadcode-out 2024-06-16 13:42:59 +02:00
6543
3246e83251
Rename repo_model.SearchOrderByMap to repo_model.OrderByMap (#31359)
https://github.com/go-gitea/gitea/pull/30876#discussion_r1637112394
(cherry picked from commit 78e8296e113e2fd9259ec05fe87035427821ea0b)
2024-06-16 13:42:59 +02:00
6543
5d10c3446a
rm const do inline (#31360)
https://github.com/go-gitea/gitea/pull/30876/files#r1637288202
(cherry picked from commit e37ecd17324946d9b2db07ea10d4a9fbb53da20f)
2024-06-16 13:42:59 +02:00
Zettat123
813bf24445
Allow downloading attachments of draft releases (#31369)
Fix #31362

(cherry picked from commit 42718d32af9d259205bee0fde818ffc0c3a9797f)
2024-06-16 13:42:59 +02:00
mzroot
ff43d02803
Add tag protection via rest api #17862 (#31295)
Add tag protection manage via rest API.

---------

Co-authored-by: Alexander Kogay <kogay.a@citilink.ru>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit d4e4226c3cbfa62a6adf15f4466747468eb208c7)

Conflicts:
	modules/structs/repo_tag.go
	trivial context conflict
	templates/swagger/v1_json.tmpl
	fixed with make generate-swagger
2024-06-16 13:42:59 +02:00
KN4CK3R
7fa7ec0891
Extract and display readme and comments for Composer packages (#30927)
Related #30075

CC @thojo0

Example with rendered readme:

![grafik](https://github.com/go-gitea/gitea/assets/1666336/3516fef5-2631-40fd-8841-5d9894ec8904)

(cherry picked from commit 4e7b067a7fdfb3e2c8dfdf87475e3938051fd400)
2024-06-16 13:42:59 +02:00
Lunny Xiao
9aa3ae955f
Fix bug filtering issues which have no project (#31337)
Fix #31327
This is a quick patch to fix the bug.
Some parameters are using 0, some are using -1. I think it needs a
refactor to keep consistent. But that will be another PR.

(cherry picked from commit e4abaff7ffbbc5acd3aa668a9c458fbdf76f9573)
2024-06-16 13:42:59 +02:00
Oleksandr Redko
b640ac4660
Refactor to use UnsafeStringToBytes (#31358)
The PR replaces all `goldmark/util.BytesToReadOnlyString` with
`util.UnsafeBytesToString`, `goldmark/util.StringToReadOnlyBytes` with
`util.UnsafeStringToBytes`. This removes one `TODO`.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 1761459ebc7eb6d432eced093b4583425a5c5d4b)
2024-06-16 13:42:58 +02:00
yp05327
b5ea092964
Fix PullRequestList.GetIssueIDs's logic (#31352)
fix a bug from #30490

`prs.GetIssueIDs()` will also be used in other places, e.g.
`InvalidateCodeComments`
so we should not add `if pr.Issue == nil` in it, or if `pr.Issue` is
already loaded, you will not get the issueID in the results list and
this is not an expected result.

So this will caused a bug:
before calling `InvalidateCodeComments`, all `pr.Issues` in `prs` are
loaded, so `issueIDs` in this function will always be `[]`.

![image](https://github.com/go-gitea/gitea/assets/18380374/ef94d9d2-0bf9-455a-abd6-4d5e6497db7c)

(cherry picked from commit e61e9a36b7117bab2cb122a95d606a86527ed45d)
2024-06-16 13:42:58 +02:00
6543
12e23ee199
[Refactor] Unify repo search order by logic (#30876)
have repo OrderBy definitions defined in one place and use a single type
for OrderBy database options

(cherry picked from commit bb04311b0b5b7a28f94c4bc409db1c4a04bcef17)
2024-06-16 13:42:58 +02:00
Lunny Xiao
62ed5f2db5
Fix hash render end with colon (#31319)
Fix a hash render problem like `<hash>: xxxxx` which is usually used in
release notes.

(cherry picked from commit 7115dce773e3021b3538ae360c4e7344d5bbf45b)
2024-06-16 13:42:58 +02:00
Rowan Bohde
1627d3a53f
Reduce memory usage for chunked artifact uploads to MinIO (#31325)
When using the MinIO storage driver for Actions Artifacts, we found that
the chunked artifact required significantly more memory usage to both
upload and merge than the local storage driver. This seems to be related
to hardcoding a value of `-1` for the size to the MinIO client [which
has a warning about memory usage in the respective
docs](https://pkg.go.dev/github.com/minio/minio-go/v7#Client.PutObject).
Specifying the size in both the upload and merge case reduces memory
usage of the MinIO client.

Co-authored-by: Kyle D <kdumontnu@gmail.com>
(cherry picked from commit 45dbeb5600d1f552c0134721fe49e8fd1099b5a4)
2024-06-16 13:42:58 +02:00
Lunny Xiao
80357bbcb3
Fix adopt repository has empty object name in database (#31333)
Fix #31330
Fix #31311

A workaround to fix the old database is to update object_format_name to
`sha1` if it's empty or null.

(cherry picked from commit 1968c2222dcf47ebd1697afb4e79a81e74702d31)
2024-06-16 13:42:58 +02:00
silverwind
d8bc0495de
Enable unparam linter (#31277)
Enable [unparam](https://github.com/mvdan/unparam) linter.

Often I could not tell the intention why param is unused, so I put
`//nolint` for those cases like webhook request creation functions never
using `ctx`.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit fc2d75f86d77b022ece848acf2581c14ef21d43b)

Conflicts:
	modules/setting/config_env.go
	modules/storage/azureblob.go
	services/webhook/dingtalk.go
	services/webhook/discord.go
	services/webhook/feishu.go
	services/webhook/matrix.go
	services/webhook/msteams.go
	services/webhook/packagist.go
	services/webhook/slack.go
	services/webhook/telegram.go
	services/webhook/wechatwork.go

	run make lint-go and fix Forgejo specific warnings
2024-06-16 13:42:58 +02:00
6543
8346cd6c88
update nix flake and add gofumpt (#31320)
nix flake maintenance

(cherry picked from commit 61c97fdef10d29f8813ee18734b37bb2797e3bab)
2024-06-16 13:42:58 +02:00
Earl Warren
50afca7961
fix(f3): do not run the F3 CLI if F3 is disabled 2024-06-16 13:33:33 +02:00
wxiaoguang
20ca5e37e9
Delete legacy cookie before setting new cookie (#31306)
Try to fix #31202

(cherry picked from commit 5342a61124bf2d4fbe4c1d560b13866198149ac9)
2024-06-16 08:21:32 +02:00
Earl Warren
3365875fbd Merge pull request 'Update dependency asciinema-player to v3.8.0' (#4143) from renovate/asciinema-player-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4143
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-16 05:59:55 +00:00
Earl Warren
642501e365
chore(dependency): asciinema-player to v3.8.0 release notes 2024-06-16 07:30:29 +02:00
Renovate Bot
0ec5f25be6 Update dependency asciinema-player to v3.8.0 2024-06-16 00:02:14 +00:00
Shiny Nematoda
53d4e90411 [FEAT] folding results for repo search (#4134)
closes #3855

unlike #3854, this implementation uses a generic details html tag and a bit of tailwind magic...

---
## Maintainers Note
- previously tailwind classes of the form `[-a-zA-Z:0-9_.]` was disabled, however they were enabled since they were required for the `group-open:` classes

---

## Manual Testing
1. Visit the code search results after submitting a valid query for repo (if indexer disabled) or repo, user, explore (if indexer enabled)
2. Verify thst
    1. the results are unfloded/open by default
    2. the chevron points down when open and right when closed

<video src="/attachments/5a55c56f-6159-4422-ab80-962e0121e7d2" title="fold2.mp4" controls></video>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4134
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-15 20:16:18 +00:00
0ko
291e145ac5 Move global issue/pull sidebar filter into an option (#4096)
Sidebar repo filtering was removed in gitea1.22-legacy, so in Forgejo 7.0. Now it only has filtering based on issue/pull type (created by me, i'm assigned..), which can easily fit into a regular filtering option to be consistent with other UI pages: subscriptions and repo issues.

* move these filtering from sidebar to a "Type" option. You can find the same option in repo issues

Affected pages (you can view how "Before" looks like here):
* https://codeberg.org/issues
* https://codeberg.org/pulls
* https://codeberg.org/org/forgejo/issues
* https://codeberg.org/org/forgejo/pulls

## Preview

https://codeberg.org/attachments/652db186-9bd4-414b-ae0e-06a11f9c1abd
https://codeberg.org/attachments/76c2b040-0900-4fed-aa69-e76d31072fa7

## The inspiration

This PR improves consistency with repo issues/pulls view:

https://codeberg.org/attachments/2f503ca7-89a0-4c0a-ad37-b0d7755e044d

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4096
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-06-15 16:11:31 +00:00
Danko Aleksejevs
221ca0c404 Implement tab indentation and list continuation in the new editor (#3848, #3849) (#4072)
This overrides handling of Tab and Enter keys in the ComboMarkdownEditor, so that:

* Pressing Tab prepending 4 spaces to the line under cursor, or all the lines in the selection.
* Pressing Shift+Tab removes up to 4 spaces.
* Pressing Enter repeats any indentation and a "repeatable" prefix (list or blockquote) from the current line.

Since Tab "capture" can interfere with keyboard navigation, it's only done if there was any previous input in the textarea or if it was selected with a pointer. Additionally, presing Esc will make the textarea lose focus, resuming tab navigation. This seems adequate to me, but I might be wrong.

Had to use the "deprecated" execCommand method, since anything else I tried messes up the undo history. There's a fallback for when (if?) it's actually removed.

Only tested in desktop Firefox and Chrome so far.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4072
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
2024-06-15 13:40:31 +00:00
Earl Warren
aa20248c83 Merge pull request 'Update module github.com/yuin/goldmark to v1.7.2' (#4136) from renovate/github.com-yuin-goldmark-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4136
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-15 05:09:01 +00:00
Earl Warren
b386d23d09
chore(dependency): github.com/yuin/goldmark v1.7.2 release notes 2024-06-15 06:38:04 +02:00
Renovate Bot
aa9c164940 Update module github.com/yuin/goldmark to v1.7.2 2024-06-15 00:02:33 +00:00
Shiny Nematoda
d6abb363f6 FIX: use proper time format (activitypub/client) (#4132)
use proper http time format than replacing with GMT in time.RFC1123 =)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4132
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-06-14 15:22:37 +00:00
Beowulf
09aa1c57f1
show edit textfield always initially when editing comments
When a comment was added and saved with the preview tab active, the
preview tab is still active, when the comment is edited again.
This adds a "hacky" solution, but it works and is simple.
Every time the edit is "started" and the editor already exists, the tab
with the edit text field gets clicked to activate it.

Fixes #1334
2024-06-14 15:42:21 +02:00
Earl Warren
ab95cc6726 Merge pull request 'feat(f3): initial driver' (#3590) from earl-warren/forgejo:wip-f3 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3590
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-06-14 11:23:03 +00:00
Earl Warren
e99d3f7055
feat(F3): CLI: f3 mirror to convert to/from Forgejo
feat(F3): driver stub

feat(F3): util.Logger

feat(F3): driver compliance tests

feat(F3): driver/users implementation

feat(F3): driver/user implementation

feat(F3): driver/{projects,project} implementation

feat(F3): driver/{labels,label} implementation

feat(F3): driver/{milestones,milestone} implementation

feat(F3): driver/{repositories,repository} implementation

feat(F3): driver/{organizations,organization} implementation

feat(F3): driver/{releases,release} implementation

feat(F3): driver/{issues,issue} implementation

feat(F3): driver/{comments,comment} implementation

feat(F3): driver/{assets,asset} implementation

feat(F3): driver/{pullrequests,pullrequest} implementation

feat(F3): driver/{reviews,review} implementation

feat(F3): driver/{topics,topic} implementation

feat(F3): driver/{reactions,reaction} implementation

feat(F3): driver/{reviewComments,reviewComment} implementation

feat(F3): CLI: f3 mirror

chore(F3): move to code.forgejo.org

feat(f3): upgrade to gof3 3.1.0

repositories in pull requests are represented with a reference instead
of an owner/project pair of names
2024-06-14 12:52:12 +02:00
Earl Warren
2a7c0b3402 Merge pull request 'Update elasticsearch Docker tag to v7.17.22' (#4131) from renovate/elasticsearch-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4131
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-14 04:59:56 +00:00
Earl Warren
c74dc7d114
chore(dependency): upgrade elasticsearch CI images quarterly 2024-06-14 06:32:11 +02:00
Renovate Bot
6e6c2aadd7 Update elasticsearch Docker tag to v7.17.22 2024-06-14 00:02:49 +00:00
Earl Warren
64b67ba641 Merge pull request 'Fix default values for ui.meta settings in app.example.ini' (#4130) from mirkoperillo/forgejo:fix-ui-settings-default into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4130
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-13 14:42:16 +00:00
mirko
22b185240c Fix default values documentation for ui.meta settings 2024-06-13 15:52:40 +02:00
Earl Warren
1032c52216 Merge pull request '[skip ci] docs(release-notes): 1.21.11-2' (#4129) from earl-warren/forgejo:wip-release-notes-v1.21 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4129
Reviewed-by: Otto <otto@codeberg.org>
2024-06-13 13:23:34 +00:00
Earl Warren
43e5209490
[skip ci] docs(release-notes): 1.21.11-2 2024-06-13 14:27:14 +02:00
Earl Warren
3b4ea9501f Merge pull request '[skip ci] docs(release-notes): 7.0.4' (#4116) from earl-warren/forgejo:wip-release-notes-v7.0 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4116
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-06-13 10:14:15 +00:00
JakobDev
4c90d20c9c
Add release note 2024-06-13 10:29:23 +02:00
JakobDev
b9fba8d71f
Fix bug in GetIssueStats 2024-06-13 10:25:26 +02:00
Earl Warren
6176063e73
[skip ci] docs(release-notes): 7.0.4 2024-06-13 08:09:27 +02:00
Earl Warren
74aa8f1e6d Merge pull request 'Update dependency vite-string-plugin to v1.3.2' (#4122) from renovate/vite-string-plugin-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4122
2024-06-13 06:06:29 +00:00
Earl Warren
b99c741a11 Merge pull request 'Update module github.com/klauspost/compress to v1.17.9' (#4121) from renovate/github.com-klauspost-compress-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4121
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-13 06:03:59 +00:00
Renovate Bot
1f1b59597b Update dependency vite-string-plugin to v1.3.2 2024-06-13 02:03:06 +00:00
Renovate Bot
7f89eeb365 Update module github.com/klauspost/compress to v1.17.9 2024-06-13 00:03:41 +00:00
Earl Warren
4665496ddb Merge pull request 'Minor improvements to English locale' (#4109) from 0ko/forgejo:i18n-english-20240611 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4109
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-11 19:21:39 +00:00
0ko
377165a38f Cleanup commit graph CSS (#4065)
Very little visual changes:
* class `labelled` is not used in CSS, removed from elements
* `margin-right: 0;` in `#git-graph-container .color-buttons` wasn't doing anything
* `width: 100%;` in `#git-graph-container #rev-container` and `#git-graph-container #rev-list` wasn't doing anything
(Checked on both desktop and mobile screens.)
* the now unused class `color-buttons` is left for now because it might come useful later. The button coloring is broken here and I would like to touch it separately
* removed `font-size: 80%;` from dates to ensure proper readability, it wasn't saving much space but was inconvenient to look at because other dates in the UI are normal sized
* the small size of branch labels are left as is for now because removing `small` breaks alignment, and this is a cleanup PR

So, the only visual change is date sizes, other than that there's just styling code removed.

https://codeberg.org/attachments/d02f2771-8517-4b8b-9ac7-76b020f7b14e

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4065
Reviewed-by: Otto <otto@codeberg.org>
2024-06-11 19:06:56 +00:00
0ko
c320f16a0b Fix wrong error highlighting on install page (#4063)
More details are in PR message.

Changes applied:

* replace `Err_Services` with more specific `Err_DisabledRegistration`
* highlight the self-registration option instead of services section

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4063
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-11 19:05:05 +00:00
0ko
e5e0786c8b [I18N] Minor improvements to English locale 2024-06-11 22:42:33 +05:00
Earl Warren
c35d86f976 [skip ci] IGNORE (#4106)
<!--
Before submitting a PR, please read the contributing guidelines:
https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4106
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-06-11 16:06:50 +00:00
Earl Warren
d6140093c0 Merge pull request 'Replace gt-word-break with tw-break-anywhere' (#4102) from 0ko/forgejo:ui-replace-gt-word-break into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4102
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-11 10:39:03 +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
Earl Warren
0cbe402e99
docs(release): week 2024-24 cherry pick
Refs: https://codeberg.org/forgejo/forgejo/pulls/4083
2024-06-11 09:19:09 +02:00
Earl Warren
e561e48f04 Merge pull request 'Update dependency @github/relative-time-element to v4.4.2' (#4100) from renovate/github-relative-time-element-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4100
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-11 06:14:05 +00:00
0ko
367317af6c Disable issue subscribe button for guest users (#4095)
* disabled the button itself, but added the tooltip to the form, because it didn't work for the button and likely has something to do with JS
* added an integration test to verify the new logic

## Preview

|Signed in|Guest|
|-|-|
|![](/attachments/b1441565-6aec-4a72-a28f-6383914c8918)|![](/attachments/839cc58e-18cf-4a5d-a9d7-f0e3e2556c98)|

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4095
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-06-11 05:54:35 +00:00
0ko
467460679b Replace gt-word-break with tw-break-anywhere
Mass replace based on https://github.com/go-gitea/gitea/pull/31183/files.
2024-06-11 08:57:27 +05:00
Beowulf
187860bded Fix margin above headline in rendered org-mode (#4076)
This Fixes #3962 by adding `!important` to the margin of the heading in the rendered markdown.

In the current behaviour, the margin-top was always overridden by a global css-rule. This is prevented by this change.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4076
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2024-06-11 03:34:21 +00:00
Renovate Bot
37cee574ef Update dependency @github/relative-time-element to v4.4.2 2024-06-11 00:03:06 +00:00
Codeberg Translate
ea5f7f0848 [I18N] Translations update from Weblate (#3992)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: qwerty287 <qwerty287@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kaede Fujisaki <ledyba@users.noreply.translate.codeberg.org>
Co-authored-by: SDKAAA <SDKAAA@users.noreply.translate.codeberg.org>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: mondstern <mondstern@users.noreply.translate.codeberg.org>
Co-authored-by: Application-Maker <Application-Maker@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3992
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-06-10 18:41:20 +00:00
Earl Warren
6e05f1225b Merge pull request 'fix: PKCE only for OpenID Connect authentication sources' (#4094) from oliverpool/forgejo:pkce_goth_fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4094
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-10 14:10:06 +00:00
oliverpool
7d6a0bced9 fix: PKCE only for supported providers 2024-06-10 11:24:32 +02:00
oliverpool
985939c145 test: pkce only for OpenID Connect 2024-06-10 11:24:32 +02:00
Earl Warren
d4af96647e Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.59.1' (#4091) from renovate/github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4091
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-10 06:43:15 +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
Earl Warren
a606d3181c Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.399.10' (#4090) from renovate/ghcr.io-visualon-renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4090
2024-06-10 05:29:03 +00:00
Renovate Bot
c12b0cd10a Update ghcr.io/visualon/renovate Docker tag to v37.399.10 2024-06-10 02:02:27 +00:00
wxiaoguang
457fb013ef
Fix some URLs whose sub-path is missing (#31289)
Fix #31285

(cherry picked from commit 0188d82e4908eb173f7203d577f801f3168ffcb8)

Conflicts:
	templates/user/settings/applications.tmpl
2024-06-09 16:04:57 +02: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
Max Wipfli
4ddd9af50f
Allow including Reviewed-on/Reviewed-by lines for custom merge messages (#31211)
This PR introduces the `ReviewedOn` and `ReviewedBy` variables for the
default merge message templates (e.g.,
`.gitea/default_merge_message/MERGE_TEMPLATE.md`).

This allows customizing the default merge messages while retaining these
trailers.

This also moves the associated logic out of `pull.tmpl` into the
relevant Go function.

This is a first contribution towards #11077.

---

For illustration, this allows to recreate the "default default" merge
message with the following template:
```
.gitea/default_merge_message/MERGE_TEMPLATE.md
Merge pull request '${PullRequestTitle}' (${PullRequestReference}) from ${HeadBranch} into ${BaseBranch}

${ReviewedOn}
${ReviewedBy}
```

(cherry picked from commit da4bbc42477ba04d175cc0775a0c5ec90c4c24fe)

Conflicts:
	docs/content/usage/merge-message-templates.en-us.md
	not in Forgejo
	templates/repo/issue/view_content/pull.tmpl
	trivial context conflict
2024-06-09 16:04:57 +02:00
Henrique Pimentel
433b6c6910
Add MAX_ROWS option for CSV rendering (#30268)
This solution implements a new config variable MAX_ROWS, which
corresponds to the “Maximum allowed rows to render CSV files. (0 for no
limit)” and rewrites the Render function for CSV files in markup module.
Now the render function only reads the file once, having MAX_FILE_SIZE+1
as a reader limit and MAX_ROWS as a row limit. When the file is larger
than MAX_FILE_SIZE or has more rows than MAX_ROWS, it only renders until
the limit, and displays a user-friendly warning informing that the
rendered data is not complete, in the user's language.

---

Previously, when a CSV file was larger than the limit, the render
function lost its function to render the code. There were also multiple
reads to the file, in order to determine its size and render or
pre-render.

The warning: ![image](https://s3.amazonaws.com/i.snag.gy/vcKh90.jpg)

(cherry picked from commit f7125ab61aaa02fd4c7ab0062a2dc9a57726e2ec)
2024-06-09 16:04:57 +02:00
Kerwin Bryant
93d1fea67d
Optimize runner-tags layout to enhance visual experience (#31258)
![image](https://github.com/go-gitea/gitea/assets/3371163/b8199005-94f2-45be-8ca9-4fa1b3f221b2)

(cherry picked from commit 06ebae7472aef4380602d2ecd64fdc9dddcb6037)
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
silverwind
23a82bcd7a
Remove .segment from .project-column (#31204)
Using `.segment` on the project columns is a major abuse of that class,
so remove it and instead set the border-radius directly on it.

Fixes: https://github.com/go-gitea/gitea/issues/31129
(cherry picked from commit 4ca65fabdad75e39f9948b9a2a18e32edc98ec02)
2024-06-09 11:13:39 +02:00
silverwind
57647abc24
Fix overflow on push notification (#31179)
Fixes: https://github.com/go-gitea/gitea/issues/30063

<img width="1301" alt="Screenshot 2024-05-30 at 14 43 24"
src="https://github.com/go-gitea/gitea/assets/115237/00443af0-088d-49a5-be9e-8c9adcc2c01d">

(cherry picked from commit 1f8ac27b31b52791396f198b665a1d6bbdcfd8b3)
2024-06-09 11:13:39 +02:00
Thomas Desveaux
c6e04c3c9e
Fix NuGet Package API for $filter with Id equality (#31188)
Fixes issue when running `choco info pkgname` where `pkgname` is also a
substring of another package Id.

Relates to #31168

---

This might fix the issue linked, but I'd like to test it with more choco
commands before closing the issue in case I find other problems if
that's ok.

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit c888c933a930ee2ba4e7bb0bf6678aaf45a9778a)
2024-06-09 11:13:39 +02:00
silverwind
5416e4054a
Fix overflow on notifications (#31178)
Fixes https://github.com/go-gitea/gitea/issues/31170.

<img width="1312" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/627711ed-93ca-4be6-b958-10d673ae9517">

(cherry picked from commit 4f9b8b397c1acb6f6d26c55e224aafcb5474a85b)
2024-06-09 11:13:39 +02:00
Earl Warren
21b94765ce
test(services/mailer): Add option for mailer to override mail headers
Use MockVariableValue to avoid undesirable side effects between tests
modifying global variables. TestToMessage relies
on *setting.MailService being set, which will not be the case if run
individually with test-sqlite#TestToMessage and fail.
2024-06-09 11:13:39 +02:00
6543
1d4bff4f65
Add option for mailer to override mail headers (#27860)
Add option to override headers of mails, gitea send out

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit aace3bccc3290446637cac30b121b94b5d03075f)

Conflicts:
	docs/content/administration/config-cheat-sheet.en-us.md
	does not exist in Forgejo
	services/mailer/mailer_test.go
	trivial context conflict
2024-06-09 11:13:39 +02:00
silverwind
237d18974e
Move custom tw- helpers to tailwind plugin (#31184)
Move the previous custom `tw-` classes to be defined in a tailwind
plugin. I think it's cleaner that way and I also verified double-class
works as expected:

<img width="299" alt="Screenshot 2024-05-30 at 19 06 24"
src="https://github.com/go-gitea/gitea/assets/115237/003cbc76-2013-46a0-9e27-63023fa7c7a4">

(cherry picked from commit 8c68c5e436805848197d98313e9ee77e8d540a83)
2024-06-09 11:13:39 +02:00
silverwind
b62fa72ceb
Remove unnecessary inline style for tab-size (#31224)
Move the rule to the parent node. `tab-size` is inherited so will work
just as before.

(cherry picked from commit 0f0db6a14fd10a493ba73f211e2e627c3884d114)
2024-06-09 11:13:39 +02:00
Kemal Zebari
90753a2c11
Document possible action types for the user activity feed API (#31196)
Resolves #31131.

It uses the the go-swagger `enum` property to document the activity
action types.

(cherry picked from commit cb27c438a82fec9f2476f6058bc5dcda2617aab5)
2024-06-09 11:13:39 +02:00
yp05327
3befabead0
Remove sqlite-viewer and using database client (#31223)
sqlite-viewer can not edit sqlite.
database client can connect to almost all common databases, which is
very useful I think. Of cause, it can edit sqlite.

https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-database-client2

And for using sqlite, sqlite3 is required. So also added a new feature:
https://github.com/warrenbuckley/codespace-features
found from: https://containers.dev/features

(cherry picked from commit fc641b3a28300e13c822140556eca8d00f2b5196)

Conflicts:
	.devcontainer/devcontainer.json
	trivial context conflict because AZure blob support was not added
2024-06-09 11:13:39 +02:00
GiteaBot
12528ae72c
[skip ci] Updated licenses and gitignores
(cherry picked from commit c6854202be9eb8358f046871d4eb0e4fd74639ff)
2024-06-09 11:13:39 +02:00
silverwind
e754f24712
Fix overflow in issue card (#31203)
Before:

<img width="373" alt="Screenshot 2024-06-01 at 01 31 26"
src="https://github.com/go-gitea/gitea/assets/115237/82a210f2-c82e-4b7e-ac43-e70e46fa1186">

After:
<img width="376" alt="Screenshot 2024-06-01 at 01 31 32"
src="https://github.com/go-gitea/gitea/assets/115237/82d1b9f7-4fad-47bd-948a-04e1e7e006e6">

(cherry picked from commit 9b05bfb173795ba2a2267402d2669715cd4a64e4)
2024-06-09 11:13:39 +02:00
1927 changed files with 79042 additions and 35138 deletions

View file

@ -24,3 +24,6 @@ exclude_dir = [
]
exclude_regex = ["_test.go$", "_gen.go$"]
stop_on_error = true
[log]
main_only = true

View file

@ -30,7 +30,6 @@ code.gitea.io/gitea/models/asymkey
code.gitea.io/gitea/models/auth
GetSourceByName
GetWebAuthnCredentialByID
WebAuthnCredentials
code.gitea.io/gitea/models/db
@ -60,13 +59,6 @@ code.gitea.io/gitea/models/issues
IsErrIssueWasClosed
ChangeMilestoneStatus
code.gitea.io/gitea/models/migrations/base
removeAllWithRetry
newXORMEngine
deleteDB
PrepareTestEnv
MainTest
code.gitea.io/gitea/models/organization
GetTeamNamesByID
UpdateTeamUnits
@ -82,50 +74,14 @@ code.gitea.io/gitea/models/project
code.gitea.io/gitea/models/repo
DeleteAttachmentsByIssue
releaseSorter.Len
releaseSorter.Less
releaseSorter.Swap
SortReleases
FindReposMapByIDs
SearchOrderBy.String
IsErrTopicNotExist
ErrTopicNotExist.Error
ErrTopicNotExist.Unwrap
GetTopicByName
WatchRepoMode
code.gitea.io/gitea/models/unittest
CheckConsistencyFor
checkForConsistency
GetXORMEngine
OverrideFixtures
InitFixtures
LoadFixtures
Copy
CopyDir
NewMockWebServer
NormalizedFullPath
FixturesDir
fatalTestError
InitSettings
MainTest
CreateTestEngine
PrepareTestDatabase
PrepareTestEnv
Cond
OrderBy
LoadBeanIfExists
BeanExists
AssertExistsAndLoadBean
GetCount
AssertNotExistsBean
AssertExistsIf
AssertSuccessfulInsert
AssertCount
AssertInt64InRange
code.gitea.io/gitea/models/user
IsErrPrimaryEmailCannotDelete
ErrUserInactive.Error
ErrUserInactive.Unwrap
IsErrExternalLoginUserAlreadyExist
@ -137,6 +93,10 @@ code.gitea.io/gitea/models/user
GetUserEmailsByNames
GetUserNamesByIDs
code.gitea.io/gitea/modules/activitypub
NewContext
Context.APClientFactory
code.gitea.io/gitea/modules/assetfs
Bindata
@ -177,9 +137,6 @@ code.gitea.io/gitea/modules/git
AddChangesWithArgs
CommitChanges
CommitChangesWithArgs
IsErrExecTimeout
ErrExecTimeout.Error
ErrUnsupportedVersion.Error
SetUpdateHook
openRepositoryWithDefaultContext
IsTagExist
@ -203,6 +160,9 @@ code.gitea.io/gitea/modules/graceful
code.gitea.io/gitea/modules/hcaptcha
WithHTTP
code.gitea.io/gitea/modules/hostmatcher
HostMatchList.AppendPattern
code.gitea.io/gitea/modules/json
StdJSON.Marshal
StdJSON.Unmarshal
@ -211,7 +171,6 @@ code.gitea.io/gitea/modules/json
StdJSON.Indent
code.gitea.io/gitea/modules/markup
IsSameDomain
GetRendererByType
RenderString
IsMarkupFile
@ -275,22 +234,6 @@ code.gitea.io/gitea/modules/sync
StatusTable.Start
StatusTable.IsRunning
code.gitea.io/gitea/modules/testlogger
testLoggerWriterCloser.pushT
testLoggerWriterCloser.Log
testLoggerWriterCloser.recordError
testLoggerWriterCloser.printMsg
testLoggerWriterCloser.popT
testLoggerWriterCloser.Reset
PrintCurrentTest
Printf
NewTestLoggerWriter
TestLogEventWriter.Base
TestLogEventWriter.GetLevel
TestLogEventWriter.GetWriterName
TestLogEventWriter.GetWriterType
TestLogEventWriter.Run
code.gitea.io/gitea/modules/timeutil
GetExecutableModTime
MockSet
@ -304,6 +247,9 @@ code.gitea.io/gitea/modules/translation
MockLocale.TrSize
MockLocale.PrettyNumber
code.gitea.io/gitea/modules/util
OptionalArg
code.gitea.io/gitea/modules/util/filebuffer
CreateFromReader
@ -317,6 +263,11 @@ code.gitea.io/gitea/modules/web
code.gitea.io/gitea/modules/web/middleware
DeleteLocaleCookie
code.gitea.io/gitea/modules/zstd
NewWriter
Writer.Write
Writer.Close
code.gitea.io/gitea/routers/web
NotFound

View file

@ -1,16 +1,17 @@
{
"name": "Gitea DevContainer",
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
"image": "mcr.microsoft.com/devcontainers/go:1.23-bullseye",
"features": {
// installs nodejs into container
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
},
"ghcr.io/devcontainers/features/git-lfs:1.2.0": {},
"ghcr.io/devcontainers/features/git-lfs:1.2.3": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12"
}
},
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
},
"customizations": {
"vscode": {
@ -25,8 +26,9 @@
"Vue.volar",
"ms-azuretools.vscode-docker",
"vitest.explorer",
"qwtel.sqlite-viewer",
"GitHub.vscode-pull-request-github"
"cweijan.vscode-database-client2",
"GitHub.vscode-pull-request-github",
"Azurite.azurite"
]
}
},

1
.envrc.example Normal file
View file

@ -0,0 +1 @@
use flake

View file

@ -1,846 +0,0 @@
root: true
reportUnusedDisableDirectives: true
ignorePatterns:
- /web_src/js/vendor
- /web_src/fomantic
- /public/assets/js
parserOptions:
sourceType: module
ecmaVersion: latest
plugins:
- "@eslint-community/eslint-plugin-eslint-comments"
- "@stylistic/eslint-plugin-js"
- eslint-plugin-array-func
- eslint-plugin-github
- eslint-plugin-i
- eslint-plugin-jquery
- eslint-plugin-no-jquery
- eslint-plugin-no-use-extend-native
- eslint-plugin-regexp
- eslint-plugin-sonarjs
- eslint-plugin-unicorn
- eslint-plugin-vitest
- eslint-plugin-vitest-globals
- eslint-plugin-wc
env:
es2024: true
node: true
overrides:
- files: ["web_src/**/*"]
globals:
__webpack_public_path__: true
process: false # https://github.com/webpack/webpack/issues/15833
- files: ["web_src/**/*", "docs/**/*"]
env:
browser: true
node: false
- files: ["web_src/**/*worker.*"]
env:
worker: true
rules:
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
- files: ["*.config.*"]
rules:
i/no-unused-modules: [0]
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
env:
vitest-globals/env: true
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]
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
rules:
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
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]
"@stylistic/js/array-bracket-newline": [0]
"@stylistic/js/array-bracket-spacing": [2, never]
"@stylistic/js/array-element-newline": [0]
"@stylistic/js/arrow-parens": [2, always]
"@stylistic/js/arrow-spacing": [2, {before: true, after: true}]
"@stylistic/js/block-spacing": [0]
"@stylistic/js/brace-style": [2, 1tbs, {allowSingleLine: true}]
"@stylistic/js/comma-dangle": [2, always-multiline]
"@stylistic/js/comma-spacing": [2, {before: false, after: true}]
"@stylistic/js/comma-style": [2, last]
"@stylistic/js/computed-property-spacing": [2, never]
"@stylistic/js/dot-location": [2, property]
"@stylistic/js/eol-last": [2]
"@stylistic/js/function-call-spacing": [2, never]
"@stylistic/js/function-call-argument-newline": [0]
"@stylistic/js/function-paren-newline": [0]
"@stylistic/js/generator-star-spacing": [0]
"@stylistic/js/implicit-arrow-linebreak": [0]
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
"@stylistic/js/key-spacing": [2]
"@stylistic/js/keyword-spacing": [2]
"@stylistic/js/linebreak-style": [2, unix]
"@stylistic/js/lines-around-comment": [0]
"@stylistic/js/lines-between-class-members": [0]
"@stylistic/js/max-len": [0]
"@stylistic/js/max-statements-per-line": [0]
"@stylistic/js/multiline-ternary": [0]
"@stylistic/js/new-parens": [2]
"@stylistic/js/newline-per-chained-call": [0]
"@stylistic/js/no-confusing-arrow": [0]
"@stylistic/js/no-extra-parens": [0]
"@stylistic/js/no-extra-semi": [2]
"@stylistic/js/no-floating-decimal": [0]
"@stylistic/js/no-mixed-operators": [0]
"@stylistic/js/no-mixed-spaces-and-tabs": [2]
"@stylistic/js/no-multi-spaces": [2, {ignoreEOLComments: true, exceptions: {Property: true}}]
"@stylistic/js/no-multiple-empty-lines": [2, {max: 1, maxEOF: 0, maxBOF: 0}]
"@stylistic/js/no-tabs": [2]
"@stylistic/js/no-trailing-spaces": [2]
"@stylistic/js/no-whitespace-before-property": [2]
"@stylistic/js/nonblock-statement-body-position": [2]
"@stylistic/js/object-curly-newline": [0]
"@stylistic/js/object-curly-spacing": [2, never]
"@stylistic/js/object-property-newline": [0]
"@stylistic/js/one-var-declaration-per-line": [0]
"@stylistic/js/operator-linebreak": [2, after]
"@stylistic/js/padded-blocks": [2, never]
"@stylistic/js/padding-line-between-statements": [0]
"@stylistic/js/quote-props": [0]
"@stylistic/js/quotes": [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
"@stylistic/js/rest-spread-spacing": [2, never]
"@stylistic/js/semi": [2, always, {omitLastInOneLineBlock: true}]
"@stylistic/js/semi-spacing": [2, {before: false, after: true}]
"@stylistic/js/semi-style": [2, last]
"@stylistic/js/space-before-blocks": [2, always]
"@stylistic/js/space-before-function-paren": [2, {anonymous: ignore, named: never, asyncArrow: always}]
"@stylistic/js/space-in-parens": [2, never]
"@stylistic/js/space-infix-ops": [2]
"@stylistic/js/space-unary-ops": [2]
"@stylistic/js/spaced-comment": [2, always]
"@stylistic/js/switch-colon-spacing": [2]
"@stylistic/js/template-curly-spacing": [2, never]
"@stylistic/js/template-tag-spacing": [2, never]
"@stylistic/js/wrap-iife": [2, inside]
"@stylistic/js/wrap-regex": [0]
"@stylistic/js/yield-star-spacing": [2, after]
accessor-pairs: [2]
array-callback-return: [2, {checkForEach: true}]
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]
block-scoped-var: [2]
camelcase: [0]
capitalized-comments: [0]
class-methods-use-this: [0]
complexity: [0]
consistent-return: [0]
consistent-this: [0]
constructor-super: [2]
curly: [0]
default-case-last: [2]
default-case: [0]
default-param-last: [0]
dot-notation: [0]
eqeqeq: [2]
for-direction: [2]
func-name-matching: [2]
func-names: [0]
func-style: [0]
getter-return: [2]
github/a11y-aria-label-is-well-formatted: [0]
github/a11y-no-title-attribute: [0]
github/a11y-no-visually-hidden-interactive-element: [0]
github/a11y-role-supports-aria-props: [0]
github/a11y-svg-has-accessible-name: [0]
github/array-foreach: [0]
github/async-currenttarget: [2]
github/async-preventdefault: [2]
github/authenticity-token: [0]
github/get-attribute: [0]
github/js-class-name: [0]
github/no-blur: [0]
github/no-d-none: [0]
github/no-dataset: [2]
github/no-dynamic-script-tag: [2]
github/no-implicit-buggy-globals: [2]
github/no-inner-html: [0]
github/no-innerText: [2]
github/no-then: [2]
github/no-useless-passive: [2]
github/prefer-observers: [2]
github/require-passive-events: [2]
github/unescaped-html-literal: [0]
grouped-accessor-pairs: [2]
guard-for-in: [0]
id-blacklist: [0]
id-length: [0]
id-match: [0]
i/consistent-type-specifier-style: [0]
i/default: [0]
i/dynamic-import-chunkname: [0]
i/export: [2]
i/exports-last: [0]
i/extensions: [2, always, {ignorePackages: true}]
i/first: [2]
i/group-exports: [0]
i/max-dependencies: [0]
i/named: [2]
i/namespace: [0]
i/newline-after-import: [0]
i/no-absolute-path: [0]
i/no-amd: [2]
i/no-anonymous-default-export: [0]
i/no-commonjs: [2]
i/no-cycle: [2, {ignoreExternal: true, maxDepth: 1}]
i/no-default-export: [0]
i/no-deprecated: [0]
i/no-dynamic-require: [0]
i/no-empty-named-blocks: [2]
i/no-extraneous-dependencies: [2]
i/no-import-module-exports: [0]
i/no-internal-modules: [0]
i/no-mutable-exports: [0]
i/no-named-as-default-member: [0]
i/no-named-as-default: [2]
i/no-named-default: [0]
i/no-named-export: [0]
i/no-namespace: [0]
i/no-nodejs-modules: [0]
i/no-relative-packages: [0]
i/no-relative-parent-imports: [0]
i/no-restricted-paths: [0]
i/no-self-import: [2]
i/no-unassigned-import: [0]
i/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$", ^vitest/]}]
i/no-unused-modules: [2, {unusedExports: true}]
i/no-useless-path-segments: [2, {commonjs: true}]
i/no-webpack-loader-syntax: [2]
i/order: [0]
i/prefer-default-export: [0]
i/unambiguous: [0]
init-declarations: [0]
jquery/no-ajax-events: [2]
jquery/no-ajax: [2]
jquery/no-animate: [2]
jquery/no-attr: [2]
jquery/no-bind: [2]
jquery/no-class: [0]
jquery/no-clone: [2]
jquery/no-closest: [0]
jquery/no-css: [2]
jquery/no-data: [0]
jquery/no-deferred: [2]
jquery/no-delegate: [2]
jquery/no-each: [0]
jquery/no-extend: [2]
jquery/no-fade: [2]
jquery/no-filter: [0]
jquery/no-find: [0]
jquery/no-global-eval: [2]
jquery/no-grep: [2]
jquery/no-has: [2]
jquery/no-hide: [2]
jquery/no-html: [0]
jquery/no-in-array: [2]
jquery/no-is-array: [2]
jquery/no-is-function: [2]
jquery/no-is: [2]
jquery/no-load: [2]
jquery/no-map: [2]
jquery/no-merge: [2]
jquery/no-param: [2]
jquery/no-parent: [0]
jquery/no-parents: [2]
jquery/no-parse-html: [2]
jquery/no-prop: [2]
jquery/no-proxy: [2]
jquery/no-ready: [2]
jquery/no-serialize: [2]
jquery/no-show: [2]
jquery/no-size: [2]
jquery/no-sizzle: [0]
jquery/no-slide: [2]
jquery/no-submit: [2]
jquery/no-text: [0]
jquery/no-toggle: [2]
jquery/no-trigger: [0]
jquery/no-trim: [2]
jquery/no-val: [0]
jquery/no-when: [2]
jquery/no-wrap: [2]
line-comment-position: [0]
logical-assignment-operators: [0]
max-classes-per-file: [0]
max-depth: [0]
max-lines-per-function: [0]
max-lines: [0]
max-nested-callbacks: [0]
max-params: [0]
max-statements: [0]
multiline-comment-style: [2, separate-lines]
new-cap: [0]
no-alert: [0]
no-array-constructor: [2]
no-async-promise-executor: [0]
no-await-in-loop: [0]
no-bitwise: [0]
no-buffer-constructor: [0]
no-caller: [2]
no-case-declarations: [2]
no-class-assign: [2]
no-compare-neg-zero: [2]
no-cond-assign: [2, except-parens]
no-console: [1, {allow: [debug, info, warn, error]}]
no-const-assign: [2]
no-constant-binary-expression: [2]
no-constant-condition: [0]
no-constructor-return: [2]
no-continue: [0]
no-control-regex: [0]
no-debugger: [1]
no-delete-var: [2]
no-div-regex: [0]
no-dupe-args: [2]
no-dupe-class-members: [2]
no-dupe-else-if: [2]
no-dupe-keys: [2]
no-duplicate-case: [2]
no-duplicate-imports: [2]
no-else-return: [2]
no-empty-character-class: [2]
no-empty-function: [0]
no-empty-pattern: [2]
no-empty-static-block: [2]
no-empty: [2, {allowEmptyCatch: true}]
no-eq-null: [2]
no-eval: [2]
no-ex-assign: [2]
no-extend-native: [2]
no-extra-bind: [2]
no-extra-boolean-cast: [2]
no-extra-label: [0]
no-fallthrough: [2]
no-func-assign: [2]
no-global-assign: [2]
no-implicit-coercion: [2]
no-implicit-globals: [0]
no-implied-eval: [2]
no-import-assign: [2]
no-inline-comments: [0]
no-inner-declarations: [2]
no-invalid-regexp: [2]
no-invalid-this: [0]
no-irregular-whitespace: [2]
no-iterator: [2]
no-jquery/no-ajax-events: [2]
no-jquery/no-ajax: [2]
no-jquery/no-and-self: [2]
no-jquery/no-animate-toggle: [2]
no-jquery/no-animate: [2]
no-jquery/no-append-html: [2]
no-jquery/no-attr: [2]
no-jquery/no-bind: [2]
no-jquery/no-box-model: [2]
no-jquery/no-browser: [2]
no-jquery/no-camel-case: [2]
no-jquery/no-class-state: [0]
no-jquery/no-class: [0]
no-jquery/no-clone: [2]
no-jquery/no-closest: [0]
no-jquery/no-constructor-attributes: [2]
no-jquery/no-contains: [2]
no-jquery/no-context-prop: [2]
no-jquery/no-css: [2]
no-jquery/no-data: [0]
no-jquery/no-deferred: [2]
no-jquery/no-delegate: [2]
no-jquery/no-each-collection: [0]
no-jquery/no-each-util: [0]
no-jquery/no-each: [0]
no-jquery/no-error-shorthand: [2]
no-jquery/no-error: [2]
no-jquery/no-escape-selector: [2]
no-jquery/no-event-shorthand: [2]
no-jquery/no-extend: [2]
no-jquery/no-fade: [2]
no-jquery/no-filter: [0]
no-jquery/no-find-collection: [0]
no-jquery/no-find-util: [2]
no-jquery/no-find: [0]
no-jquery/no-fx-interval: [2]
no-jquery/no-global-eval: [2]
no-jquery/no-global-selector: [0]
no-jquery/no-grep: [2]
no-jquery/no-has: [2]
no-jquery/no-hold-ready: [2]
no-jquery/no-html: [0]
no-jquery/no-in-array: [2]
no-jquery/no-is-array: [2]
no-jquery/no-is-empty-object: [2]
no-jquery/no-is-function: [2]
no-jquery/no-is-numeric: [2]
no-jquery/no-is-plain-object: [2]
no-jquery/no-is-window: [2]
no-jquery/no-is: [2]
no-jquery/no-jquery-constructor: [0]
no-jquery/no-live: [2]
no-jquery/no-load-shorthand: [2]
no-jquery/no-load: [2]
no-jquery/no-map-collection: [0]
no-jquery/no-map-util: [2]
no-jquery/no-map: [2]
no-jquery/no-merge: [2]
no-jquery/no-node-name: [2]
no-jquery/no-noop: [2]
no-jquery/no-now: [2]
no-jquery/no-on-ready: [2]
no-jquery/no-other-methods: [0]
no-jquery/no-other-utils: [2]
no-jquery/no-param: [2]
no-jquery/no-parent: [0]
no-jquery/no-parents: [2]
no-jquery/no-parse-html-literal: [0]
no-jquery/no-parse-html: [2]
no-jquery/no-parse-json: [2]
no-jquery/no-parse-xml: [2]
no-jquery/no-prop: [2]
no-jquery/no-proxy: [2]
no-jquery/no-ready-shorthand: [2]
no-jquery/no-ready: [2]
no-jquery/no-selector-prop: [2]
no-jquery/no-serialize: [2]
no-jquery/no-size: [2]
no-jquery/no-sizzle: [0]
no-jquery/no-slide: [2]
no-jquery/no-sub: [2]
no-jquery/no-support: [2]
no-jquery/no-text: [0]
no-jquery/no-trigger: [0]
no-jquery/no-trim: [2]
no-jquery/no-type: [2]
no-jquery/no-unique: [2]
no-jquery/no-unload-shorthand: [2]
no-jquery/no-val: [0]
no-jquery/no-visibility: [2]
no-jquery/no-when: [2]
no-jquery/no-wrap: [2]
no-jquery/variable-pattern: [2]
no-label-var: [2]
no-labels: [0] # handled by no-restricted-syntax
no-lone-blocks: [2]
no-lonely-if: [0]
no-loop-func: [0]
no-loss-of-precision: [2]
no-magic-numbers: [0]
no-misleading-character-class: [2]
no-multi-assign: [0]
no-multi-str: [2]
no-negated-condition: [0]
no-nested-ternary: [0]
no-new-func: [2]
no-new-native-nonconstructor: [2]
no-new-object: [2]
no-new-symbol: [2]
no-new-wrappers: [2]
no-new: [0]
no-nonoctal-decimal-escape: [2]
no-obj-calls: [2]
no-octal-escape: [2]
no-octal: [2]
no-param-reassign: [0]
no-plusplus: [0]
no-promise-executor-return: [0]
no-proto: [2]
no-prototype-builtins: [2]
no-redeclare: [2]
no-regex-spaces: [2]
no-restricted-exports: [0]
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
no-restricted-imports: [0]
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
no-return-assign: [0]
no-script-url: [2]
no-self-assign: [2, {props: true}]
no-self-compare: [2]
no-sequences: [2]
no-setter-return: [2]
no-shadow-restricted-names: [2]
no-shadow: [0]
no-sparse-arrays: [2]
no-template-curly-in-string: [2]
no-ternary: [0]
no-this-before-super: [2]
no-throw-literal: [2]
no-undef-init: [2]
no-undef: [2, {typeof: true}]
no-undefined: [0]
no-underscore-dangle: [0]
no-unexpected-multiline: [2]
no-unmodified-loop-condition: [2]
no-unneeded-ternary: [2]
no-unreachable-loop: [2]
no-unreachable: [2]
no-unsafe-finally: [2]
no-unsafe-negation: [2]
no-unused-expressions: [2]
no-unused-labels: [2]
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]
no-useless-computed-key: [2]
no-useless-concat: [2]
no-useless-constructor: [2]
no-useless-escape: [2]
no-useless-rename: [2]
no-useless-return: [2]
no-var: [2]
no-void: [2]
no-warning-comments: [0]
no-with: [0] # handled by no-restricted-syntax
object-shorthand: [2, always]
one-var-declaration-per-line: [0]
one-var: [0]
operator-assignment: [2, always]
operator-linebreak: [2, after]
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
prefer-destructuring: [0]
prefer-exponentiation-operator: [2]
prefer-named-capture-group: [0]
prefer-numeric-literals: [2]
prefer-object-has-own: [2]
prefer-object-spread: [2]
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
prefer-regex-literals: [2]
prefer-rest-params: [2]
prefer-spread: [2]
prefer-template: [2]
radix: [2, as-needed]
regexp/confusing-quantifier: [2]
regexp/control-character-escape: [2]
regexp/hexadecimal-escape: [0]
regexp/letter-case: [0]
regexp/match-any: [2]
regexp/negation: [2]
regexp/no-contradiction-with-assertion: [0]
regexp/no-control-character: [0]
regexp/no-dupe-characters-character-class: [2]
regexp/no-dupe-disjunctions: [2]
regexp/no-empty-alternative: [2]
regexp/no-empty-capturing-group: [2]
regexp/no-empty-character-class: [0]
regexp/no-empty-group: [2]
regexp/no-empty-lookarounds-assertion: [2]
regexp/no-empty-string-literal: [2]
regexp/no-escape-backspace: [2]
regexp/no-extra-lookaround-assertions: [0]
regexp/no-invalid-regexp: [2]
regexp/no-invisible-character: [2]
regexp/no-lazy-ends: [2]
regexp/no-legacy-features: [2]
regexp/no-misleading-capturing-group: [0]
regexp/no-misleading-unicode-character: [0]
regexp/no-missing-g-flag: [2]
regexp/no-non-standard-flag: [2]
regexp/no-obscure-range: [2]
regexp/no-octal: [2]
regexp/no-optional-assertion: [2]
regexp/no-potentially-useless-backreference: [2]
regexp/no-standalone-backslash: [2]
regexp/no-super-linear-backtracking: [0]
regexp/no-super-linear-move: [0]
regexp/no-trivially-nested-assertion: [2]
regexp/no-trivially-nested-quantifier: [2]
regexp/no-unused-capturing-group: [0]
regexp/no-useless-assertions: [2]
regexp/no-useless-backreference: [2]
regexp/no-useless-character-class: [2]
regexp/no-useless-dollar-replacements: [2]
regexp/no-useless-escape: [2]
regexp/no-useless-flag: [2]
regexp/no-useless-lazy: [2]
regexp/no-useless-non-capturing-group: [2]
regexp/no-useless-quantifier: [2]
regexp/no-useless-range: [2]
regexp/no-useless-set-operand: [2]
regexp/no-useless-string-literal: [2]
regexp/no-useless-two-nums-quantifier: [2]
regexp/no-zero-quantifier: [2]
regexp/optimal-lookaround-quantifier: [2]
regexp/optimal-quantifier-concatenation: [0]
regexp/prefer-character-class: [0]
regexp/prefer-d: [0]
regexp/prefer-escape-replacement-dollar-char: [0]
regexp/prefer-lookaround: [0]
regexp/prefer-named-backreference: [0]
regexp/prefer-named-capture-group: [0]
regexp/prefer-named-replacement: [0]
regexp/prefer-plus-quantifier: [2]
regexp/prefer-predefined-assertion: [2]
regexp/prefer-quantifier: [0]
regexp/prefer-question-quantifier: [2]
regexp/prefer-range: [2]
regexp/prefer-regexp-exec: [2]
regexp/prefer-regexp-test: [2]
regexp/prefer-result-array-groups: [0]
regexp/prefer-set-operation: [2]
regexp/prefer-star-quantifier: [2]
regexp/prefer-unicode-codepoint-escapes: [2]
regexp/prefer-w: [0]
regexp/require-unicode-regexp: [0]
regexp/simplify-set-operations: [2]
regexp/sort-alternatives: [0]
regexp/sort-character-class-elements: [0]
regexp/sort-flags: [0]
regexp/strict: [2]
regexp/unicode-escape: [0]
regexp/use-ignore-case: [0]
require-atomic-updates: [0]
require-await: [0]
require-unicode-regexp: [0]
require-yield: [2]
sonarjs/cognitive-complexity: [0]
sonarjs/elseif-without-else: [0]
sonarjs/max-switch-cases: [0]
sonarjs/no-all-duplicated-branches: [2]
sonarjs/no-collapsible-if: [0]
sonarjs/no-collection-size-mischeck: [2]
sonarjs/no-duplicate-string: [0]
sonarjs/no-duplicated-branches: [0]
sonarjs/no-element-overwrite: [2]
sonarjs/no-empty-collection: [2]
sonarjs/no-extra-arguments: [2]
sonarjs/no-gratuitous-expressions: [2]
sonarjs/no-identical-conditions: [2]
sonarjs/no-identical-expressions: [2]
sonarjs/no-identical-functions: [2, 5]
sonarjs/no-ignored-return: [2]
sonarjs/no-inverted-boolean-check: [2]
sonarjs/no-nested-switch: [0]
sonarjs/no-nested-template-literals: [0]
sonarjs/no-one-iteration-loop: [2]
sonarjs/no-redundant-boolean: [2]
sonarjs/no-redundant-jump: [2]
sonarjs/no-same-line-conditional: [2]
sonarjs/no-small-switch: [0]
sonarjs/no-unused-collection: [2]
sonarjs/no-use-of-empty-return-value: [2]
sonarjs/no-useless-catch: [2]
sonarjs/non-existent-operator: [2]
sonarjs/prefer-immediate-return: [0]
sonarjs/prefer-object-literal: [0]
sonarjs/prefer-single-boolean-return: [0]
sonarjs/prefer-while: [2]
sort-imports: [0]
sort-keys: [0]
sort-vars: [0]
strict: [0]
symbol-description: [2]
unicode-bom: [2, never]
unicorn/better-regex: [0]
unicorn/catch-error-name: [0]
unicorn/consistent-destructuring: [2]
unicorn/consistent-function-scoping: [2]
unicorn/custom-error-definition: [0]
unicorn/empty-brace-spaces: [2]
unicorn/error-message: [0]
unicorn/escape-case: [0]
unicorn/expiring-todo-comments: [0]
unicorn/explicit-length-check: [0]
unicorn/filename-case: [0]
unicorn/import-index: [0]
unicorn/import-style: [0]
unicorn/new-for-builtins: [2]
unicorn/no-abusive-eslint-disable: [0]
unicorn/no-anonymous-default-export: [0]
unicorn/no-array-callback-reference: [0]
unicorn/no-array-for-each: [2]
unicorn/no-array-method-this-argument: [2]
unicorn/no-array-push-push: [2]
unicorn/no-array-reduce: [2]
unicorn/no-await-expression-member: [0]
unicorn/no-await-in-promise-methods: [2]
unicorn/no-console-spaces: [0]
unicorn/no-document-cookie: [2]
unicorn/no-empty-file: [2]
unicorn/no-for-loop: [0]
unicorn/no-hex-escape: [0]
unicorn/no-instanceof-array: [0]
unicorn/no-invalid-remove-event-listener: [2]
unicorn/no-keyword-prefix: [0]
unicorn/no-lonely-if: [2]
unicorn/no-negated-condition: [0]
unicorn/no-nested-ternary: [0]
unicorn/no-new-array: [0]
unicorn/no-new-buffer: [0]
unicorn/no-null: [0]
unicorn/no-object-as-default-parameter: [0]
unicorn/no-process-exit: [0]
unicorn/no-single-promise-in-promise-methods: [2]
unicorn/no-static-only-class: [2]
unicorn/no-thenable: [2]
unicorn/no-this-assignment: [2]
unicorn/no-typeof-undefined: [2]
unicorn/no-unnecessary-await: [2]
unicorn/no-unnecessary-polyfills: [2]
unicorn/no-unreadable-array-destructuring: [0]
unicorn/no-unreadable-iife: [2]
unicorn/no-unused-properties: [2]
unicorn/no-useless-fallback-in-spread: [2]
unicorn/no-useless-length-check: [2]
unicorn/no-useless-promise-resolve-reject: [2]
unicorn/no-useless-spread: [2]
unicorn/no-useless-switch-case: [2]
unicorn/no-useless-undefined: [0]
unicorn/no-zero-fractions: [2]
unicorn/number-literal-case: [0]
unicorn/numeric-separators-style: [0]
unicorn/prefer-add-event-listener: [2]
unicorn/prefer-array-find: [2]
unicorn/prefer-array-flat-map: [2]
unicorn/prefer-array-flat: [2]
unicorn/prefer-array-index-of: [2]
unicorn/prefer-array-some: [2]
unicorn/prefer-at: [0]
unicorn/prefer-blob-reading-methods: [2]
unicorn/prefer-code-point: [0]
unicorn/prefer-date-now: [2]
unicorn/prefer-default-parameters: [0]
unicorn/prefer-dom-node-append: [2]
unicorn/prefer-dom-node-dataset: [0]
unicorn/prefer-dom-node-remove: [2]
unicorn/prefer-dom-node-text-content: [2]
unicorn/prefer-event-target: [2]
unicorn/prefer-export-from: [0]
unicorn/prefer-includes: [2]
unicorn/prefer-json-parse-buffer: [0]
unicorn/prefer-keyboard-event-key: [2]
unicorn/prefer-logical-operator-over-ternary: [2]
unicorn/prefer-math-trunc: [2]
unicorn/prefer-modern-dom-apis: [0]
unicorn/prefer-modern-math-apis: [2]
unicorn/prefer-module: [2]
unicorn/prefer-native-coercion-functions: [2]
unicorn/prefer-negative-index: [2]
unicorn/prefer-node-protocol: [2]
unicorn/prefer-number-properties: [0]
unicorn/prefer-object-from-entries: [2]
unicorn/prefer-object-has-own: [0]
unicorn/prefer-optional-catch-binding: [2]
unicorn/prefer-prototype-methods: [0]
unicorn/prefer-query-selector: [0]
unicorn/prefer-reflect-apply: [0]
unicorn/prefer-regexp-test: [2]
unicorn/prefer-set-has: [0]
unicorn/prefer-set-size: [2]
unicorn/prefer-spread: [0]
unicorn/prefer-string-replace-all: [0]
unicorn/prefer-string-slice: [0]
unicorn/prefer-string-starts-ends-with: [2]
unicorn/prefer-string-trim-start-end: [2]
unicorn/prefer-switch: [0]
unicorn/prefer-ternary: [0]
unicorn/prefer-text-content: [2]
unicorn/prefer-top-level-await: [0]
unicorn/prefer-type-error: [0]
unicorn/prevent-abbreviations: [0]
unicorn/relative-url-style: [2]
unicorn/require-array-join-separator: [2]
unicorn/require-number-to-fixed-digits-argument: [2]
unicorn/require-post-message-target-origin: [0]
unicorn/string-content: [0]
unicorn/switch-case-braces: [0]
unicorn/template-indent: [2]
unicorn/text-encoding-identifier-case: [0]
unicorn/throw-new-error: [2]
use-isnan: [2]
valid-typeof: [2, {requireStringLiterals: true}]
vars-on-top: [0]
wc/attach-shadow-constructor: [2]
wc/define-tag-after-class-definition: [0]
wc/expose-class-on-global: [0]
wc/file-name-matches-element: [2]
wc/guard-define-call: [0]
wc/guard-super-call: [2]
wc/max-elements-per-file: [0]
wc/no-child-traversal-in-attributechangedcallback: [2]
wc/no-child-traversal-in-connectedcallback: [2]
wc/no-closed-shadow-root: [2]
wc/no-constructor-attributes: [2]
wc/no-constructor-params: [2]
wc/no-constructor: [2]
wc/no-customized-built-in-elements: [2]
wc/no-exports-with-element: [0]
wc/no-invalid-element-name: [2]
wc/no-invalid-extends: [2]
wc/no-method-prefixed-with-on: [2]
wc/no-self-class: [2]
wc/no-typos: [2]
wc/require-listener-teardown: [2]
wc/tag-name-matches-class: [2]
yoda: [2, never]

View file

@ -13,21 +13,22 @@ minor_version=$(make show-version-minor)
cd $end_to_end
if ! test -f forgejo/sources/$minor_version ; then
echo "FAIL: forgejo/sources/$minor_version does not exist in the end-to-end repository"
false
if ! test -f forgejo/sources/$minor_version; then
echo "FAIL: forgejo/sources/$minor_version does not exist in the end-to-end repository"
false
fi
date > last-upgrade
echo -n $minor_version >forgejo/build-from-sources
date >last-upgrade
if test -f "$forgejo_pr_or_ref" ; then
forgejo_pr=$forgejo_pr_or_ref
head_url=$(jq --raw-output .head.repo.html_url < $forgejo_pr)
test "$head_url" != null
branch=$(jq --raw-output .head.ref < $forgejo_pr)
test "$branch" != null
echo $head_url $branch $full_version > forgejo/sources/$minor_version
if test -f "$forgejo_pr_or_ref"; then
forgejo_pr=$forgejo_pr_or_ref
head_url=$(jq --raw-output .head.repo.html_url <$forgejo_pr)
test "$head_url" != null
branch=$(jq --raw-output .head.ref <$forgejo_pr)
test "$branch" != null
echo $head_url $branch $full_version >forgejo/sources/$minor_version
else
forgejo_ref=$forgejo_pr_or_ref
echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY ${forgejo_ref#refs/heads/} $full_version > forgejo/sources/$minor_version
forgejo_ref=$forgejo_pr_or_ref
echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY ${forgejo_ref#refs/heads/} $full_version >forgejo/sources/$minor_version
fi

View file

@ -8,15 +8,15 @@ forgejo=$3
forgejo_ref=$4
cd $end_to_end
date > last-upgrade
date >last-upgrade
organizations=lib/ORGANIZATIONS
if ! test -f $organizations ; then
echo "$organizations file not found"
false
if ! test -f $organizations; then
echo "$organizations file not found"
false
fi
#
# do not include forgejo-experimental so that 7.0-test is found
# in forgejo-integration where it was just built instead of
# forgejo-experimental which was published by the previous build
# Inverse the order of lookup because the goal in the release built
# pipeline is to test the latest build, if available, instead of the
# stable version by the same version.
#
echo forgejo forgejo-integration > $organizations
echo forgejo-integration forgejo-experimental forgejo >$organizations

View file

@ -1,6 +1,6 @@
name: 🦋 Bug Report (web interface / frontend)
description: Something doesn't look quite as it should? Report it here!
title: "[BUG] "
title: "bug: "
labels: ["bug/new-report", "forgejo/ui"]
body:
- type: markdown
@ -13,16 +13,29 @@ body:
- Please speak English, as this is the language all maintainers can speak and write.
- Be as clear and concise as possible. A very verbose report is harder to interpret in a concrete way.
- Be civil, and follow the [Forgejo Code of Conduct](https://codeberg.org/forgejo/code-of-conduct).
- Please make sure you are using the latest release of Forgejo and take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137).
- Please give all relevant information below for bug reports, as incomplete details may result in the issue not being considered.
- Take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137).
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on the Forgejo test instance?
description: |
Please try reproducing your issue at https://dev.next.forgejo.org.
It is running the latest development branch and will confirm the problem is not already fixed.
If you can reproduce it, provide a URL in the description.
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below).
If you think this is a JavaScript error, show us the JavaScript console.
If the error appears to relate to Forgejo the server, please also give us `DEBUG` level logs. (See https://forgejo.org/docs/latest/admin/logging-documentation/)
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above).
If you think this is a JavaScript error, include a copy of the JavaScript console.
validations:
required: true
- type: textarea
id: screenshots
attributes:
@ -35,20 +48,6 @@ body:
attributes:
label: Forgejo Version
description: Forgejo version (or commit reference) your instance is running
validations:
required: true
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on Forgejo Next?
description: |
Please try reproducing your issue at [Forgejo Next](https://next.forgejo.org).
If you can reproduce it, please provide a URL in the Description field.
options:
- "Yes"
- "No"
validations:
required: true
- type: input
id: browser-ver
attributes:
@ -56,8 +55,3 @@ body:
description: The browser and version that you are using to access Forgejo
validations:
required: true
- type: input
id: os-ver
attributes:
label: Operating System
description: The operating system you are using to access Forgejo

View file

@ -1,6 +1,6 @@
name: 🐛 Bug Report (server / backend)
description: Found something you weren't expecting? Report it here!
title: "[BUG] "
title: "bug: "
labels: bug/new-report
body:
- type: markdown
@ -13,14 +13,26 @@ body:
- Please speak English, as this is the language all maintainers can speak and write.
- Be as clear and concise as possible. A very verbose report is harder to interpret in a concrete way.
- Be civil, and follow the [Forgejo Code of Conduct](https://codeberg.org/forgejo/code-of-conduct).
- Please make sure you are using the latest release of Forgejo and take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137).
- Please give all relevant information below for bug reports, as incomplete details may result in the issue not being considered.
- Take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137).
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on the Forgejo test instance?
description: |
Please try reproducing your issue at https://dev.next.forgejo.org.
It is running the latest development branch and will confirm the problem is not already fixed.
If you can reproduce it, provide a URL in the description.
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below).
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above).
validations:
required: true
- type: input
@ -28,18 +40,14 @@ body:
attributes:
label: Forgejo Version
description: Forgejo version (or commit reference) of your instance
validations:
required: true
- type: dropdown
id: can-reproduce
- type: textarea
id: run-info
attributes:
label: Can you reproduce the bug on Forgejo Next?
label: How are you running Forgejo?
description: |
Please try reproducing your issue at [Forgejo Next](https://next.forgejo.org).
If you can reproduce it, please provide a URL in the Description field.
options:
- "Yes"
- "No"
Please include information on whether you built Forgejo yourself, used one of our downloads, or are using some other package.
Please also tell us how you are running Forgejo, e.g. if it is being run from a container, a command-line, systemd etc.
If you are using a package or systemd tell us what distribution you are using.
validations:
required: true
- type: textarea
@ -53,31 +61,6 @@ body:
Please copy and paste your logs here, with any sensitive information (e.g. API keys) removed/hidden.
You can wrap your logs in `<details>...</details>` tags so it doesn't take up too much space in the issue.
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If this issue involves the Web Interface, please provide one or more screenshots
- type: input
id: git-ver
attributes:
label: Git Version
description: The version of git running on the server
- type: input
id: os-ver
attributes:
label: Operating System
description: The operating system you are using to run Forgejo
- type: textarea
id: run-info
attributes:
label: How are you running Forgejo?
description: |
Please include information on whether you built Forgejo yourself, used one of our downloads, or are using some other package.
Please also tell us how you are running Forgejo, e.g. if it is being run from docker, a command-line, systemd etc.
If you are using a package or systemd tell us what distribution you are using.
validations:
required: true
- type: dropdown
id: database
attributes:

View file

@ -1,7 +1,7 @@
contact_links:
- name: 🔓 Security Reports
url: mailto:security@forgejo.org
about: "Please email <security@forgejo.org> (GPG: `A4676E79`) instead of opening a public issue."
about: "Please email <security@forgejo.org> (See https://forgejo.org/.well-known/security.txt)."
- name: 💬 Matrix Chat Room
url: https://matrix.to/#/#forgejo-chat:matrix.org
about: Please ask questions and discuss configuration or deployment problems here.

View file

@ -1,6 +1,6 @@
name: 💡 Feature Request
description: Got an idea for a feature that Forgejo doesn't have yet? Suggest it here!
title: "[FEAT] "
title: "feat: "
labels: ["enhancement/feature"]
body:
- type: markdown

View file

@ -0,0 +1,33 @@
---
name: "Pull Request Template"
about: "Template for all Pull Requests"
labels:
- test/needed
---
## Checklist
The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).
### Tests
- I added test coverage for Go changes...
- [ ] in their respective `*_test.go` for unit tests.
- [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
- [ ] in `web_src/js/*.test.js` if it can be unit tested.
- [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).
### Documentation
- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.
### Release notes
- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

View file

@ -0,0 +1,3 @@
module code.gitea.io/gitea
go 1.23.3

View file

@ -0,0 +1,29 @@
inputs:
packages:
description: 'Packages to install'
required: true
release:
description: 'Release to install from'
default: testing
runs:
using: "composite"
steps:
- name: setup apt package source
run: |
export DEBIAN_FRONTEND=noninteractive
echo "deb http://deb.debian.org/debian/ ${RELEASE} main" > "/etc/apt/sources.list.d/${RELEASE}.list"
env:
RELEASE: ${{inputs.release}}
- name: install packages
run: |
apt-get update -qq
apt-get -q install -qq -y ${PACKAGES}
env:
PACKAGES: ${{inputs.packages}}
- name: remove temporary package list to prevent using it in other steps
run: |
rm "/etc/apt/sources.list.d/${RELEASE}.list"
apt-get update -qq
env:
RELEASE: ${{inputs.release}}

View file

@ -0,0 +1,15 @@
runs:
using: "composite"
steps:
- run: |
su forgejo -c 'make deps-backend'
- uses: actions/cache@v4
id: cache-backend
with:
path: ${{github.workspace}}/gitea
key: backend-build-${{ github.sha }}
- if: steps.cache-backend.outputs.cache-hit != 'true'
run: |
su forgejo -c 'make backend'
env:
TAGS: bindata

View file

@ -0,0 +1,12 @@
runs:
using: "composite"
steps:
- name: setup user and permissions
run: |
git config --add safe.directory '*'
# ignore if the user already exists (like with the playwright image)
adduser --quiet --comment forgejo --disabled-password forgejo || true
chown -R forgejo:forgejo .
- uses: https://codeberg.org/fnetx/setup-cache-go@b2214eaf6fb44c7e8512c0f462a2c3ec31f86a73
with:
username: forgejo

View file

@ -38,14 +38,14 @@ jobs:
)
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- name: event info
run: |
cat <<'EOF'
${{ toJSON(github) }}
EOF
- uses: https://code.forgejo.org/actions/git-backporting@v4.8.0
- uses: https://code.forgejo.org/actions/git-backporting@v4.8.4
with:
target-branch-pattern: "^backport/(?<target>(v.*))$"
strategy: ort
@ -55,3 +55,5 @@ jobs:
pull-request: ${{ github.event.pull_request.url }}
auto-no-squash: true
enable-err-notification: true
git-user: forgejo-backport-action
git-email: forgejo-backport-action@noreply.codeberg.org

View file

@ -25,7 +25,7 @@ jobs:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: forgejo
uses: https://code.forgejo.org/actions/setup-forgejo@v1

View file

@ -1,5 +1,5 @@
#
# See also https://forgejo.org/docs/next/developer/RELEASE/#release-process
# See also https://forgejo.org/docs/next/contributor/release/#stable-release-process
#
# https://codeberg.org/forgejo-integration/forgejo
#
@ -27,7 +27,7 @@ jobs:
# root is used for testing, allow it
if: vars.ROLE == 'forgejo-integration' || github.repository_owner == 'root'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
@ -37,14 +37,13 @@ jobs:
repository="${{ github.repository }}"
echo "value=${repository##*/}" >> "$GITHUB_OUTPUT"
- uses: https://code.forgejo.org/actions/setup-node@v3
- uses: https://code.forgejo.org/actions/setup-node@v4
with:
node-version: 20
- uses: https://code.forgejo.org/actions/setup-go@v4
- uses: https://code.forgejo.org/actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- name: version from ref
id: release-info
@ -88,7 +87,7 @@ jobs:
- name: cache node_modules
id: node
uses: https://code.forgejo.org/actions/cache@v3
uses: https://code.forgejo.org/actions/cache@v4
with:
path: |
node_modules
@ -195,7 +194,7 @@ jobs:
verbose: ${{ vars.VERBOSE || secrets.VERBOSE || 'false' }}
- name: end-to-end tests
if: ${{ secrets.TOKEN != '' && vars.ROLE == 'forgejo-integration' }}
if: ${{ secrets.TOKEN != '' && vars.ROLE == 'forgejo-integration' && vars.SKIP_END_TO_END != 'true' }}
uses: https://code.forgejo.org/actions/cascading-pr@v2
with:
origin-url: ${{ env.GITHUB_SERVER_URL }}

View file

@ -12,8 +12,10 @@
# whatever is in the default branch instead
#
# - after it is merged, double check it works by setting the
# run-end-to-end-test on a pull request (any pull request will doe
# run-end-to-end-test on a pull request (any pull request will do)
#
name: end-to-end
on:
push:
branches:
@ -27,16 +29,15 @@ jobs:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
container:
image: node:20-bookworm
image: code.forgejo.org/oci/node:20-bookworm
steps:
- name: event
run: |
echo github.event.pull_request.head.repo.fork = ${{ github.event.pull_request.head.repo.fork }}
echo github.event.action = ${{ github.event.action }}
echo github.event.pull_request.merged = ${{ github.event.pull_request.merged }}
echo github.event.pull_request.labels.*.name
echo github.event.label
cat <<'EOF'
${{ toJSON(github.event.pull_request.labels.*.name) }}
${{ toJSON(github.event.label) }}
EOF
cat <<'EOF'
${{ toJSON(github.event) }}
@ -47,12 +48,12 @@ jobs:
!startsWith(vars.ROLE, 'forgejo-') && (
github.event_name == 'push' ||
(
github.event.action == 'label_updated' && contains(github.event.pull_request.labels.*.name, 'run-end-to-end-tests')
github.event.action == 'label_updated' && github.event.label.name == 'run-end-to-end-tests'
)
)
runs-on: docker
container:
image: node:20-bookworm
image: code.forgejo.org/oci/node:20-bookworm
steps:
- uses: actions/checkout@v4
with:

View file

@ -1,37 +0,0 @@
name: e2e
on:
pull_request:
paths:
- Makefile
- .forgejo/workflows/e2e.yml
- tests/e2e/**
jobs:
test-e2e:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
- run: |
apt-get -qq update
apt-get -qq install -q sudo
sed -i -e 's/%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
adduser forgejo sudo
chown -R forgejo:forgejo .
- run: |
su forgejo -c 'make deps-frontend frontend deps-backend'
- run: |
su forgejo -c 'make generate test-e2e-sqlite'
timeout-minutes: 40
env:
DEPS_PLAYWRIGHT: 1
USE_REPO_TEST_DIR: 1

View file

@ -0,0 +1,39 @@
on:
workflow_dispatch:
schedule:
- cron: '@daily'
jobs:
integration-cleanup:
if: vars.ROLE == 'forgejo-integration'
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- name: apt install curl jq
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -qq -y curl jq
- name: remove old releases and tags
run: |
url=https://any:${{ secrets.TOKEN }}@codeberg.org
curl -sS "$url/api/v1/repos/forgejo-integration/forgejo/releases" | jq -r '.[] | "\(.published_at) \(.tag_name)"' | sort | while read published_at version ; do
if echo $version | grep -e '-test$' >/dev/null; then
old="18 months"
else
old="1 day"
fi
too_old=$(env -i date --date="- $old" +%F)
too_old_seconds=$(env -i date --date="- $old" +%s)
published_at_seconds=$(env -i date --date="$published_at" +%s)
if test $published_at_seconds -le $too_old_seconds ; then
echo "$version was published more than $old ago ($published_at <= $too_old) and will be removed"
curl -X DELETE -sS "$url/api/v1/repos/forgejo-integration/forgejo/releases/tags/$version"
else
echo "$version was published less than $old ago"
fi
done

View file

@ -0,0 +1,44 @@
# Copyright 2024 The Forgejo Authors
# SPDX-License-Identifier: MIT
name: requirements
on:
pull_request:
types:
- labeled
- edited
- opened
- synchronize
jobs:
merge-conditions:
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- name: Debug output
run: |
cat <<'EOF'
${{ toJSON(github.event) }}
EOF
- name: Missing test label
if: >
!(
contains(toJSON(github.event.pull_request.labels), 'test/present')
|| contains(toJSON(github.event.pull_request.labels), 'test/not-needed')
|| contains(toJSON(github.event.pull_request.labels), 'test/manual')
)
run: |
echo "Test label must be set to either 'present', 'not-needed' or 'manual'."
exit 1
- name: Missing manual test instructions
if: >
(
contains(toJSON(github.event.pull_request.labels), 'test/manual')
&& !contains(toJSON(github.event.pull_request.body), '# Test')
)
run: |
echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:"
echo "# Testing"
exit 1

View file

@ -1,6 +1,8 @@
name: mirror
on:
workflow_dispatch:
schedule:
- cron: '@daily'
@ -9,7 +11,7 @@ jobs:
if: ${{ secrets.MIRROR_TOKEN != '' }}
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- name: git push {v*/,}forgejo
run: |

View file

@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
#
# See also https://forgejo.org/docs/next/developer/RELEASE/#release-process
# See also https://forgejo.org/docs/next/contributor/release/#stable-release-process
#
# https://codeberg.org/forgejo-experimental/forgejo
#
@ -39,7 +39,7 @@ jobs:
runs-on: self-hosted
if: vars.DOER != '' && vars.FORGEJO != '' && vars.TO_OWNER != '' && vars.FROM_OWNER != '' && secrets.TOKEN != ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: copy & sign
uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v5
@ -59,13 +59,19 @@ jobs:
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
verbose: ${{ vars.VERBOSE }}
- name: upgrade v*.next.forgejo.org
uses: https://code.forgejo.org/infrastructure/next-digest@v1.1.0
with:
url: https://placeholder:${{ secrets.TOKEN_NEXT_DIGEST }}@code.forgejo.org/infrastructure/next-digest
ref_name: '${{ github.ref_name }}'
image: 'codeberg.org/forgejo-experimental/forgejo'
tag_suffix: '-rootless'
- name: set up go for the DNS update below
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
uses: https://code.forgejo.org/actions/setup-go@v4
uses: https://code.forgejo.org/actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- name: update the _release.experimental DNS record
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
uses: https://code.forgejo.org/actions/ovh-dns-update@v1

View file

@ -0,0 +1,33 @@
on:
workflow_dispatch:
schedule:
- cron: '@daily'
jobs:
release-notes:
if: ${{ !startsWith(vars.ROLE, 'forgejo-')
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
- name: apt install jq
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq jq
- name: update open milestones
run: |
set -x
curl -sS $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/milestones?state=open | jq -r '.[] | .title' | while read forgejo version ; do
milestone="$forgejo $version"
go run code.forgejo.org/forgejo/release-notes-assistant@v1.1.1 --config .release-notes-assistant.yaml --storage milestone --storage-location "$milestone" --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} release $version
done

View file

@ -0,0 +1,39 @@
on:
pull_request_target:
types:
- edited
- synchronize
- labeled
jobs:
release-notes:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') && contains(github.event.pull_request.labels.*.name, 'worth a release-note') }}
runs-on: docker
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- name: event
run: |
cat <<'EOF'
${{ toJSON(github.event.pull_request.labels.*.name) }}
EOF
cat <<'EOF'
${{ toJSON(github.event) }}
EOF
- uses: https://code.forgejo.org/actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
- name: apt install jq
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq jq
- name: release-notes-assistant preview
run: |
go run code.forgejo.org/forgejo/release-notes-assistant@v1.1.1 --config .release-notes-assistant.yaml --storage pr --storage-location ${{ github.event.pull_request.number }} --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ github.event.pull_request.number }}

View file

@ -8,9 +8,12 @@ name: renovate
on:
push:
branches:
- 'renovate/**' # self-test updates
- renovate/** # self-test updates
paths:
- .forgejo/workflows/renovate.yml
schedule:
- cron: '0 0/2 * * *'
workflow_dispatch:
env:
RENOVATE_DRY_RUN: ${{ (github.event_name != 'schedule' && github.ref_name != github.event.repository.default_branch) && 'full' || '' }}
@ -20,13 +23,13 @@ jobs:
renovate:
if: ${{ secrets.RENOVATE_TOKEN != '' }}
runs-on: docker
runs-on: docker-runner-one
container:
image: ghcr.io/visualon/renovate:37.392.0
image: code.forgejo.org/forgejo-contrib/renovate:39.9.1
steps:
- name: Load renovate repo cache
uses: https://code.forgejo.org/actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: https://code.forgejo.org/actions/cache/restore@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: |
.tmp/cache/renovate/repository
@ -59,7 +62,7 @@ jobs:
- name: Save renovate repo cache
if: always() && env.RENOVATE_DRY_RUN != 'full'
uses: https://code.forgejo.org/actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: https://code.forgejo.org/actions/cache/save@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: |
.tmp/cache/renovate/repository

View file

@ -6,184 +6,221 @@ on:
branches:
- 'forgejo*'
- 'v*/forgejo*'
workflow_dispatch:
jobs:
backend-checks:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- name: event info
run: |
cat <<'EOF'
${{ toJSON(github) }}
EOF
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
- run: make deps-backend deps-tools
- run: make --always-make -j$(nproc) lint-backend checks-backend # ensure the "go-licenses" make target runs
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- run: su forgejo -c 'make deps-backend deps-tools'
- run: su forgejo -c 'make --always-make -j$(nproc) lint-backend tidy-check swagger-check fmt-check swagger-validate' # ensure the "go-licenses" make target runs
- uses: ./.forgejo/workflows-composite/build-backend
frontend-checks:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/checkout@v4
- run: make deps-frontend
- run: make lint-frontend
- run: make checks-frontend
- run: make test-frontend
- run: make test-frontend-coverage
- run: make frontend
- name: Install zstd for cache saving
# works around https://github.com/actions/cache/issues/1169, because the
# consuming job has zstd and doesn't restore the cache otherwise
run: |
apt-get update -qq
apt-get -q install -qq -y zstd
- name: "Cache frontend build for playwright testing"
uses: actions/cache/save@v4
with:
path: ${{github.workspace}}/public/assets
key: frontend-build-${{ github.sha }}
test-unit:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs: [backend-checks, frontend-checks]
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
services:
elasticsearch:
image: elasticsearch:7.17.21
image: docker.io/bitnami/elasticsearch:7
env:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
minio:
image: bitnami/minio:2024.3.30
image: docker.io/bitnami/minio:2024.8.17
options: >-
--hostname gitea.minio
env:
MINIO_DOMAIN: minio
MINIO_ROOT_USER: 123456
MINIO_ROOT_PASSWORD: 12345678
redis:
image: redis:7.2
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
- run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo .
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- name: install git >= 2.42
uses: ./.forgejo/workflows-composite/apt-install-from
with:
packages: git
- name: test release-notes-assistant.sh
run: |
export DEBIAN_FRONTEND=noninteractive
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
apt-get update -qq
apt-get -q install -qq -y git
rm /etc/apt/sources.list.d/testing.list
apt-get update -qq
- run: |
su forgejo -c 'make deps-backend'
- run: |
su forgejo -c 'make backend'
env:
TAGS: bindata
apt-get -q install -qq -y jq
./release-notes-assistant.sh test_main
- uses: ./.forgejo/workflows-composite/build-backend
- run: |
su forgejo -c 'make test-backend test-check'
timeout-minutes: 50
timeout-minutes: 120
env:
RACE_ENABLED: 'true'
TAGS: bindata
TEST_REDIS_SERVER: redis:6379
TEST_ELASTICSEARCH_URL: http://elasticsearch:9200
test-e2e:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs: [backend-checks, frontend-checks]
container:
image: 'code.forgejo.org/oci/playwright:latest'
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
with:
fetch-depth: 20
- uses: ./.forgejo/workflows-composite/setup-env
- name: "Restore frontend build"
uses: actions/cache/restore@v4
id: cache-frontend
with:
path: ${{github.workspace}}/public/assets
key: frontend-build-${{ github.sha }}
- name: "Build frontend (if not cached)"
if: steps.cache-frontend.outputs.cache-hit != 'true'
run: |
su forgejo -c 'make deps-frontend frontend'
- uses: ./.forgejo/workflows-composite/build-backend
- name: Get changed files
id: changed-files
uses: https://code.forgejo.org/tj-actions/changed-files@v45
with:
separator: '\n'
- run: |
su forgejo -c 'make generate test-e2e-sqlite'
timeout-minutes: 120
env:
USE_REPO_TEST_DIR: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
CHANGED_FILES: ${{steps.changed-files.outputs.all_changed_files}}
test-remote-cacher:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs: [backend-checks, frontend-checks, test-unit]
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
strategy:
matrix:
cacher:
# redis
- image: docker.io/bitnami/redis:7.2
port: 6379
# redict
- image: registry.redict.io/redict:7.3.0-scratch
port: 6379
# valkey
- image: docker.io/bitnami/valkey:7.2
port: 6379
# garnet
- image: ghcr.io/microsoft/garnet-alpine:1.0.14
port: 6379
services:
cacher:
image: ${{ matrix.cacher.image }}
options: ${{ matrix.cacher.options }}
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- name: install git >= 2.42
uses: ./.forgejo/workflows-composite/apt-install-from
with:
packages: git
- uses: ./.forgejo/workflows-composite/build-backend
- run: |
su forgejo -c 'make test-remote-cacher test-check'
timeout-minutes: 120
env:
RACE_ENABLED: 'true'
TAGS: bindata
TEST_REDIS_SERVER: cacher:${{ matrix.cacher.port }}
test-mysql:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs: [backend-checks, frontend-checks]
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
services:
mysql:
image: 'docker.io/mysql:8-debian'
image: 'docker.io/bitnami/mysql:8.4'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: testgitea
#
# See also https://codeberg.org/forgejo/forgejo/issues/976
#
cmd: ['mysqld', '--innodb-adaptive-flushing=OFF', '--innodb-buffer-pool-size=4G', '--innodb-log-buffer-size=128M', '--innodb-flush-log-at-trx-commit=0', '--innodb-flush-log-at-timeout=30', '--innodb-flush-method=nosync', '--innodb-fsync-threshold=1000000000']
#
# See also https://codeberg.org/forgejo/forgejo/issues/976
#
MYSQL_EXTRA_FLAGS: --innodb-adaptive-flushing=OFF --innodb-buffer-pool-size=4G --innodb-log-buffer-size=128M --innodb-flush-log-at-trx-commit=0 --innodb-flush-log-at-timeout=30 --innodb-flush-method=nosync --innodb-fsync-threshold=1000000000
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
apt-get update -qq
apt-get install --no-install-recommends -qq -y git git-lfs
rm /etc/apt/sources.list.d/testing.list
apt-get update -qq
- name: setup user and permissions
run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo .
- run: |
su forgejo -c 'make deps-backend'
- run: |
su forgejo -c 'make backend'
env:
TAGS: bindata
uses: ./.forgejo/workflows-composite/apt-install-from
with:
packages: git git-lfs
- uses: ./.forgejo/workflows-composite/build-backend
- run: |
su forgejo -c 'make test-mysql-migration test-mysql'
timeout-minutes: 50
timeout-minutes: 120
env:
TAGS: bindata
USE_REPO_TEST_DIR: 1
test-pgsql:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs: [backend-checks, frontend-checks]
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
services:
minio:
image: bitnami/minio:2024.3.30
image: docker.io/bitnami/minio:2024.8.17
env:
MINIO_ROOT_USER: 123456
MINIO_ROOT_PASSWORD: 12345678
ldap:
image: docker.io/gitea/test-openldap:latest
pgsql:
image: 'docker.io/postgres:15'
image: 'code.forgejo.org/oci/postgres:15'
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
apt-get update -qq
apt-get install --no-install-recommends -qq -y git git-lfs
rm /etc/apt/sources.list.d/testing.list
apt-get update -qq
- name: setup user and permissions
run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo .
- run: |
su forgejo -c 'make deps-backend'
- run: |
su forgejo -c 'make backend'
env:
TAGS: bindata
uses: ./.forgejo/workflows-composite/apt-install-from
with:
packages: git git-lfs
- uses: ./.forgejo/workflows-composite/build-backend
- run: |
su forgejo -c 'make test-pgsql-migration test-pgsql'
timeout-minutes: 50
timeout-minutes: 120
env:
TAGS: bindata
RACE_ENABLED: true
USE_REPO_TEST_DIR: 1
TEST_LDAP: 1
@ -192,36 +229,36 @@ jobs:
runs-on: docker
needs: [backend-checks, frontend-checks]
container:
image: 'docker.io/node:20-bookworm'
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
apt-get update -qq
apt-get install --no-install-recommends -qq -y git git-lfs
rm /etc/apt/sources.list.d/testing.list
apt-get update -qq
- name: setup user and permissions
run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
chown -R forgejo:forgejo .
- run: |
su forgejo -c 'make deps-backend'
- run: |
su forgejo -c 'make backend'
env:
TAGS: bindata sqlite sqlite_unlock_notify
uses: ./.forgejo/workflows-composite/apt-install-from
with:
packages: git git-lfs
- uses: ./.forgejo/workflows-composite/build-backend
- run: |
su forgejo -c 'make test-sqlite-migration test-sqlite'
timeout-minutes: 50
timeout-minutes: 120
env:
TAGS: bindata sqlite sqlite_unlock_notify
TAGS: sqlite sqlite_unlock_notify
RACE_ENABLED: true
TEST_TAGS: sqlite sqlite_unlock_notify
USE_REPO_TEST_DIR: 1
security-check:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
needs:
- test-sqlite
- test-pgsql
- test-mysql
- test-remote-cacher
- test-unit
container:
image: 'code.forgejo.org/oci/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/workflows-composite/setup-env
- run: su forgejo -c 'make deps-backend deps-tools'
- run: su forgejo -c 'make security-check'

View file

@ -1,13 +0,0 @@
---
name: "Pull Request Template"
about: "Template for all Pull Requests"
labels:
- test/needed
---
<!--
Before submitting a PR, please read the contributing guidelines:
https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
-->

6
.gitignore vendored
View file

@ -115,6 +115,12 @@ prime/
*_source.tar.bz2
.DS_Store
# Direnv configuration
/.envrc
# nix-direnv generated files
.direnv/
# Make evidence files
/.make_evidence

View file

@ -43,7 +43,7 @@ vscode:
- Vue.volar
- ms-azuretools.vscode-docker
- vitest.explorer
- qwtel.sqlite-viewer
- cweijan.vscode-database-client2
- GitHub.vscode-pull-request-github
ports:

View file

@ -19,17 +19,16 @@ linters:
- revive
- staticcheck
- stylecheck
- tenv
- testifylint
- typecheck
- unconvert
- unused
- unparam
- wastedassign
run:
timeout: 10m
skip-dirs:
- node_modules
- public
- web_src
output:
sort-results: true
@ -44,7 +43,6 @@ linters-settings:
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
revive:
severity: error
rules:
@ -99,6 +97,9 @@ linters-settings:
desc: do not use the ini package, use gitea's config system instead
- pkg: github.com/minio/sha256-simd
desc: use crypto/sha256 instead, see https://codeberg.org/forgejo/forgejo/pulls/1528
testifylint:
disable:
- go-require
issues:
max-issues-per-linter: 0

2
.mailmap Normal file
View file

@ -0,0 +1,2 @@
Unknwon <u@gogs.io> <joe2010xtmf@163.com>
Unknwon <u@gogs.io> 无闻 <u@gogs.io>

View file

@ -0,0 +1,27 @@
categorize: './release-notes-assistant.sh'
branch-development: 'forgejo'
branch-pattern: 'v*/forgejo'
branch-find-version: 'v(?P<version>\d+\.\d+)/forgejo'
branch-to-version: '${version}.0'
branch-from-version: 'v%[1]d.%[2]d/forgejo'
tag-from-version: 'v%[1]d.%[2]d.%[3]d'
branch-known:
- 'v7.0/forgejo'
cleanup-line: 'sed -Ee "s/^(feat|fix):\s*//g" -e "s/^\[WIP\] //" -e "s/^WIP: //" -e "s;\[(UI|BUG|FEAT|v.*?/forgejo)\]\s*;;g"'
render-header: |
## Release notes
comment: |
<details>
<summary>Where does that come from?</summary>
The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `%[2]s/%[3]s.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference.
This message and the release notes originate from a call to the [release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant).
```diff
%[4]s
```
</details>
%[1]s

View file

@ -6,9 +6,6 @@
# Please mind the alphabetic order of reviewers.
# Files related to the CI of the Forgejo project.
.forgejo/.* @dachary @earl-warren
# Files related to frontend development.
# Javascript and CSS code.
@ -19,19 +16,22 @@ templates/.* @caesar @crystal @gusted
## the issue sidebar was touched by fnetx
templates/repo/issue/view_content/sidebar.* @fnetx
# Playwright tests
tests/e2e/.* @fnetx
# Files related to Go development.
# The modules usually don't require much knowledge about Forgejo and could
# be reviewed by Go developers.
modules/.* @dachary @earl-warren @gusted
modules/.* @gusted
# Models has code related to SQL queries, general database knowledge and XORM.
models/.* @dachary @earl-warren @gusted
models/.* @gusted
# The routers directory contains the most amount code that requires a good grasp
# of how Forgejo comes together. It's tedious to write good integration testing
# for code that lives in here.
routers/.* @dachary @earl-warren @gusted
routers/.* @gusted
# Let new strings be checked by the translation team.
options/locale/locale_en-US.ini @0ko

View file

@ -4,4 +4,4 @@ The Forgejo project is run by a community of people who are expected to follow t
Sensitive security-related issues should be reported to [security@forgejo.org](mailto:security@forgejo.org) using [encryption](https://keyoxide.org/security@forgejo.org).
You can find links to the different aspects of Developer documentation on this page: [Forgejo developer guide](https://forgejo.org/docs/next/developer/).
You can find links to the different aspects of Developer documentation on this page: [Forgejo Contributor Guide](https://forgejo.org/docs/next/contributor/).

View file

@ -1,13 +1,13 @@
FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.23-alpine3.20 as build-env
ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
ENV GOPROXY=${GOPROXY:-direct}
ARG RELEASE_VERSION
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ENV TAGS="bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#
@ -36,7 +36,7 @@ WORKDIR ${GOPATH}/src/code.gitea.io/gitea
RUN make clean
RUN make frontend
RUN go build contrib/environment-to-ini/environment-to-ini.go && xx-verify environment-to-ini
RUN make RELEASE_VERSION=$RELEASE_VERSION go-check generate-backend static-executable && xx-verify gitea
RUN LDFLAGS="-buildid=" make RELEASE_VERSION=$RELEASE_VERSION GOFLAGS="-trimpath" go-check generate-backend static-executable && xx-verify gitea
# Copy local files
COPY docker/root /tmp/local
@ -51,7 +51,7 @@ RUN chmod 755 /tmp/local/usr/bin/entrypoint \
/go/src/code.gitea.io/gitea/environment-to-ini
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete
FROM code.forgejo.org/oci/golang:1.22-alpine3.20
FROM code.forgejo.org/oci/alpine:3.20
ARG RELEASE_VERSION
LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.authors="Forgejo" \
@ -60,7 +60,7 @@ LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.source="https://codeberg.org/forgejo/forgejo" \
org.opencontainers.image.version="${RELEASE_VERSION}" \
org.opencontainers.image.vendor="Forgejo" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.licenses="GPL-3.0-or-later" \
org.opencontainers.image.title="Forgejo. Beyond coding. We forge." \
org.opencontainers.image.description="Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance, it just does the job."
@ -92,8 +92,8 @@ RUN addgroup \
git && \
echo "git:*" | chpasswd -e
ENV USER git
ENV GITEA_CUSTOM /data/gitea
ENV USER=git
ENV GITEA_CUSTOM=/data/gitea
VOLUME ["/data"]
@ -103,5 +103,6 @@ CMD ["/bin/s6-svscan", "/etc/s6"]
COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh

View file

@ -1,13 +1,13 @@
FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.23-alpine3.20 as build-env
ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
ENV GOPROXY=${GOPROXY:-direct}
ARG RELEASE_VERSION
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ENV TAGS="bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#
@ -49,7 +49,7 @@ RUN chmod 755 /tmp/local/usr/local/bin/docker-entrypoint.sh \
/go/src/code.gitea.io/gitea/environment-to-ini
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete
FROM code.forgejo.org/oci/golang:1.22-alpine3.20
FROM code.forgejo.org/oci/alpine:3.20
LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.authors="Forgejo" \
org.opencontainers.image.url="https://forgejo.org" \
@ -57,7 +57,7 @@ LABEL maintainer="contact@forgejo.org" \
org.opencontainers.image.source="https://codeberg.org/forgejo/forgejo" \
org.opencontainers.image.version="${RELEASE_VERSION}" \
org.opencontainers.image.vendor="Forgejo" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.licenses="GPL-3.0-or-later" \
org.opencontainers.image.title="Forgejo. Beyond coding. We forge." \
org.opencontainers.image.description="Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance, it just does the job."
@ -90,25 +90,25 @@ RUN chown git:git /var/lib/gitea /etc/gitea
COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh
#git:git
USER 1000:1000
ENV GITEA_WORK_DIR /var/lib/gitea
ENV GITEA_CUSTOM /var/lib/gitea/custom
ENV GITEA_TEMP /tmp/gitea
ENV TMPDIR /tmp/gitea
ENV GITEA_WORK_DIR=/var/lib/gitea
ENV GITEA_CUSTOM=/var/lib/gitea/custom
ENV GITEA_TEMP=/tmp/gitea
ENV TMPDIR=/tmp/gitea
# Legacy config file for backwards compatibility
# TODO: remove on next major version release
ENV GITEA_APP_INI_LEGACY /etc/gitea/app.ini
ENV GITEA_APP_INI_LEGACY=/etc/gitea/app.ini
ENV GITEA_APP_INI ${GITEA_CUSTOM}/conf/app.ini
ENV HOME "/var/lib/gitea/git"
ENV GITEA_APP_INI=${GITEA_CUSTOM}/conf/app.ini
ENV HOME="/var/lib/gitea/git"
VOLUME ["/var/lib/gitea", "/etc/gitea"]
WORKDIR /var/lib/gitea
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
CMD []

6
FORK.md Normal file
View file

@ -0,0 +1,6 @@
# TudbuT FORK
## Changes:
- Allow anyone to see the activity heatmap in full

689
LICENSE
View file

@ -1,21 +1,674 @@
Copyright (c) 2022 The Forgejo Authors
Copyright (c) 2016 The Gitea Authors
Copyright (c) 2015 The Gogs Authors
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
Preamble
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

228
Makefile
View file

@ -24,24 +24,32 @@ HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
COMMA := ,
DIFF ?= diff --unified
ifeq ($(USE_GOTESTSUM), yes)
GOTEST ?= gotestsum --
GOTESTCOMPILEDRUNPREFIX ?= gotestsum --raw-command -- go tool test2json -t
GOTESTCOMPILEDRUNSUFFIX ?= -test.v=test2json
else
GOTEST ?= $(GO) test
GOTESTCOMPILEDRUNPREFIX ?=
GOTESTCOMPILEDRUNSUFFIX ?=
endif
XGO_VERSION := go-1.21.x
AIR_PACKAGE ?= github.com/air-verse/air@v1 # renovate: datasource=go
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker@2.8.0 # renovate: datasource=go
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.6.0 # renovate: datasource=go
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 # renovate: datasource=go
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.0.3 # renovate: datasource=go
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0 # renovate: datasource=go
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 # renovate: datasource=go
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11 # renovate: datasource=go
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.6.0 # renovate: datasource=go
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0 # renovate: datasource=go
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.6.0 # renovate: datasource=go
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 # renovate: datasource=go
DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.22.0 # renovate: datasource=go
DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.26.0 # renovate: datasource=go
GOMOCK_PACKAGE ?= go.uber.org/mock/mockgen@v0.4.0 # renovate: datasource=go
DOCKER_IMAGE ?= gitea/gitea
DOCKER_TAG ?= latest
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.16.2 # renovate: datasource=go
RENOVATE_NPM_PACKAGE ?= renovate@39.9.1 # renovate: datasource=docker packageName=code.forgejo.org/forgejo-contrib/renovate
ifeq ($(HAS_GO), yes)
CGO_EXTRA_CFLAGS := -DSQLITE_MAX_VARIABLE_NUMBER=32766
@ -121,8 +129,10 @@ LDFLAGS := $(LDFLAGS) -X "main.ReleaseVersion=$(RELEASE_VERSION)" -X "main.MakeV
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
ifeq ($(HAS_GO), yes)
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) $(shell $(GO) list code.gitea.io/gitea/models/forgejo_migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) $(shell $(GO) list code.gitea.io/gitea/models/forgejo_migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./...))
endif
REMOTE_CACHER_MODULES ?= cache nosql session queue
GO_TEST_REMOTE_CACHER_PACKAGES ?= $(addprefix code.gitea.io/gitea/modules/,$(REMOTE_CACHER_MODULES))
FOMANTIC_WORK_DIR := web_src/fomantic
@ -154,9 +164,8 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
GO_DIRS := build cmd models modules routers services tests
WEB_DIRS := web_src/js web_src/css
ESLINT_FILES := web_src/js tools *.js tests/e2e
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(wildcard *.go *.js *.md *.yml *.yaml *.toml)
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(wildcard *.go *.js *.ts *.vue *.md *.yml *.yaml *.toml)
GO_SOURCES := $(wildcard *.go)
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" ! -path modules/options/bindata.go ! -path modules/public/bindata.go ! -path modules/templates/bindata.go)
@ -185,9 +194,10 @@ SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape}}/api/v1"|"basePa
SWAGGER_EXCLUDE := code.gitea.io/sdk
SWAGGER_NEWLINE_COMMAND := -e '$$a\'
SWAGGER_SPEC_BRANDING := s|Gitea API|Forgejo API|g
SWAGGER_SPEC_LICENSE := s|"name": "MIT"|"name": "This file is distributed under the MIT license for the purpose of interoperability"|
TEST_MYSQL_HOST ?= mysql:3306
TEST_MYSQL_DBNAME ?= testgitea
TEST_MYSQL_DBNAME ?= testgitea?multiStatements=true
TEST_MYSQL_USERNAME ?= root
TEST_MYSQL_PASSWORD ?=
TEST_PGSQL_HOST ?= pgsql:5432
@ -202,7 +212,7 @@ all: build
.PHONY: help
help:
@echo "Make Routines:"
@echo " - \"\" equivalent to \"build\""
@echo " - \"\" equivalent to \"build\""
@echo " - build build everything"
@echo " - frontend build frontend files"
@echo " - backend build backend files"
@ -228,6 +238,7 @@ help:
@echo " - lint-go lint go files"
@echo " - lint-go-fix lint go files and fix issues"
@echo " - lint-go-vet lint go files with vet"
@echo " - lint-go-gopls lint go files with gopls"
@echo " - lint-js lint js files"
@echo " - lint-js-fix lint js files and fix issues"
@echo " - lint-css lint css files"
@ -235,6 +246,7 @@ help:
@echo " - lint-md lint markdown files"
@echo " - lint-swagger lint swagger files"
@echo " - lint-templates lint template files"
@echo " - lint-renovate lint renovate files"
@echo " - lint-yaml lint yaml files"
@echo " - lint-spell lint spelling"
@echo " - lint-spell-fix lint spelling and fix issues"
@ -245,7 +257,9 @@ help:
@echo " - show-version-full show the same version as the API endpoint"
@echo " - show-version-major show major release number only"
@echo " - test-frontend test frontend files"
@echo " - test-frontend-coverage test frontend files and display code coverage"
@echo " - test-backend test backend files"
@echo " - test-remote-cacher test backend files that use a remote cache"
@echo " - test-e2e-sqlite[\#name.test.e2e] test end to end using playwright and sqlite"
@echo " - webpack build webpack files"
@echo " - svg build svg files"
@ -262,8 +276,13 @@ help:
@echo " - swagger-validate check if the swagger spec is valid"
@echo " - go-licenses regenerate go licenses"
@echo " - tidy run go mod tidy"
@echo " - test[\#TestSpecificName] run unit test"
@echo " - test[\#TestSpecificName] run unit test"
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
@echo " - reproduce-build\#version build a reproducible binary for the specified release version"
###
# Check system and environment requirements
###
.PHONY: go-check
go-check:
@ -271,14 +290,14 @@ go-check:
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
$(eval GO_VERSION := $(shell printf "%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9]+' | tr '.' ' ');))
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
echo "Gitea requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
echo "Forgejo requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
exit 1; \
fi
.PHONY: git-check
git-check:
@if git lfs >/dev/null 2>&1 ; then : ; else \
echo "Gitea requires git with lfs support to run tests." ; \
echo "Forgejo requires git with lfs support to run tests." ; \
exit 1; \
fi
@ -289,10 +308,14 @@ node-check:
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
echo "Gitea requires Node.js $(MIN_NODE_VERSION_STR) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
echo "Forgejo requires Node.js $(MIN_NODE_VERSION_STR) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
exit 1; \
fi
###
# Basic maintenance, check and lint targets
###
.PHONY: clean-all
clean-all: clean
rm -rf $(WEBPACK_DEST_ENTRIES) node_modules
@ -359,6 +382,7 @@ $(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
$(SED_INPLACE) '$(SWAGGER_SPEC_BRANDING)' './$(SWAGGER_SPEC)'
$(SED_INPLACE) '$(SWAGGER_SPEC_LICENSE)' './$(SWAGGER_SPEC)'
.PHONY: swagger-check
swagger-check: generate-swagger
@ -393,7 +417,7 @@ lint-frontend: lint-js lint-css
lint-frontend-fix: lint-js-fix lint-css-fix
.PHONY: lint-backend
lint-backend: lint-go lint-go-vet lint-editorconfig
lint-backend: lint-go lint-go-vet lint-editorconfig lint-renovate lint-locale
.PHONY: lint-backend-fix
lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
@ -412,11 +436,11 @@ lint-codespell-fix-i:
.PHONY: lint-js
lint-js: node_modules
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES)
npx eslint --color --max-warnings=0
.PHONY: lint-js-fix
lint-js-fix: node_modules
npx eslint --color --max-warnings=0 --ext js,vue $(ESLINT_FILES) --fix
npx eslint --color --max-warnings=0 --fix
.PHONY: lint-css
lint-css: node_modules
@ -430,6 +454,16 @@ lint-css-fix: node_modules
lint-swagger: node_modules
npx spectral lint -q -F hint $(SWAGGER_SPEC)
.PHONY: lint-renovate
lint-renovate: node_modules
npx --yes --package $(RENOVATE_NPM_PACKAGE) -- renovate-config-validator --strict > .lint-renovate 2>&1 || true
@if grep --quiet --extended-regexp -e '^( WARN:|ERROR:)' .lint-renovate ; then cat .lint-renovate ; rm .lint-renovate ; exit 1 ; fi
@rm .lint-renovate
.PHONY: lint-locale
lint-locale:
$(GO) run build/lint-locale.go
.PHONY: lint-md
lint-md: node_modules
npx markdownlint docs *.md
@ -468,6 +502,11 @@ lint-go-vet:
@echo "Running go vet..."
@$(GO) vet ./...
.PHONY: lint-go-gopls
lint-go-gopls:
@echo "Running gopls check..."
@GO=$(GO) GOPLS_PACKAGE=$(GOPLS_PACKAGE) tools/lint-go-gopls.sh $(GO_SOURCES_NO_BINDATA)
.PHONY: lint-editorconfig
lint-editorconfig:
$(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) templates .forgejo/workflows
@ -481,6 +520,14 @@ lint-templates: .venv node_modules
lint-yaml: .venv
@poetry run yamllint .
.PHONY: security-check
security-check:
go run $(GOVULNCHECK_PACKAGE) ./...
###
# Development and testing targets
###
.PHONY: watch
watch:
@bash tools/watch.sh
@ -500,12 +547,21 @@ test: test-frontend test-backend
.PHONY: test-backend
test-backend:
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
@$(GOTEST) $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
.PHONY: test-remote-cacher
test-remote-cacher:
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
@$(GOTEST) $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_REMOTE_CACHER_PACKAGES)
.PHONY: test-frontend
test-frontend: node_modules
npx vitest
.PHONY: test-frontend-coverage
test-frontend-coverage: node_modules
npx vitest --coverage --coverage.include 'web_src/**'
.PHONY: test-check
test-check:
@echo "Running test-check...";
@ -521,7 +577,7 @@ test-check:
.PHONY: test\#%
test\#%:
@echo "Running go test with -tags '$(TEST_TAGS)'..."
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
@$(GOTEST) $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
.PHONY: coverage
coverage:
@ -532,7 +588,7 @@ coverage:
.PHONY: unit-test-coverage
unit-test-coverage:
@echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
@$(GO) test $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_TEST_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
@$(GOTEST) $(GOTESTFLAGS) -timeout=20m -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_TEST_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
.PHONY: tidy
tidy:
@ -553,7 +609,7 @@ tidy-check: tidy
go-licenses: $(GO_LICENSE_FILE)
$(GO_LICENSE_FILE): go.mod go.sum
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
-$(shell $(GO) env GOROOT)/bin/go run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
@rm -rf $(GO_LICENSE_TMP_DIR)
@ -565,11 +621,11 @@ generate-ini-sqlite:
.PHONY: test-sqlite
test-sqlite: integrations.sqlite.test generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: test-sqlite\#%
test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run $(subst .,/,$*)
.PHONY: test-sqlite-migration
test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test
@ -586,11 +642,11 @@ generate-ini-mysql:
.PHONY: test-mysql
test-mysql: integrations.mysql.test generate-ini-mysql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.mysql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: test-mysql\#%
test-mysql\#%: integrations.mysql.test generate-ini-mysql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.mysql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run $(subst .,/,$*)
.PHONY: test-mysql-migration
test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test
@ -604,15 +660,16 @@ generate-ini-pgsql:
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
-e 's|{{TEST_STORAGE_TYPE}}|$(or $(TEST_STORAGE_TYPE),minio)|g' \
tests/pgsql.ini.tmpl > tests/pgsql.ini
.PHONY: test-pgsql
test-pgsql: integrations.pgsql.test generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: test-pgsql\#%
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./integrations.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run $(subst .,/,$*)
.PHONY: test-pgsql-migration
test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test
@ -631,31 +688,31 @@ test-e2e: test-e2e-sqlite
.PHONY: test-e2e-sqlite
test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e
.PHONY: test-e2e-sqlite\#%
test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e/$*
.PHONY: test-e2e-sqlite-firefox\#%
test-e2e-sqlite-firefox\#%: playwright e2e.sqlite.test generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini PLAYWRIGHT_PROJECT=firefox ./e2e.sqlite.test -test.run TestE2e/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini PLAYWRIGHT_PROJECT=firefox $(GOTESTCOMPILEDRUNPREFIX) ./e2e.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e/$*
.PHONY: test-e2e-mysql
test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.mysql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e
.PHONY: test-e2e-mysql\#%
test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.mysql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e/$*
.PHONY: test-e2e-pgsql
test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e
.PHONY: test-e2e-pgsql\#%
test-e2e-pgsql\#%: playwright e2e.pgsql.test generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./e2e.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX) -test.run TestE2e/$*
.PHONY: test-e2e-debugserver
test-e2e-debugserver: e2e.sqlite.test generate-ini-sqlite
@ -683,77 +740,81 @@ integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sq
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
integrations.mysql.test: git-check $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
integrations.pgsql.test: git-check $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
integrations.sqlite.test: git-check $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
integrations.cover.test: git-check $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test
integrations.cover.sqlite.test: git-check $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
.PHONY: migrations.mysql.test
migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.mysql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.pgsql.test
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.sqlite.test
migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.individual.mysql.test
migrations.individual.mysql.test: $(GO_SOURCES)
for pkg in $(MIGRATION_PACKAGES); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1; \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1; \
done
.PHONY: migrations.individual.sqlite.test\#%
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
.PHONY: migrations.individual.pgsql.test
migrations.individual.pgsql.test: $(GO_SOURCES)
for pkg in $(MIGRATION_PACKAGES); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1;\
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1;\
done
.PHONY: migrations.individual.pgsql.test\#%
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
.PHONY: migrations.individual.sqlite.test
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
for pkg in $(MIGRATION_PACKAGES); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1; \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg || exit 1; \
done
.PHONY: migrations.individual.sqlite.test\#%
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
e2e.mysql.test: $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
e2e.pgsql.test: $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
e2e.sqlite.test: $(GO_SOURCES)
$(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)'
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)'
.PHONY: check
check: test
###
# Production / build targets
###
.PHONY: install $(TAGS_PREREQ)
install: $(wildcard *.go)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
@ -783,10 +844,6 @@ generate-go: $(TAGS_PREREQ)
merge-locales:
@echo "NOT NEEDED: THIS IS A NOOP AS OF Forgejo 7.0 BUT KEPT FOR BACKWARD COMPATIBILITY"
.PHONY: security-check
security-check:
go run $(GOVULNCHECK_PACKAGE) ./...
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
@ -808,9 +865,6 @@ $(DIST_DIRS):
.PHONY: release-windows
release-windows: | $(DIST_DIRS)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
ifeq (,$(findstring gogit,$(TAGS)))
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
endif
.PHONY: release-linux
release-linux: | $(DIST_DIRS)
@ -853,6 +907,30 @@ release-sources: | $(DIST_DIRS)
release-docs: | $(DIST_DIRS) docs
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs .
.PHONY: reproduce-build
reproduce-build:
# Start building the Dockerfile with the RELEASE_VERSION tag set. GOPROXY is set
# for convience, because the default of the Dockerfile is `direct` which can be
# quite slow.
@docker build --build-arg="RELEASE_VERSION=$(RELEASE_VERSION)" --build-arg="GOPROXY=$(shell $(GO) env GOPROXY)" --tag "forgejo-reproducibility" .
@id=$$(docker create forgejo-reproducibility); \
docker cp $$id:/app/gitea/gitea ./forgejo; \
docker rm -v $$id; \
docker image rm forgejo-reproducibility:latest
.PHONY: reproduce-build\#%
reproduce-build\#%:
@git switch -d "$*"
# All the current variables are based on information before the git checkout happened.
# Call the makefile again, so these variables are correct and can be used for building
# a reproducible binary. Always execute git switch -, to go back to the previous branch.
@make reproduce-build; \
(code=$$?; git switch -; exit $${code})
###
# Dependency management
###
.PHONY: deps
deps: deps-frontend deps-backend deps-tools deps-py
@ -879,13 +957,14 @@ deps-tools:
$(GO) install $(GO_LICENSES_PACKAGE)
$(GO) install $(GOVULNCHECK_PACKAGE)
$(GO) install $(GOMOCK_PACKAGE)
$(GO) install $(GOPLS_PACKAGE)
node_modules: package-lock.json
npm install --no-save
@touch node_modules
.venv: poetry.lock
poetry install --no-root
poetry install
@touch .venv
.PHONY: fomantic
@ -928,16 +1007,6 @@ lockfile-check:
@git diff --exit-code --color=always package-lock.json \
|| (code=$$?; echo "Please run 'npm install --package-lock-only' and commit the result"; exit $${code})
.PHONY: update-translations
update-translations:
mkdir -p ./translations
cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip
rm ./translations/gitea.zip
$(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
mv ./translations/*.ini ./options/locale/
rmdir ./translations
.PHONY: generate-license
generate-license:
$(GO) run build/generate-licenses.go
@ -948,11 +1017,11 @@ generate-gitignore:
.PHONY: generate-gomock
generate-gomock:
$(GO) run $(GOMOCK_PACKAGE) -package mock -destination ./modules/queue/mock/redisuniversalclient.go github.com/redis/go-redis/v9 UniversalClient
$(GO) run $(GOMOCK_PACKAGE) -package mock -destination ./modules/queue/mock/redisuniversalclient.go code.gitea.io/gitea/modules/nosql RedisClient
.PHONY: generate-images
generate-images: | node_modules
npm install --no-save fabric@6.0.0-beta20 imagemin-zopfli@7
npm install --no-save fabric@6 imagemin-zopfli@7
node tools/generate-images.js $(TAGS)
.PHONY: generate-manpage
@ -963,11 +1032,6 @@ generate-manpage:
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
@#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page
.PHONY: docker
docker:
docker build --disable-content-trust=false -t $(DOCKER_REF) .
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
# This endif closes the if at the top of the file
endif

View file

@ -40,6 +40,11 @@ If you like any of the following, Forgejo is literally meant for you:
Dive into the [documentation](https://forgejo.org/docs/latest/), subscribe to releases and blog post on [our website](https://forgejo.org), <a href="https://floss.social/@forgejo" rel="me">find us on the Fediverse</a> or hop into [our Matrix room](https://matrix.to/#/#forgejo-chat:matrix.org) if you have any questions or want to get involved.
## License
Forgejo is distributed under the terms of the [GPL version 3.0](LICENSE) or any later version.
The agreement for this license [was documented in June 2023](https://codeberg.org/forgejo/governance/pulls/24) and implemented during the development of Forgejo v9.0. All Forgejo versions before v9.0 are distributed under the MIT license.
## Get involved

View file

@ -1,12 +1,269 @@
# Release Notes
A minor or major Forgejo release is published every [three months](https://forgejo.org/docs/latest/user/versions/), with more patch releases in between depending on the severity of the bug and security fixes it contains.
A minor or major Forgejo release is published every [three months](https://forgejo.org/docs/latest/developer/release/#release-cycle), with more patch releases in between depending on the severity of the bug and security fixes it contains.
A [patch or minor release](https://semver.org/spec/v2.0.0.html) (e.g. upgrading from v7.0.0 to v7.0.1 or v7.1.0) does not require manual intervention. But [major releases](https://semver.org/spec/v2.0.0.html#spec-item-8) where the first version number changes (e.g. upgrading from v1.21 to v7.0) contain breaking changes and the release notes explain how to deal with them.
## Upcoming releases (not available yet)
The release notes of each release [are available in the corresponding milestone](https://codeberg.org/forgejo/forgejo/milestones), starting with [Forgejo 7.0.7](https://codeberg.org/forgejo/forgejo/milestone/7683) and [Forgejo 8.0.1](https://codeberg.org/forgejo/forgejo/milestone/7682).
- [8.0.0](release-notes/8.0.0/)
## 9.0.1
The Forgejo v9.0.1 release notes are [available in the v9.0.1 milestone](https://codeberg.org/forgejo/forgejo/milestone/8544).
## 9.0.0
The Forgejo v9.0.0 release notes are [available in the v9.0.0 milestone](https://codeberg.org/forgejo/forgejo/milestone/7235).
## 8.0.3
The Forgejo v8.0.3 release notes are [available in the v8.0.3 milestone](https://codeberg.org/forgejo/forgejo/milestone/8231).
## 8.0.2
The Forgejo v8.0.2 release notes are [available in the v8.0.2 milestone](https://codeberg.org/forgejo/forgejo/milestone/7728).
## 8.0.1
The Forgejo v8.0.1 release notes are [available in the v8.0.1 milestone](https://codeberg.org/forgejo/forgejo/milestone/7682).
## 8.0.0
A [companion blog post](https://forgejo.org/2024-07-release-v8-0/) provides additional context on this release. In addition to the pull requests listed below, you will find a complete list in the [v8.0 milestone](https://codeberg.org/forgejo/forgejo/milestone/6042).
- Two frontend features were removed because a license incompatibility was discovered. [Read more in the dedicated blog post](https://forgejo.org/2024-07-non-free-dependency-found/).
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4670): [Mermaid](https://mermaid.js.org/) rendering: `%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%` will now fail because [ELK](https://github.com/kieler/elkjs) is no longer included.
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4595): Repository citation: Removed the ability to export citations in APA format.
<!--start release-notes-assistant-->
<!--URL:https://codeberg.org/forgejo/forgejo-->
- **Breaking**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3040): <!--number 3040 --><!--number--><!--description -->remove Microsoft SQL Server support see [the discussion](https://codeberg.org/forgejo/discussions/issues/122).<!--description-->
- **User interface features & enhancements**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4590) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4571)): <!--number 4590 --><!--number--><!--description -->Replace `vue-bar-graph` with `chart.js`<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4201): <!--number 4201 --><!--number--><!--description Make tooltip of Author label in comments more clear-->make the tooltip of the author label in comments clearer.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4189): <!--number 4189 --><!--number--><!--description User profiles: only show RSS feed button and Public activity tab when the activity can be accessed, add messages about visibility-->only show the RSS feed button and Public activity tab in user profiles when the activity can be accessed and add messages about visibility.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4139): <!--number 4139 --><!--number--><!--description reorder repo tabs for better UX: (i) `Actions` is now the last tab (ii) `Packages` are located after Releases (iii) this puts Projects after Pull requests. (tab positions may depend on which units are enabled in the repo).-->reorder repo tabs for better UX: (i) `Actions` is now the last tab (ii) `Packages` are located after Releases (iii) this puts Projects after Pull requests. (tab positions may depend on which units are enabled in the repo).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4134): <!--number 4134 --><!--number--><!--description Code Search results are now displayed in a foldable box-->code search results are now displayed in a foldable box.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4095): <!--number 4095 --><!--number--><!--description Disable Subscribe button for guest users.-->disable the `Subscribe` button for guest users.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4072): <!--number 4072 --><!--number--><!--description multine placeholder-->
- Added Enter key handling to the new Markdown editor: Pressing Enter while in a list, quote or code block will copy the prefix to the new line - Ordered list index will be increased for the new line, and task list "checkbox" will be unchecked.
- Added indent/unindent function for a line or selection. Currently available as toolbar buttons ([#4263](https://codeberg.org/forgejo/forgejo/pulls/4263)).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3985): <!--number 3985 --><!--number--><!--description Added support for displaying images based on the users current color code by using an anchor of `#dark-mode-only` or `#light-mode-only` respectively. Also supporting the github variants (e.g. `#gh-dark-mode-only`).-->added support for displaying images based on the users current color code by using an anchor of `#dark-mode-only` or `#light-mode-only` respectively. Also supporting the github variants (e.g. `#gh-dark-mode-only`).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3870): <!--number 3870 --><!--number--><!--description Use CSS-native pattern for image diff background, add dark theme support-->use CSS-native pattern for image diff background, add dark theme support.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3642): <!--number 3642 --><!--number--><!--description Allow navigating to the organization dashboard from the organization view-->allow navigating to the organization dashboard from the organization view.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3434): <!--number 3434 --><!--number--><!--description When PDFs are displayed in the repository, the [full height of the screen](https://codeberg.org/forgejo/forgejo/pulls/3434) is now used instead of a predefined fixed height-->when PDFs are displayed in the repository, the full height of the screen is now used instead of a predefined fixed height.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3337): <!--number 3337 --><!--number--><!--description Added support for grouping of log-lines inside steps between the special `::group::{title}` and `::endgroup::` workflow commands. A runner of v3.4.2 or later is needed.-->added support for grouping of log-lines inside steps between the special `::group::{title}` and `::endgroup::` workflow commands. A runner of v3.4.2 or later is needed.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3285): <!--number 3285 --><!--number--><!--description The default for `[repository].USE_COMPAT_SSH_URI` has been changed to `true`. With this change, Forgejo defaults to using the same URL style for SSH clone URLs as for HTTPS ones, instead of the former scp-style.-->the default for `[repository].USE_COMPAT_SSH_URI` has been changed to `true`. With this change, Forgejo defaults to using the same URL style for SSH clone URLs as for HTTPS ones, instead of the former scp-style.<!--description-->
- **Features & Enhancements**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4283) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4266)): <!--number 4283 --><!--number--><!--description - add support for LFS server implementations which have batch API responses in an older/deprecated schema-->add support for LFS server implementations which have batch API responses in an older/deprecated schema.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4262): <!--number 4262 --><!--number--><!--description Introduced branch/tag dropdown in code search page if using git-grep.-->introduce a branch/tag dropdown in the code search page if using git-grep.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4160): <!--number 4160 --><!--number--><!--description Added support for fuzzy searching issues and pulls - support for `/issues` and `/pulls` were ported from [`gitea#be5be0ac81`](https://github.com/go-gitea/gitea/commit/be5be0ac81ce50ad5adb079af6ca4e8c396aaece) - support for `/user/repo/issues` and `/user/repo/pulls` were added-->added support for fuzzy searching in `/user/repo/issues` and `/user/repo/pulls`.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4145): <!--number 4145 --><!--number--><!--description multine placeholder-->
- feat(perf): [commit](https://codeberg.org/forgejo/forgejo/commit/358cd67c4f316f2d4f1d3be6dcb891dc04a2ff07) reduce memory usage for chunked artifact uploads to S3.
- feat: [commit](https://codeberg.org/forgejo/forgejo/commit/b60e3ac7b4aeeb9b8760f43eea9576c0e23309e9) allow downloading draft releases assets.
- feat: [commit](https://codeberg.org/forgejo/forgejo/commit/1fca15529ac8fefb60d86b0c1f4bec8dae9a8566) API endpoints for managing tag protection.
- feat: [commit](https://codeberg.org/forgejo/forgejo/commit/4334c705b5f9388b16af23c7e75a69d027d07d5e) extract and display readme and comments for Composer packages.
- fix: [commit](https://codeberg.org/forgejo/forgejo/commit/364922c6e4f28264add9e2501a352c25ad6a0993) when a repository is adopted, its object format is not set in the database.
- fix: [commit](https://codeberg.org/forgejo/forgejo/commit/e7f332a55d6a48a3f3b4f2bfa43d18455ac00acc) during a migration from bitbucket, LFS downloads fail.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4143): <!--number 4143 --><!--number--><!--description a help overlay, triggered by "?" key can be displayed when viewing [asciinema](https://asciinema.org/) files (.cast extension) and [SGR color sequence](https://github.com/asciinema/avt/issues/9) are supported.-->a help overlay, triggered by "?" key can be displayed when viewing [asciinema](https://asciinema.org/) files (.cast extension) and [SGR color sequence](https://github.com/asciinema/avt/issues/9) are supported.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4136): <!--number 4136 --><!--number--><!--description - strikethrough in markdown can be achieved with [a single ~ in addition to ~~](https://github.github.com/gfm/#strikethrough-extension-)-->strikethrough in markdown can be achieved with [a single ~ in addition to ~~](https://github.github.com/gfm/#strikethrough-extension-).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4083): <!--number 4083 --><!--number--><!--description multine placeholder-->
- feat: add [Reviewed-on and Reviewed-by variables](https://codeberg.org/forgejo/forgejo/commit/4ddd9af50fbfcfb2ebf629697a803b3bce56c4af) to the merge template.
- feat(perf): [add the `[ui.csv].MAX_ROWS` setting](https://codeberg.org/forgejo/forgejo/commit/433b6c6910f8699dc41787ef8f5148b122b4677e) to avoid displaying a large number of lines (defaults to 2500).
- feat: [add a setting to override or add headers of all outgoing emails](https://codeberg.org/forgejo/forgejo/commit/1d4bff4f65d5e4a3969871ef91d3612daf272b45), for instance `Reply-To` or `In-Reply-To`.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4027): <!--number 4027 --><!--number--><!--description - Gitea/Forgejo webhook payload include additional fields (`html_url`, `additions`, `deletions`, `review_comments`...) for better compatibility with [OpenProject](https://www.openproject.org/), ported from [gitea#28435](https://github.com/go-gitea/gitea/pull/28435).-->the Gitea/Forgejo webhook payload includes additional fields (`html_url`, `additions`, `deletions`, `review_comments`...) for better compatibility with [OpenProject](https://www.openproject.org/).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4026): <!--number 4026 --><!--number--><!--description - when an OAuth grant request submitted to a Forgejo user is denied, the server from which the request originates is not notified that it has been denied-->when an OAuth grant request submitted to a Forgejo user is denied, the server from which the request originates is notified that it has been denied.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3989): <!--number 3989 --><!--number--><!--description multine placeholder-->
- feat: API endpoints that return a repository now [also include the topics](https://codeberg.org/forgejo/forgejo/commit/ee2247d77c0b13b0b45df704d7589b541db03899).
- feat: display an error when an issue comment is [edited simultaneously by two users](https://codeberg.org/forgejo/forgejo/commit/ca0921a95aa9a37d8820538458c15fd0a3b0c97c) instead of silently overriding one of them.
- feat: add [support for a credentials chain for minio](https://codeberg.org/forgejo/forgejo/commit/73706ae26d138684ef9da9e1164846a040fd4a7d).
- feat(perf): improve performances when [retrieving pull requests via the API](https://codeberg.org/forgejo/forgejo/commit/47a2102694c47bc30a2a7c673c328471839ef206).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3934): <!--number 3934 --><!--number--><!--description When installing Forgejo through the built-in installer, open (self-) registration is now disabled by default.-->when installing Forgejo through the built-in installer, open (self-) registration is now disabled by default.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3917): <!--number 3917 --><!--number--><!--description support [setting the default attribute of the issue template dropdown field](https://codeberg.org/forgejo/forgejo/commit/df15abd07264138fd07e003d0cf056f7da514b8f)-->support [setting the default attribute of the issue template dropdown field](https://codeberg.org/forgejo/forgejo/commit/df15abd07264138fd07e003d0cf056f7da514b8f)<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3886): <!--number 3886 --><!--number--><!--description For federated-star we introduce a new repository setting to define following repositories. That is a workaround till we find a better way to express repository federation.-->For federated-star we introduce a new repository setting to define following repositories. That is a workaround till we find a better way to express repository federation.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3847): <!--number 3847 --><!--number--><!--description Basic wiki content search using git-grep. The search results include the first ten matched files. Only the first three matches per file are displayed.-->Basic wiki content search using git-grep. The search results include the first ten matched files. Only the first three matches per file are displayed.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3838): <!--number 3838 --><!--number--><!--description - [Support using label names when changing issue labels](https://codeberg.org/forgejo/forgejo/commit/8e1de85980f1e4ae05b240cafbf9eaf33c94a203)-->support using label names when changing issue labels.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3836): <!--number 3836 --><!--number--><!--description Parse prefix parameter from redis URI for queues and use that as prefix to keys-->parse prefix parameter from redis URI for queues and use that as prefix to keys.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3830): <!--number 3830 --><!--number--><!--description Neutralize delete runners' UUID to prevent collisions with new records-->neutralize delete runners' UUID to prevent collisions with new records.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3811): <!--number 3811 --><!--number--><!--description Implement a non-caching version of the [RubyGems compact API](https://guides.rubygems.org/rubygems-org-compact-index-api/) for bundler dependency resolution.-->implement a non-caching version of the [RubyGems compact API](https://guides.rubygems.org/rubygems-org-compact-index-api/) for bundler dependency resolution.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3808): <!--number 3808 --><!--number--><!--description - Add support for the [reddit](https://github.com/markbates/goth/pull/523) and [Hubspot](https://github.com/markbates/goth/pull/531) OAuth providers.-->add support for the [reddit](https://github.com/markbates/goth/pull/523) and [Hubspot](https://github.com/markbates/goth/pull/531) OAuth providers.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3791): <!--number 3791 --><!--number--><!--description - when parsing [incoming emails](https://forgejo.org/docs/v8.0/user/incoming/), [remove tspecials from type/subtype](https://github.com/jhillyerd/enmime/pull/317). According to the RFC, content type and subtype cannot contain special characters and any such character will fail parsing. Removing the characters from the type/subtype can help successfully parsing the content type that contains some extra garbage.-->when parsing [incoming emails](https://forgejo.org/docs/v8.0/user/incoming/), [remove tspecials from type/subtype](https://github.com/jhillyerd/enmime/pull/317). According to the RFC, content type and subtype cannot contain special characters and any such character will fail parsing. Removing the characters from the type/subtype can help successfully parsing the content type that contains some extra garbage.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3752): <!--number 3752 --><!--number--><!--description There are a couple of new configs to define the name of the instance. The more important is `APP_SLOGAN`. It permits to configure a slogan for the site and it is optional. The other is `APP_DISPLAY_NAME_FORMAT` and permits to customize the aspect of the full display name for the instance used in some parts of the UI as: (i) Title page, (ii) Homepage head title (ii) Open Graph site and title meta tags. Its default value is `APP_NAME: APP_SLOGAN`. The config `APP_DISPLAY_NAME_FORMAT` is used only if `APP_SLOGAN` is set otherwise the full display name shows only `APP_NAME` value.-->there are a couple of new configs to define the name of the instance. The more important is `APP_SLOGAN`. It permits to configure a slogan for the site and it is optional. The other is `APP_DISPLAY_NAME_FORMAT` and permits to customize the aspect of the full display name for the instance used in some parts of the UI as: (i) Title page, (ii) Homepage head title (ii) Open Graph site and title meta tags. Its default value is `APP_NAME: APP_SLOGAN`. The config `APP_DISPLAY_NAME_FORMAT` is used only if `APP_SLOGAN` is set otherwise the full display name shows only `APP_NAME` value.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3729): <!--number 3729 --><!--number--><!--description multine placeholder-->
- feat: [commit](https://codeberg.org/forgejo/forgejo/commit/7028fe0b4d89c045b64ae891d2716e89965bc012): add actions-artifacts to the [storage migrate CLI](https://forgejo.org/docs/v8.0/admin/command-line/#migrate).
- fix: [commit](https://codeberg.org/forgejo/forgejo/commit/8f0f6bf89cdcd12cd4daa761aa259fdba7e32b50): pull request search shows closed pull requests in the open tab.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3724): <!--number 3724 --><!--number--><!--description multine placeholder-->
- [CERT management was improved](https://codeberg.org/forgejo/forgejo/pulls/3724) when [`ENABLE_ACME=true`](https://forgejo.org/docs/v7.0/admin/config-cheat-sheet/#server-server)
- Draft support for draft-03 of [ACME Renewal Information (ARI)](https://datatracker.ietf.org/doc/draft-ietf-acme-ari/) which assists with deciding when to renew certificates. This augments CertMagic's already-advanced logic using cert lifetime and OCSP/revocation status.
- New [`ZeroSSLIssuer`](https://pkg.go.dev/github.com/caddyserver/certmagic@v0.21.0#ZeroSSLIssuer) uses the [ZeroSSL API](https://zerossl.com/documentation/api/) to get certificates. ZeroSSL also has an ACME endpoint, which can still be accessed using the existing ACMEIssuer, as always. Their proprietary API is paid, but has extra features like IP certificates, better reliability, and support.
- DNS challenges should be smoother in some cases as we've improved propagation checking.
- In the odd case your ACME account disappears from the ACME server, CertMagic will automatically retry with a new account. (This happens in some test/dev environments.)
- ACME accounts are identified only by their public keys, but CertMagic maps accounts by CA+email for practical/storage reasons. So now you can "pin" an account key to use by specifying your email and the account public key in your config, which is useful if you need to absolutely be sure to use a specific account (like if you get rate limit exemptions from a CA).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3723): <!--number 3723 --><!--number--><!--description multine placeholder-->
- With the go-enry upgrade to [v2.8.8](https://github.com/go-enry/go-enry/releases/tag/v2.8.8), language detection in the repository [now includes](https://github.com/github-linguist/linguist/releases/tag/v7.29.0):
- New languages
- [Roc](https://github.com/github-linguist/linguist/pull/6633)
- [BitBake](https://github.com/github-linguist/linguist/pull/6665) with `.bbappend`, `.bbclass` and `.inc` extensions
- [Glimmer TS](https://github.com/github-linguist/linguist/pull/6680)
- [Edge](https://github.com/github-linguist/linguist/pull/6695)
- [Pip Requirements](https://github.com/github-linguist/linguist/pull/6739)
- [Mojo](https://github.com/github-linguist/linguist/pull/6400)
- [Slint](https://github.com/github-linguist/linguist/pull/6750)
- [Oberon](https://github.com/github-linguist/linguist/pull/4645)
- New data formats
- [TextGrid](https://github.com/github-linguist/linguist/pull/6719)
- File names and extensions:
- The [rebornix.Ruby extension is deprecated in favor of Shopify.ruby-lsp](https://github.com/github-linguist/linguist/pull/6738)
- [Add .bicepparam to list of Bicep file extensions](https://github.com/github-linguist/linguist/pull/6664)
- [Add cs.pp extension to C#](https://github.com/github-linguist/linguist/pull/6679)
- [Add tmux.conf and .tmux.conf as shell filenames](https://github.com/github-linguist/linguist/pull/6726)
- [Add .env.sample as Dotenv filename](https://github.com/github-linguist/linguist/pull/6732)<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3654): <!--number 3654 --><!--number--><!--description Code Search for non-default branches and tags when repository indexer is disabled-->support Code Search for non-default branches and tags when the repository indexer is disabled.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3615): <!--number 3615 --><!--number--><!--description -->add an immutable tarball link to archive download headers for Nix.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3414): <!--number 3414 --><!--number--><!--description Allow to customize the domain name used as a fallback when synchronizing sources from ldap [`ldap: default domain name`](https://codeberg.org/forgejo/forgejo/pulls/3414)-->allow to customize the domain name used as a fallback when synchronizing sources from ldap default domain name.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3383): <!--number 3383 --><!--number--><!--description The default config for `database.MAX_OPEN_CONNS` changed from 0 (unlimited) to 100 to avoid problems if it exceeds the limit by the database server. If you require high concurrency, try to increase this value for both Forgejo **and your database server**. [`Limit database max connections by default`](https://codeberg.org/forgejo/forgejo/pulls/3383)-->the default config for `database.MAX_OPEN_CONNS` changed from 0 (unlimited) to 100 to avoid problems if it exceeds the limit by the database server. If you require high concurrency, try to increase this value for both Forgejo **and your database server**.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3366): <!--number 3366 --><!--number--><!--description -->infer the `[email.incoming].PORT` setting from `.USE_TLS`.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3363): <!--number 3363 --><!--number--><!--description Reverted the rootless container image path in `GITEA_APP_INI` from `/etc/gitea/app.ini` to its default value of `/var/lib/gitea/custom/conf/app.ini`. This allows container users to not have to mount two separate volumes (one for the configuration data and one for the configuration `.ini` file). A warning is issued for users with the legacy configuration on how to update to the new path.-->reverted the rootless container image path in `GITEA_APP_INI` from `/etc/gitea/app.ini` to its default value of `/var/lib/gitea/custom/conf/app.ini`. This allows container users to not have to mount two separate volumes (one for the configuration data and one for the configuration `.ini` file). A warning is issued for users with the legacy configuration on how to update to the new path.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3334): <!--number 3334 --><!--number--><!--description Added support for the `workflow_dispatch` workflow trigger-->added support for the [`workflow_dispatch` trigger](https://forgejo.org/docs/v8.0/user/actions/#onworkflow_dispatch) in Forgejo Actions.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3307): <!--number 3307 --><!--number--><!--description Support [Proof Key for Code Exchange (PKCE - RFC7636)](https://www.rfc-editor.org/rfc/rfc7636) for external login using the OpenID Connect authentication source.-->support [Proof Key for Code Exchange (PKCE - RFC7636)](https://www.rfc-editor.org/rfc/rfc7636) for external login using the OpenID Connect authentication source.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3139): <!--number 3139 --><!--number--><!--description Allow hiding auto generated release archives-->allow hiding auto generated release archives.<!--description-->
- **Bug fixes**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4732) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4715)): <!--number 4732 --><!--number--><!--description -->Show the AGit label on merged pull requests.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4689) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4687)): <!--number 4689 --><!--number--><!--description -->Fixed: issue state change via the API is not idempotent.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4547) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4546)): <!--number 4547 --><!--number--><!--description The milestone section in the sidebar on the issue and pull request page now uses HTMX. If you update the milestone of a issue or pull request it will no longer reload the whole page and instead update the current page with the new information about the milestone update. This should provide a smoother user experience.-->The milestone section in the sidebar on the issue and pull request page now uses HTMX. If you update the milestone of a issue or pull request it will no longer reload the whole page and instead update the current page with the new information about the milestone update. This should provide a smoother user experience.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4402) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4382)): <!--number 4402 --><!--number--><!--description -->Fix mobile UI for organisation creation.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4621) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4618)): <!--number 4621 --><!--number--><!--description -->Fixes: Forgejo Actions does not trigger an edited event when the title of an issue or pull request is changed.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4529) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4523)): <!--number 4529 --><!--number--><!--description -->Load attachments for `/issues/comments/{id}`.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4423) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4375)): <!--number 4423 --><!--number--><!--description the "View command line instructions" link in pull requests and the "Copy content" button in file editor are not accessible-->Fixed: the "View command line instructions" link in pull requests and the "Copy content" button in file editor are not accessible.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4380) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4377)): <!--number 4380 --><!--number--><!--description -->Use correct SHA in `GetCommitPullRequest`<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4288) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4253)): <!--number 4288 --><!--number--><!--description - unknown git push options are rejected instead of being ignored-->Fixed: unknown git push options are rejected instead of being ignored.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4240): <!--number 4240 --><!--number--><!--description - markdown `[*[a]*](b)` [is incorrectly rendered as `<p><a href="b"><em>[a]</em></a></p>`](https://github.com/yuin/goldmark/issues/457)-->Fixed: markdown `[*[a]*](b)` [is incorrectly rendered as `<p><a href="b"><em>[a]</em></a></p>`](https://github.com/yuin/goldmark/issues/457).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4222): <!--number 4222 --><!--number--><!--description - markdown files displayed in the UI that have an unescaped backtick in the image alt [could (accidentally) trigger an inline code](https://github.com/yuin/goldmark/issues/456)-->Fixed: markdown files displayed in the UI that have an unescaped backtick in the image alt [could (accidentally) trigger an inline code](https://github.com/yuin/goldmark/issues/456).<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3562): <!--number 3562 --><!--number--><!--description -->Fixed: when the git repository is empty, it is not possible to unsubscribe from an issue.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3442): <!--number 3442 --><!--number--><!--description Save updated empty comments instead of skipping the update silently, [which prevented the removal of attachments of such comments](https://codeberg.org/forgejo/forgejo/issues/3424).-->Fixed: it is not possible to remove attachments from an empty comment.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3430): <!--number 3430 --><!--number--><!--description Fixed a bug where the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints were using a hardcoded "master" branch for the wiki, rather than the branch they really use.-->Fixed: the `/api/v1/repos/{owner}/{repo}/wiki` API endpoints is using a hardcoded "master" branch for the wiki, rather than the branch they really use.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3379): <!--number 3379 --><!--number--><!--description -->Fixed: using the API to search for users, the results are not paged by default an the default paging limits are not respected.<!--description-->
- **Localization**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4661) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4568)): <!--number 4661 --><!--number--><!--description -->24 July updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4565) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4451)): <!--number 4565 --><!--number--><!--description -->19 July updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4445) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4330)): <!--number 4445 --><!--number--><!--description -->11 July updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4316) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4251)): <!--number 4316 --><!--number--><!--description -->4 July updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4168): <!--number 4168 --><!--number--><!--description -->18 June updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4098): <!--number 4098 --><!--number--><!--description -->10 June updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3992): <!--number 3992 --><!--number--><!--description -->2 June updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3908): <!--number 3908 --><!--number--><!--description -->25 May updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3851): <!--number 3851 --><!--number--><!--description -->20 May updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3759): <!--number 3759 --><!--number--><!--description -->14 May updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3637): <!--number 3637 --><!--number--><!--description -->5 May updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3508): <!--number 3508 --><!--number--><!--description -->28 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3359): <!--number 3359 --><!--number--><!--description -->22 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3244): <!--number 3244 --><!--number--><!--description -->15 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3138): <!--number 3138 --><!--number--><!--description -->10 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/3064): <!--number 3064 --><!--number--><!--description -->5 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/2982): <!--number 2982 --><!--number--><!--description -->3 April updates<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/2937): <!--number 2937 --><!--number--><!--description -->31 March updates<!--description-->
<!--end release-notes-assistant-->
## 7.0.10
The Forgejo v7.0.10 release notes are [available in the v7.0.10 milestone](https://codeberg.org/forgejo/forgejo/milestone/8286).
## 7.0.9
The Forgejo v7.0.9 release notes are [available in the v7.0.9 milestone](https://codeberg.org/forgejo/forgejo/milestone/8232).
## 7.0.8
The Forgejo v7.0.8 release notes are [available in the v7.0.8 milestone](https://codeberg.org/forgejo/forgejo/milestone/7729).
## 7.0.7
The Forgejo v7.0.7 release notes are [available in the v7.0.7 milestone](https://codeberg.org/forgejo/forgejo/milestone/7683).
## 7.0.6
This is a bug fix release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/). In addition to the pull requests listed below, you will find a complete list in the [v7.0.6 milestone](https://codeberg.org/forgejo/forgejo/milestone/7252).
- Two frontend features were removed because a license incompatibility was discovered. [Read more in the companion blog post](https://forgejo.org/2024-07-non-free-dependency-found/).
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4679) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4670)): <!--number 4679 --><!--line 0 --><!--description W0NIT1JFXSBEb24ndCBidW5kbGUgYGVsa2pzYA==-->[Mermaid](https://mermaid.js.org/) rendering: `%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%` will now fail because [ELK](https://github.com/kieler/elkjs) is no longer included.<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4600) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4595)): <!--number 4600 --><!--line 0 --><!--description UmVwb3NpdG9yeSBjaXRhdGlvbjogUmVtb3ZlZCB0aGUgYWJpbGl0eSB0byBleHBvcnQgY2l0YXRpb25zIGluIEFQQSBmb3JtYXQuIFtSZWFkIG1vcmUgaW4gdGhlIGNvbXBhbmlvbiBibG9nIHBvc3RdKGh0dHBzOi8vZm9yZ2Vqby5vcmcvMjAyNC0wNy1ub24tZnJlZS1kZXBlbmRlbmN5LWZvdW5kLyk=-->Repository citation: Removed the ability to export citations in APA format.<!--description-->
- **User Interface bug fixes**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4593) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4571)): <!--number 4593 --><!--line 0 --><!--description UmVwbGFjZSBgdnVlLWJhci1ncmFwaGAgd2l0aCBgY2hhcnQuanNg-->Replace `vue-bar-graph` with `chart.js`<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4731) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4715)): <!--number 4731 --><!--line 0 --><!--description U2hvdyBBR2l0IGxhYmVsIG9uIG1lcmdlZCBQUg==-->Show AGit label on merged PR<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4424) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4382)): <!--number 4424 --><!--line 0 --><!--description Rml4IG1vYmlsZSBVSSBmb3Igb3JnYW5pc2F0aW9uIGNyZWF0aW9u-->Fix mobile UI for organisation creation<!--description-->
- **Bug fixes**
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4688) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4687)): <!--number 4688 --><!--line 0 --><!--description Zml4KGFwaSk6IGlzc3VlIHN0YXRlIGNoYW5nZSBpcyBub3QgaWRlbXBvdGVudA==-->fix(api): issue state change is not idempotent<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4647) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4638)): <!--number 4647 --><!--line 0 --><!--description UmVzZXJ2ZSB0aGUgYGRldnRlc3RgIHVzZXJuYW1l-->Reserve the `devtest` username<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4620) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4618)): <!--number 4620 --><!--line 0 --><!--description Zml4KGFjdGlvbnMpOiBubyBlZGl0ZWQgZXZlbnQgdHJpZ2dlcmVkIHdoZW4gYSB0aXRsZSBpcyBjaGFuZ2Vk-->fix(actions): no edited event triggered when a title is changed<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4528) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4523)): <!--number 4528 --><!--line 0 --><!--description TG9hZCBhdHRhY2htZW50cyBmb3IgYC9pc3N1ZXMvY29tbWVudHMve2lkfWA=-->Load attachments for `/issues/comments/{id}`<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4526) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/3379)): <!--number 4526 --><!--line 0 --><!--description V2hlbiBzZWFyY2hpbmcgZm9yIHVzZXJzLCBwYWdlIHRoZSByZXN1bHRzIGJ5IGRlZmF1bHQsIGFuZCByZXNwZWN0IHRoZSBkZWZhdWx0IHBhZ2luZyBsaW1pdHM=-->When searching for users, page the results by default, and respect the default paging limits<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4422) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4375)): <!--number 4422 --><!--line 0 --><!--description dGhlICJWaWV3IGNvbW1hbmQgbGluZSBpbnN0cnVjdGlvbnMiIGxpbmsgaW4gcHVsbCByZXF1ZXN0cyBhbmQgdGhlICJDb3B5IGNvbnRlbnQiIGJ1dHRvbiBpbiBmaWxlIGVkaXRvciBhcmUgbm90IGFjY2Vzc2libGU=-->the "View command line instructions" link in pull requests and the "Copy content" button in file editor are not accessible<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4379) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4377)): <!--number 4379 --><!--line 0 --><!--description VXNlIGNvcnJlY3QgU0hBIGluIGBHZXRDb21taXRQdWxsUmVxdWVzdGA=-->Use correct SHA in `GetCommitPullRequest`<!--description-->
- Localization
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4594) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4451)): <!--number 4594 --><!--line 0 --><!--description VXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIFdlYmxhdGU=-->Update of translations from Weblate<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4447): <!--number 4447 --><!--line 0 --><!--description VXBkYXRlIG9mIHRyYW5zbGF0aW9ucyBmcm9tIFdlYmxhdGU=-->Update of translations from Weblate<!--description-->
- [PR](https://codeberg.org/forgejo/forgejo/pulls/4420) ([backported from](https://codeberg.org/forgejo/forgejo/pulls/4098)): <!--number 4420 --><!--line 0 --><!--description MyB0cmFuc2xhdGlvbiB1cGRhdGVzIGZyb20gV2VibGF0ZQ==-->3 translation updates from Weblate - [PR 1](https://codeberg.org/forgejo/forgejo/pulls/4098), [PR 2](https://codeberg.org/forgejo/forgejo/pulls/4168), [PR 3](https://codeberg.org/forgejo/forgejo/pulls/4251)<!--description-->
## 7.0.5
This is a security release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/).
In addition to the following notable bug fixes, you can browse the [full list of pull requests](https://codeberg.org/forgejo/forgejo/pulls?milestone=6654) included in this release.
* **regreSSHion**
Recommended action when running Forgejo from a:
* binary - upgrade the OpenSSH server that was installed independently.
* root OCI image - upgrade to [Forgejo 7.0.5](https://codeberg.org/forgejo/-/packages/container/forgejo/7.0.5).
* rootless OCI image - no upgrade is necessary.
[CVE-2024-6387](https://nvd.nist.gov/vuln/detail/CVE-2024-6387) also known as [regreSSHion](https://www.qualys.com/regresshion-cve-2024-6387/) is an Unauthenticated Remote Code Execution (RCE) vulnerability in OpenSSHs server (sshd) on glibc-based Linux systems. It is **strongly recommended** that an OpenSSH server installed independently of Forgejo is upgraded as soon as possible.
All Forgejo OCI root images, including [7.0.5](https://codeberg.org/forgejo/-/packages/container/forgejo/7.0.5) contain an OpenSSH server. They are based on https://alpinelinux.org/ which relies on https://musl.libc.org/ and not https://en.wikipedia.org/wiki/Glibc. As a precaution the [Forgejo v7.0.5 root OCI image](https://codeberg.org/forgejo/-/packages/container/forgejo/7.0.5) contains an [updated OpenSSH server](https://pkgs.alpinelinux.org/packages?name=openssh&branch=v3.19) patched for [CVE-2024-6387](https://nvd.nist.gov/vuln/detail/CVE-2024-6387).
The Forgejo OCI rootless images, including [7.0.5](https://codeberg.org/forgejo/-/packages/container/forgejo/7.0.5-rootless), do not contain an OpenSSH server, they rely on the internal Forgejo implementation of the SSH protocol.
* **Security:**
* Compiled with Go v1.22.5. Fixed: [CVE-2024-24791](https://nvd.nist.gov/vuln/detail/CVE-2024-24791) - [GO-2024-2963](https://pkg.go.dev/vuln/GO-2024-2963): Denial of service due to improper 100-continue handling in net/http. The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail. An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.
* **Bug fixes:**
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4059) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4194): Fixed: authentication Source Administration page wrongfully handles the "Custom URLs Instead of Default URLs" checkbox (missing checkbox, irrelevant fields).
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4151) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4149): Fixed: git push to an adopted repository fails.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4215) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4213) - [commit](https://codeberg.org/forgejo/forgejo/commit/4ed5044dea94872e025f585debf7a16e6bd6bbdb): Fixed: markdown doesn't render math within brackets
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4219) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4145) - [commit](https://codeberg.org/forgejo/forgejo/commit/9aa3ae955ff506d883737e576dd62f674a3ee372): Fixed: selecting the "No Project" filter in the issue/pull request list has no effect
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4248) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4241): Fixed: error 500 when processing crafted TIFF files.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4261) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4258): Fixed: wrong placeholder text in the form for adding repository collaborator.
## 7.0.4
This is a security release. See the documentation for more information on the [upgrade procedure](https://forgejo.org/docs/v7.0/admin/upgrade/).
In addition to the following notable bug fixes, you can browse the [full list of commits](https://codeberg.org/forgejo/forgejo/compare/v7.0.3...v7.0.4) included in this release.
* **Security:**
* [PR](https://codeberg.org/forgejo/forgejo/pulls/4054). Fixed: [CVE-2024-24789](https://pkg.go.dev/vuln/GO-2024-2888): the archive/zip package's handling of certain types of invalid zip files differs from the behavior of most zip implementations. This misalignment could be exploited to create an zip file with contents that vary depending on the implementation reading the file.
* [PR](https://codeberg.org/forgejo/forgejo/pulls/3639) - ([fix](https://codeberg.org/forgejo/forgejo/commit/1b088fade6c69e63843d1bdf402454c363b22ce2) & [test](https://codeberg.org/forgejo/forgejo/pulls/4032)). Fixed: the OAuth2 implementation does not always require authentication for public clients, a requirement of [RFC 6749 Section 10.2](https://datatracker.ietf.org/doc/html/rfc6749#section-10.2). A malicious client can impersonate another client and obtain access to protected resources if the impersonated client fails to, or is unable to, keep its client credentials confidential.
* **Bug fixes:**
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4086) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4085). Fixed: `forgejo migrate-storage --type actions-artifacts` always fails because it picks the wrong path.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4017) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4015). Fixed: avatar files can be found in storage while they do not exist in the database.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3997) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3976). Fixed: repository admins are always denied the right to force merge and instance admins are subject to restrictions to merge that must only apply to repository admins.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3946) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3615). Fixed: non conformance with the [Nix tarball fetcher immutable link protocol](https://github.com/nixos/nix/blob/56763ff918eb308db23080e560ed2ea3e00c80a7/doc/manual/src/protocols/tarball-fetcher.md).
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3936) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3935). Fixed: migrated activities (such as reviews) are mapped to the user who initiated the migration rather than the Ghost user, if the external user cannot be mapped to a local one. This mapping mismatch leads to internal server errors in some cases.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3906) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3904). Fixed: a v7.0.0 regression causes `[admin].SEND_NOTIFICATION_EMAIL_ON_NEW_USER=true` to always be ignored.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3888) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3865). Fixed: using a subquery for user deletion is a performance bottleneck when using mariadb 10 because only mariadb 11 takes advantage of the available index.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3887) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3885). Fixed: a v7.0.3 regression causes the expanding diffs in pull requests to fail with a 404 error.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3881) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3864). Fixed: SourceHut Builds webhook fail when the `triggers` field is used.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3877) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3242). Fixed: the label list rendering in the issue and pull request timeline is displayed on multiple lines instead of a single one.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4084) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4083) - [commit](https://codeberg.org/forgejo/forgejo/commit/c6e04c3c9eddfa6c4bec541f681c8d300b157cdb). Fixed: NuGet Package fails `choco info pkgname` when `pkgname` is also a substring of another package Id.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4004) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3989) - [commit](https://codeberg.org/forgejo/forgejo/commit/62448bfb931882859388b2fd472cb89428c25323). Fixed: "Git hooks of this repository seem to be broken." warning when pushing more than one branch at a time.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3942) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3917) - [commit](https://codeberg.org/forgejo/forgejo/commit/7d7ea45465d6cd1ea0ec549a71f67b4a8ff930cf). Fixed: automerge does not happen when the approval count reaches the required threshold.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3942) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3917) - [commit](https://codeberg.org/forgejo/forgejo/commit/a649610d6175d1994b838f5672261400df9fdb92). Fixed: the `FORCE_PRIVATE=true` setting is not consistently enforced.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/3859) - [PR](https://codeberg.org/forgejo/forgejo/pulls/3838) - [commit](https://codeberg.org/forgejo/forgejo/commit/193ac67176afc72e9d108bc1730c354bfbf9a442). Fixed: CSRF validation errors when OAuth is not enabled.
* [backport](https://codeberg.org/forgejo/forgejo/pulls/4107) - [PR](https://codeberg.org/forgejo/forgejo/pulls/4076). Fixed: headlines in rendered org-mode do not have a margin on the top
* **Localization:**
* Improvements to English locale: [[1]](https://codeberg.org/forgejo/forgejo/pulls/3914), [[2]](https://codeberg.org/forgejo/forgejo/pulls/4114).
* Translation updates: [[1]](https://codeberg.org/forgejo/forgejo/pulls/3907), [[2]](https://codeberg.org/forgejo/forgejo/pulls/3990), [[3]](https://codeberg.org/forgejo/forgejo/pulls/4099).
## 7.0.3
@ -111,7 +368,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/for
* `process-description` to `processDescription`
This allows for those endpoints to be scraped by services requiring prometheus style labels such as [grafana-agent](https://grafana.com/docs/agent/latest/).
* The repository description [imposes additional restrictions on what it contains](https://codeberg.org/forgejo/forgejo/commit/1075ff74b5050f671c5f9824ae39390230b3c85d) to prevent abuse. You may use [the v7.0 test instance](https://v7.next.forgejo.org/) to check how it will be modified.
* The [Gitea themes were renamed](https://codeberg.org/forgejo/forgejo/commit/023e937141dd891bce3370c869d4db2c60f971ed) and the `[ui].THEMES` setting must be changed as follows:
* The [Gitea themes were renamed](https://codeberg.org/forgejo/forgejo/commit/023e937141dd891bce3370c869d4db2c60f971ed) and the `[ui].THEMES` setting must be changed as follows:
* `gitea` is replaced by `gitea-light`
* `arc-green` is replaced by `gitea-dark`
* `auto` is replaced by `gitea-auto`
@ -544,6 +801,28 @@ $ git -C forgejo log --oneline --no-merges origin/v1.21/forgejo..origin/v7.0/for
* [Align ISSUE_TEMPLATE with the new label system](https://codeberg.org/forgejo/forgejo/commit/248b7ee850ecdb538b22ddcfbe80b6f91be32b70).
* [Improve the list header in milestone page](https://codeberg.org/forgejo/forgejo/commit/8abc1aae4ab5b03be0bcbdd390bb903b54ccd21a).
## 1.21.11-2
[The complete list of new commits included in the Forgejo v1.21.11-2 release can be reviewed here](https://codeberg.org/forgejo/forgejo/compare/v1.21.11-1...v1.21.11-2), or from the command line with:
```shell
$ git clone https://codeberg.org/forgejo/forgejo
$ git -C forgejo log --oneline --no-merges v1.21.11-1..v1.21.11-2
```
This stable release contains a **security fix**.
* Recommended Action
We recommend that all Forgejo installations are [upgraded](https://forgejo.org/docs/v1.21/admin/upgrade/) to the latest version as soon as possible.
* [Forgejo Semantic Version](https://forgejo.org/docs/v1.21/user/semver/)
The semantic version was updated to `6.0.13+0-gitea-1.21.10`
* Security fix
* [PR](https://codeberg.org/forgejo/forgejo/pulls/4047). Fixed: the OAuth2 implementation does not always require authentication for public clients, a requirement of [RFC 6749 Section 10.2](https://datatracker.ietf.org/doc/html/rfc6749#section-10.2). A malicious client can impersonate another client and obtain access to protected resources if the impersonated client fails to, or is unable to, keep its client credentials confidential.
## 1.21.11-1
This stable release contains a single bug fix for a regression introduced in v1.21.11-0 by which creating a tag via the API would fail with error 500 on a repository a where Forgejo Actions workflow triggered by tags exists.
@ -1974,7 +2253,7 @@ This stable release includes a security fix for `git` and bug fixes.
### Git
Git [recently announced](https://github.blog/2023-02-14-git-security-vulnerabilities-announced-3/) new versions to address two CVEs ([CVE-2023-22490](https://cve.circl.lu/cve/CVE-2023-22490), [CVE-2023-23946](https://cve.circl.lu/cve/CVE-2023-23946)). On 14 Februrary 2023, Git published the maintenance release v2.39.2, together with releases for older maintenance tracks v2.38.4, v2.37.6, v2.36.5, v2.35.7, v2.34.7, v2.33.7, v2.32.6, v2.31.7, and v2.30.8. All major GNU/Linux distributions also provide updated packages via their security update channels.
Git [recently announced](https://github.blog/2023-02-14-git-security-vulnerabilities-announced-3/) new versions to address two CVEs ([CVE-2023-22490](https://cve.circl.lu/cve/CVE-2023-22490), [CVE-2023-23946](https://cve.circl.lu/cve/CVE-2023-23946)). On 14 February 2023, Git published the maintenance release v2.39.2, together with releases for older maintenance tracks v2.38.4, v2.37.6, v2.36.5, v2.35.7, v2.34.7, v2.33.7, v2.32.6, v2.31.7, and v2.30.8. All major GNU/Linux distributions also provide updated packages via their security update channels.
We recommend that all installations running a version affected by the issues described below are upgraded to the latest version as soon as possible.

230
assets/go-licenses.json generated

File diff suppressed because one or more lines are too long

View file

@ -7,6 +7,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestFormatImportsSimple(t *testing.T) {
@ -29,7 +30,7 @@ import (
)
`
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, expected, string(formatted))
}
@ -92,7 +93,7 @@ import (
)
`
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, expected, string(formatted))
}
@ -120,5 +121,5 @@ import (
"image/gif"
)
`))
assert.ErrorIs(t, err, errInvalidCommentBetweenImports)
require.ErrorIs(t, err, errInvalidCommentBetweenImports)
}

View file

@ -53,8 +53,6 @@ func (e Emoji) MarshalJSON() ([]byte, error) {
}
func main() {
var err error
flag.Parse()
// generate data
@ -83,8 +81,6 @@ var replacer = strings.NewReplacer(
var emojiRE = regexp.MustCompile(`\{Emoji:"([^"]*)"`)
func generate() ([]byte, error) {
var err error
// load gemoji data
res, err := http.Get(gemojiURL)
if err != nil {

View file

@ -77,6 +77,20 @@ func main() {
sort.Strings(paths)
var entries []LicenseEntry
{
licenseText, err := os.ReadFile("LICENSE")
if err != nil {
panic(err)
}
entries = append(entries, LicenseEntry{
Name: "codeberg.org/forgejo/forgejo",
Path: "codeberg.org/forgejo/forgejo/GPL-3.0-or-later",
LicenseText: string(licenseText),
})
}
for _, filePath := range paths {
licenseText, err := os.ReadFile(filePath)
if err != nil {

156
build/lint-locale.go Normal file
View file

@ -0,0 +1,156 @@
// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//nolint:forbidigo
package main
import (
"fmt"
"html"
"io/fs"
"os"
"path/filepath"
"regexp"
"slices"
"strings"
"github.com/microcosm-cc/bluemonday"
"github.com/sergi/go-diff/diffmatchpatch"
"gopkg.in/ini.v1" //nolint:depguard
)
var (
policy *bluemonday.Policy
tagRemover *strings.Replacer
safeURL = "https://TO-BE-REPLACED.COM"
// Matches href="", href="#", href="%s", href="#%s", href="%[1]s" and href="#%[1]s".
placeHolderRegex = regexp.MustCompile(`href="#?(%s|%\[\d\]s)?"`)
)
func initBlueMondayPolicy() {
policy = bluemonday.NewPolicy()
policy.RequireParseableURLs(true)
policy.AllowURLSchemes("https")
// Only allow safe URL on href.
// Only allow target="_blank".
// Only allow rel="nopener noreferrer", rel="noopener" and rel="noreferrer".
// Only allow placeholder on id and class.
policy.AllowAttrs("href").Matching(regexp.MustCompile("^" + regexp.QuoteMeta(safeURL) + "$")).OnElements("a")
policy.AllowAttrs("target").Matching(regexp.MustCompile("^_blank$")).OnElements("a")
policy.AllowAttrs("rel").Matching(regexp.MustCompile("^(noopener|noreferrer|noopener noreferrer)$")).OnElements("a")
policy.AllowAttrs("id", "class").Matching(regexp.MustCompile(`^%s|%\[\d\]s$`)).OnElements("a")
// Only allow positional placeholder as class.
positionalPlaceholderRe := regexp.MustCompile(`^%\[\d\]s$`)
policy.AllowAttrs("class").Matching(positionalPlaceholderRe).OnElements("strong")
policy.AllowAttrs("id").Matching(positionalPlaceholderRe).OnElements("code")
// Allowed elements with no attributes. Must be a recognized tagname.
policy.AllowElements("strong", "br", "b", "strike", "code", "i")
// TODO: Remove <c> in `actions.workflow.dispatch.trigger_found`.
policy.AllowNoAttrs().OnElements("c")
}
func initRemoveTags() {
oldnew := []string{}
for _, el := range []string{
"email@example.com", "correu@example.com", "epasts@domens.lv", "email@exemplo.com", "eposta@ornek.com", "email@példa.hu", "email@esempio.it",
"user", "utente", "lietotājs", "gebruiker", "usuário", "Benutzer", "Bruker",
"server", "servidor", "kiszolgáló", "serveris",
"label", "etichetta", "etiķete", "rótulo", "Label", "utilizador",
"filename", "bestandsnaam", "dosyaadi", "fails", "nome do arquivo",
} {
oldnew = append(oldnew, "<"+el+">", "REPLACED-TAG")
}
tagRemover = strings.NewReplacer(oldnew...)
}
func preprocessTranslationValue(value string) string {
// href should be a parsable URL, replace placeholder strings with a safe url.
value = placeHolderRegex.ReplaceAllString(value, `href="`+safeURL+`"`)
// Remove tags that aren't tags but will be parsed as tags. We already know they are safe and sound.
value = tagRemover.Replace(value)
return value
}
func checkLocaleContent(localeContent []byte) []string {
// Same configuration as Forgejo uses.
cfg := ini.Empty(ini.LoadOptions{
IgnoreContinuation: true,
})
cfg.NameMapper = ini.SnackCase
if err := cfg.Append(localeContent); err != nil {
panic(err)
}
dmp := diffmatchpatch.New()
errors := []string{}
for _, section := range cfg.Sections() {
for _, key := range section.Keys() {
var trKey string
if section.Name() == "" || section.Name() == "DEFAULT" || section.Name() == "common" {
trKey = key.Name()
} else {
trKey = section.Name() + "." + key.Name()
}
keyValue := preprocessTranslationValue(key.Value())
if html.UnescapeString(policy.Sanitize(keyValue)) != keyValue {
// Create a nice diff of the difference.
diffs := dmp.DiffMain(keyValue, html.UnescapeString(policy.Sanitize(keyValue)), false)
diffs = dmp.DiffCleanupSemantic(diffs)
diffs = dmp.DiffCleanupEfficiency(diffs)
errors = append(errors, trKey+": "+dmp.DiffPrettyText(diffs))
}
}
}
return errors
}
func main() {
initBlueMondayPolicy()
initRemoveTags()
localeDir := filepath.Join("options", "locale")
localeFiles, err := os.ReadDir(localeDir)
if err != nil {
panic(err)
}
if !slices.ContainsFunc(localeFiles, func(e fs.DirEntry) bool { return strings.HasSuffix(e.Name(), ".ini") }) {
fmt.Println("No locale files found")
os.Exit(1)
}
exitCode := 0
for _, localeFile := range localeFiles {
if !strings.HasSuffix(localeFile.Name(), ".ini") {
continue
}
localeContent, err := os.ReadFile(filepath.Join(localeDir, localeFile.Name()))
if err != nil {
panic(err)
}
if err := checkLocaleContent(localeContent); len(err) > 0 {
fmt.Println(localeFile.Name())
fmt.Println(strings.Join(err, "\n"))
fmt.Println()
exitCode = 1
}
}
os.Exit(exitCode)
}

65
build/lint-locale_test.go Normal file
View file

@ -0,0 +1,65 @@
// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLocalizationPolicy(t *testing.T) {
initBlueMondayPolicy()
initRemoveTags()
t.Run("Remove tags", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`hidden_comment_types_description = Comment types checked here will not be shown inside issue pages. Checking "Label" for example removes all "<user> added/removed <label>" comments.`)))
assert.EqualValues(t, []string{"key: \x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<not-an-allowed-key> <label>"`)))
assert.EqualValues(t, []string{"key: \x1b[31m<user@example.com>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<user@example.com> <email@example.com>"`)))
assert.EqualValues(t, []string{"key: \x1b[31m<tag>\x1b[0m REPLACED-TAG \x1b[31m</tag>\x1b[0m"}, checkLocaleContent([]byte(`key = "<tag> <email@example.com> </tag>"`)))
})
t.Run("Specific exception", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`workflow.dispatch.trigger_found = This workflow has a <c>workflow_dispatch</c> event trigger.`)))
assert.Empty(t, checkLocaleContent([]byte(`pulls.title_desc_one = wants to merge %[1]d commit from <code>%[2]s</code> into <code id="%[4]s">%[3]s</code>`)))
assert.Empty(t, checkLocaleContent([]byte(`editor.commit_directly_to_this_branch = Commit directly to the <strong class="%[2]s">%[1]s</strong> branch.`)))
assert.EqualValues(t, []string{"workflow.dispatch.trigger_found: This workflow has a \x1b[31m<d>\x1b[0mworkflow_dispatch\x1b[31m</d>\x1b[0m event trigger."}, checkLocaleContent([]byte(`workflow.dispatch.trigger_found = This workflow has a <d>workflow_dispatch</d> event trigger.`)))
assert.EqualValues(t, []string{"key: <code\x1b[31m id=\"branch_targe\"\x1b[0m>%[3]s</code>"}, checkLocaleContent([]byte(`key = <code id="branch_targe">%[3]s</code>`)))
assert.EqualValues(t, []string{"key: <a\x1b[31m class=\"ui sh\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="ui sh" href="%[3]s">`)))
assert.EqualValues(t, []string{"key: <a\x1b[31m class=\"js-click-me\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="js-click-me" href="%[3]s">`)))
assert.EqualValues(t, []string{"key: <strong\x1b[31m class=\"branch-target\"\x1b[0m>%[1]s</strong>"}, checkLocaleContent([]byte(`key = <strong class="branch-target">%[1]s</strong>`)))
})
t.Run("General safe tags", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte("error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.")))
assert.Empty(t, checkLocaleContent([]byte("teams.specific_repositories_helper = Members will only have access to repositories explicitly added to the team. Selecting this <strong>will not</strong> automatically remove repositories already added with <i>All repositories</i>.")))
assert.Empty(t, checkLocaleContent([]byte("sqlite_helper = File path for the SQLite3 database.<br>Enter an absolute path if you run Forgejo as a service.")))
assert.Empty(t, checkLocaleContent([]byte("hi_user_x = Hi <b>%s</b>,")))
assert.EqualValues(t, []string{"error404: The page you are trying to reach either <strong\x1b[31m title='aaa'\x1b[0m>does not exist</strong> or <strong>you are not authorized</strong> to view it."}, checkLocaleContent([]byte("error404 = The page you are trying to reach either <strong title='aaa'>does not exist</strong> or <strong>you are not authorized</strong> to view it.")))
})
t.Run("<a>", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`admin.new_user.text = Please <a href="%s">click here</a> to manage this user from the admin panel.`)))
assert.Empty(t, checkLocaleContent([]byte(`access_token_desc = Selected token permissions limit authorization only to the corresponding <a href="%[1]s" target="_blank">API</a> routes. Read the <a href="%[2]s" target="_blank">documentation</a> for more information.`)))
assert.Empty(t, checkLocaleContent([]byte(`webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the <a rel="noreferrer" target="_blank" href="%s">WebAuthn Authenticator</a> standard.`)))
assert.Empty(t, checkLocaleContent([]byte("issues.closed_at = `closed this issue <a id=\"%[1]s\" href=\"#%[1]s\">%[2]s</a>`")))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"javascript:alert('1')\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="javascript:alert('1')">`)))
assert.EqualValues(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m download\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" download>`)))
assert.EqualValues(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m target=\"_self\"\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" target="_self">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com/%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/%s">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com/?q=%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/?q=%s">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"%s/open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s/open-redirect">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"%s?q=open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s?q=open-redirect">`)))
})
t.Run("Escaped HTML characters", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte("activity.git_stats_push_to_branch = `إلى %s و\"`")))
assert.EqualValues(t, []string{"key: و\x1b[31m&nbsp\x1b[0m\x1b[32m\u00a0\x1b[0m"}, checkLocaleContent([]byte(`key = و&nbsp;`)))
})
}

View file

@ -386,7 +386,7 @@ func (a *authService) addLdapSimpleAuth(c *cli.Context) error {
return a.createAuthSource(ctx, authSource)
}
// updateLdapBindDn updates a new LDAP (simple auth) authentication source.
// updateLdapSimpleAuth updates a new LDAP (simple auth) authentication source.
func (a *authService) updateLdapSimpleAuth(c *cli.Context) error {
ctx, cancel := installSignals()
defer cancel()

View file

@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/services/auth/source/ldap"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
)
@ -234,7 +235,7 @@ func TestAddLdapBindDn(t *testing.T) {
if c.errMsg != "" {
assert.EqualError(t, err, c.errMsg, "case %d: error should match", n)
} else {
assert.NoError(t, err, "case %d: should have no errors", n)
require.NoError(t, err, "case %d: should have no errors", n)
assert.Equal(t, c.source, createdAuthSource, "case %d: wrong authSource", n)
}
}
@ -465,7 +466,7 @@ func TestAddLdapSimpleAuth(t *testing.T) {
if c.errMsg != "" {
assert.EqualError(t, err, c.errMsg, "case %d: error should match", n)
} else {
assert.NoError(t, err, "case %d: should have no errors", n)
require.NoError(t, err, "case %d: should have no errors", n)
assert.Equal(t, c.authSource, createdAuthSource, "case %d: wrong authSource", n)
}
}
@ -928,7 +929,7 @@ func TestUpdateLdapBindDn(t *testing.T) {
if c.errMsg != "" {
assert.EqualError(t, err, c.errMsg, "case %d: error should match", n)
} else {
assert.NoError(t, err, "case %d: should have no errors", n)
require.NoError(t, err, "case %d: should have no errors", n)
assert.Equal(t, c.authSource, updatedAuthSource, "case %d: wrong authSource", n)
}
}
@ -1318,7 +1319,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) {
if c.errMsg != "" {
assert.EqualError(t, err, c.errMsg, "case %d: error should match", n)
} else {
assert.NoError(t, err, "case %d: should have no errors", n)
require.NoError(t, err, "case %d: should have no errors", n)
assert.Equal(t, c.authSource, updatedAuthSource, "case %d: wrong authSource", n)
}
}

View file

@ -10,7 +10,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/services/doctor"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
)
@ -25,9 +25,9 @@ func TestDoctorRun(t *testing.T) {
app := cli.NewApp()
app.Commands = []*cli.Command{cmdDoctorCheck}
err := app.Run([]string{"./gitea", "check", "--run", "test-check"})
assert.NoError(t, err)
require.NoError(t, err)
err = app.Run([]string{"./gitea", "check", "--run", "no-such"})
assert.ErrorContains(t, err, `unknown checks: "no-such"`)
require.ErrorContains(t, err, `unknown checks: "no-such"`)
err = app.Run([]string{"./gitea", "check", "--run", "test-check,no-such"})
assert.ErrorContains(t, err, `unknown checks: "no-such"`)
require.ErrorContains(t, err, `unknown checks: "no-such"`)
}

View file

@ -20,7 +20,7 @@ import (
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/util"
"gitea.com/go-chi/session"
"code.forgejo.org/go-chi/session"
"github.com/mholt/archiver/v3"
"github.com/urfave/cli/v2"
)

View file

@ -10,6 +10,7 @@ import (
"github.com/mholt/archiver/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
type mockArchiver struct {
@ -35,29 +36,29 @@ func TestAddRecursiveExclude(t *testing.T) {
archiver := &mockArchiver{}
err := addRecursiveExclude(archiver, "", dir, []string{}, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Empty(t, archiver.addedFiles)
})
t.Run("Single file", func(t *testing.T) {
dir := t.TempDir()
err := os.WriteFile(dir+"/example", nil, 0o666)
assert.NoError(t, err)
require.NoError(t, err)
t.Run("No exclude", func(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, nil, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, archiver.addedFiles, 1)
assert.EqualValues(t, "example", archiver.addedFiles[0])
assert.Contains(t, archiver.addedFiles, "example")
})
t.Run("With exclude", func(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, []string{dir + "/example"}, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Empty(t, archiver.addedFiles)
})
})
@ -65,30 +66,30 @@ func TestAddRecursiveExclude(t *testing.T) {
t.Run("File inside directory", func(t *testing.T) {
dir := t.TempDir()
err := os.MkdirAll(dir+"/deep/nested/folder", 0o750)
assert.NoError(t, err)
require.NoError(t, err)
err = os.WriteFile(dir+"/deep/nested/folder/example", nil, 0o666)
assert.NoError(t, err)
require.NoError(t, err)
err = os.WriteFile(dir+"/deep/nested/folder/another-file", nil, 0o666)
assert.NoError(t, err)
require.NoError(t, err)
t.Run("No exclude", func(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, nil, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, archiver.addedFiles, 5)
assert.EqualValues(t, "deep", archiver.addedFiles[0])
assert.EqualValues(t, "deep/nested", archiver.addedFiles[1])
assert.EqualValues(t, "deep/nested/folder", archiver.addedFiles[2])
assert.EqualValues(t, "deep/nested/folder/example", archiver.addedFiles[3])
assert.EqualValues(t, "deep/nested/folder/another-file", archiver.addedFiles[4])
assert.Contains(t, archiver.addedFiles, "deep")
assert.Contains(t, archiver.addedFiles, "deep/nested")
assert.Contains(t, archiver.addedFiles, "deep/nested/folder")
assert.Contains(t, archiver.addedFiles, "deep/nested/folder/example")
assert.Contains(t, archiver.addedFiles, "deep/nested/folder/another-file")
})
t.Run("Exclude first directory", func(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, []string{dir + "/deep"}, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Empty(t, archiver.addedFiles)
})
@ -96,22 +97,22 @@ func TestAddRecursiveExclude(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, []string{dir + "/deep/nested/folder"}, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, archiver.addedFiles, 2)
assert.EqualValues(t, "deep", archiver.addedFiles[0])
assert.EqualValues(t, "deep/nested", archiver.addedFiles[1])
assert.Contains(t, archiver.addedFiles, "deep")
assert.Contains(t, archiver.addedFiles, "deep/nested")
})
t.Run("Exclude file", func(t *testing.T) {
archiver := &mockArchiver{}
err = addRecursiveExclude(archiver, "", dir, []string{dir + "/deep/nested/folder/example"}, false)
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, archiver.addedFiles, 4)
assert.EqualValues(t, "deep", archiver.addedFiles[0])
assert.EqualValues(t, "deep/nested", archiver.addedFiles[1])
assert.EqualValues(t, "deep/nested/folder", archiver.addedFiles[2])
assert.EqualValues(t, "deep/nested/folder/another-file", archiver.addedFiles[3])
assert.Contains(t, archiver.addedFiles, "deep")
assert.Contains(t, archiver.addedFiles, "deep/nested")
assert.Contains(t, archiver.addedFiles, "deep/nested/folder")
assert.Contains(t, archiver.addedFiles, "deep/nested/folder/another-file")
})
})
}

View file

@ -86,6 +86,11 @@ func SubcmdActionsRegister(ctx context.Context) *cli.Command {
Value: "",
Usage: "comma separated list of labels supported by the runner (e.g. docker,ubuntu-latest,self-hosted) (not required since v1.21)",
},
&cli.BoolFlag{
Name: "keep-labels",
Value: false,
Usage: "do not affect the labels when updating an existing runner",
},
&cli.StringFlag{
Name: "name",
Value: "runner",
@ -133,9 +138,20 @@ func validateSecret(secret string) error {
return nil
}
func getLabels(cliCtx *cli.Context) (*[]string, error) {
if !cliCtx.Bool("keep-labels") {
lblValue := strings.Split(cliCtx.String("labels"), ",")
return &lblValue, nil
}
if cliCtx.String("labels") != "" {
return nil, fmt.Errorf("--labels and --keep-labels should not be used together")
}
return nil, nil
}
func RunRegister(ctx context.Context, cliCtx *cli.Context) error {
var cancel context.CancelFunc
if !ContextGetNoInit(ctx) {
var cancel context.CancelFunc
ctx, cancel = installSignals(ctx)
defer cancel()
@ -153,9 +169,12 @@ func RunRegister(ctx context.Context, cliCtx *cli.Context) error {
return err
}
scope := cliCtx.String("scope")
labels := cliCtx.String("labels")
name := cliCtx.String("name")
version := cliCtx.String("version")
labels, err := getLabels(cliCtx)
if err != nil {
return err
}
//
// There are two kinds of tokens
@ -179,7 +198,7 @@ func RunRegister(ctx context.Context, cliCtx *cli.Context) error {
return err
}
runner, err := actions_model.RegisterRunner(ctx, owner, repo, secret, strings.Split(labels, ","), name, version)
runner, err := actions_model.RegisterRunner(ctx, owner, repo, secret, labels, name, version)
if err != nil {
return fmt.Errorf("error while registering runner: %v", err)
}

View file

@ -0,0 +1,88 @@
// Copyright The Forgejo Authors.
// SPDX-License-Identifier: MIT
package forgejo
import (
"fmt"
"testing"
"code.gitea.io/gitea/services/context"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
)
func TestActions_getLabels(t *testing.T) {
type testCase struct {
args []string
hasLabels bool
hasError bool
labels []string
}
type resultType struct {
labels *[]string
err error
}
cases := []testCase{
{
args: []string{"x"},
hasLabels: true,
hasError: false,
labels: []string{""},
}, {
args: []string{"x", "--labels", "a,b"},
hasLabels: true,
hasError: false,
labels: []string{"a", "b"},
}, {
args: []string{"x", "--keep-labels"},
hasLabels: false,
hasError: false,
}, {
args: []string{"x", "--keep-labels", "--labels", "a,b"},
hasLabels: false,
hasError: true,
}, {
// this edge-case exists because that's what actually happens
// when no '--labels ...' options are present
args: []string{"x", "--keep-labels", "--labels", ""},
hasLabels: false,
hasError: false,
},
}
flags := SubcmdActionsRegister(context.Context{}).Flags
for _, c := range cases {
t.Run(fmt.Sprintf("args: %v", c.args), func(t *testing.T) {
// Create a copy of command to test
var result *resultType
app := cli.NewApp()
app.Flags = flags
app.Action = func(ctx *cli.Context) error {
labels, err := getLabels(ctx)
result = &resultType{labels, err}
return nil
}
// Run it
_ = app.Run(c.args)
// Test the results
require.NotNil(t, result)
if c.hasLabels {
assert.NotNil(t, result.labels)
assert.Equal(t, c.labels, *result.labels)
} else {
assert.Nil(t, result.labels)
}
if c.hasError {
require.Error(t, result.err)
} else {
assert.NoError(t, result.err)
}
})
}
}

77
cmd/forgejo/f3.go Normal file
View file

@ -0,0 +1,77 @@
// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// SPDX-License-Identifier: MIT
package forgejo
import (
"context"
"errors"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/services/f3/util"
_ "code.gitea.io/gitea/services/f3/driver" // register the driver
f3_cmd "code.forgejo.org/f3/gof3/v3/cmd"
f3_logger "code.forgejo.org/f3/gof3/v3/logger"
f3_util "code.forgejo.org/f3/gof3/v3/util"
"github.com/urfave/cli/v2"
)
func CmdF3(ctx context.Context) *cli.Command {
ctx = f3_logger.ContextSetLogger(ctx, util.NewF3Logger(nil, log.GetLogger(log.DEFAULT)))
return &cli.Command{
Name: "f3",
Usage: "F3",
Subcommands: []*cli.Command{
SubcmdF3Mirror(ctx),
},
}
}
func SubcmdF3Mirror(ctx context.Context) *cli.Command {
mirrorCmd := f3_cmd.CreateCmdMirror(ctx)
mirrorCmd.Before = prepareWorkPathAndCustomConf(ctx)
f3Action := mirrorCmd.Action
mirrorCmd.Action = func(c *cli.Context) error { return runMirror(ctx, c, f3Action) }
return mirrorCmd
}
func runMirror(ctx context.Context, c *cli.Context, action cli.ActionFunc) error {
setting.LoadF3Setting()
if !setting.F3.Enabled {
return errors.New("F3 is disabled, it is not ready to be used and is only present for development purposes")
}
var cancel context.CancelFunc
if !ContextGetNoInit(ctx) {
ctx, cancel = installSignals(ctx)
defer cancel()
if err := initDB(ctx); err != nil {
return err
}
if err := storage.Init(); err != nil {
return err
}
if err := git.InitSimple(ctx); err != nil {
return err
}
if err := models.Init(ctx); err != nil {
return err
}
}
err := action(c)
if panicError, ok := err.(f3_util.PanicError); ok {
log.Debug("F3 Stack trace\n%s", panicError.Stack())
}
return err
}

View file

@ -36,6 +36,7 @@ func CmdForgejo(ctx context.Context) *cli.Command {
Flags: []cli.Flag{},
Subcommands: []*cli.Command{
CmdActions(ctx),
CmdF3(ctx),
},
}
}

View file

@ -15,6 +15,7 @@ import (
"time"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/git/pushoptions"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/private"
repo_module "code.gitea.io/gitea/modules/repository"
@ -192,7 +193,7 @@ Forgejo or set your environment appropriately.`, "")
GitAlternativeObjectDirectories: os.Getenv(private.GitAlternativeObjectDirectories),
GitObjectDirectory: os.Getenv(private.GitObjectDirectory),
GitQuarantinePath: os.Getenv(private.GitQuarantinePath),
GitPushOptions: pushOptions(),
GitPushOptions: pushoptions.New().ReadEnv().Map(),
PullRequestID: prID,
DeployKeyID: deployKeyID,
ActionPerm: int(actionPerm),
@ -321,7 +322,8 @@ func runHookUpdate(c *cli.Context) error {
return fail(ctx, fmt.Sprintf("The deletion of %s is skipped as it's an internal reference.", refFullName), "")
}
return nil
// If the new comment isn't empty it means modification.
return fail(ctx, fmt.Sprintf("The modification of %s is skipped as it's an internal reference.", refFullName), "")
}
func runHookPostReceive(c *cli.Context) error {
@ -375,7 +377,7 @@ Forgejo or set your environment appropriately.`, "")
GitAlternativeObjectDirectories: os.Getenv(private.GitAlternativeObjectDirectories),
GitObjectDirectory: os.Getenv(private.GitObjectDirectory),
GitQuarantinePath: os.Getenv(private.GitQuarantinePath),
GitPushOptions: pushOptions(),
GitPushOptions: pushoptions.New().ReadEnv().Map(),
PullRequestID: prID,
PushTrigger: repo_module.PushTrigger(os.Getenv(repo_module.EnvPushTrigger)),
}
@ -488,21 +490,6 @@ func hookPrintResults(results []private.HookPostReceiveBranchResult) {
}
}
func pushOptions() map[string]string {
opts := make(map[string]string)
if pushCount, err := strconv.Atoi(os.Getenv(private.GitPushOptionCount)); err == nil {
for idx := 0; idx < pushCount; idx++ {
opt := os.Getenv(fmt.Sprintf("GIT_PUSH_OPTION_%d", idx))
key, value, found := strings.Cut(opt, "=")
if !found {
value = "true"
}
opts[key] = value
}
}
return opts
}
func runHookProcReceive(c *cli.Context) error {
ctx, cancel := installSignals()
defer cancel()
@ -549,14 +536,14 @@ Forgejo or set your environment appropriately.`, "")
index := bytes.IndexByte(rs.Data, byte(0))
if index >= len(rs.Data) {
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
}
if index < 0 {
if len(rs.Data) == 10 && rs.Data[9] == '\n' {
index = 9
} else {
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
}
}
@ -627,6 +614,7 @@ Forgejo or set your environment appropriately.`, "")
hookOptions.GitPushOptions = make(map[string]string)
if hasPushOptions {
pushOptions := pushoptions.NewFromMap(&hookOptions.GitPushOptions)
for {
rs, err = readPktLine(ctx, reader, pktLineTypeUnknown)
if err != nil {
@ -636,12 +624,7 @@ Forgejo or set your environment appropriately.`, "")
if rs.Type == pktLineTypeFlush {
break
}
key, value, found := strings.Cut(string(rs.Data), "=")
if !found {
value = "true"
}
hookOptions.GitPushOptions[key] = value
pushOptions.Parse(string(rs.Data))
}
}

View file

@ -15,7 +15,6 @@ import (
"testing"
"time"
"code.gitea.io/gitea/modules/private"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
@ -49,66 +48,66 @@ func TestPktLine(t *testing.T) {
s := strings.NewReader("0000")
r := bufio.NewReader(s)
result, err := readPktLine(ctx, r, pktLineTypeFlush)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, pktLineTypeFlush, result.Type)
s = strings.NewReader("0006a\n")
r = bufio.NewReader(s)
result, err = readPktLine(ctx, r, pktLineTypeData)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, pktLineTypeData, result.Type)
assert.Equal(t, []byte("a\n"), result.Data)
s = strings.NewReader("0004")
r = bufio.NewReader(s)
result, err = readPktLine(ctx, r, pktLineTypeData)
assert.Error(t, err)
require.Error(t, err)
assert.Nil(t, result)
data := strings.Repeat("x", 65516)
r = bufio.NewReader(strings.NewReader("fff0" + data))
result, err = readPktLine(ctx, r, pktLineTypeData)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, pktLineTypeData, result.Type)
assert.Equal(t, []byte(data), result.Data)
r = bufio.NewReader(strings.NewReader("fff1a"))
result, err = readPktLine(ctx, r, pktLineTypeData)
assert.Error(t, err)
require.Error(t, err)
assert.Nil(t, result)
})
t.Run("Write", func(t *testing.T) {
w := bytes.NewBuffer([]byte{})
err := writeFlushPktLine(ctx, w)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, []byte("0000"), w.Bytes())
w.Reset()
err = writeDataPktLine(ctx, w, []byte("a\nb"))
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, []byte("0007a\nb"), w.Bytes())
w.Reset()
data := bytes.Repeat([]byte{0x05}, 288)
err = writeDataPktLine(ctx, w, data)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, append([]byte("0124"), data...), w.Bytes())
w.Reset()
err = writeDataPktLine(ctx, w, nil)
assert.Error(t, err)
require.Error(t, err)
assert.Empty(t, w.Bytes())
w.Reset()
data = bytes.Repeat([]byte{0x64}, 65516)
err = writeDataPktLine(ctx, w, data)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, append([]byte("fff0"), data...), w.Bytes())
w.Reset()
err = writeDataPktLine(ctx, w, bytes.Repeat([]byte{0x64}, 65516+1))
assert.Error(t, err)
require.Error(t, err)
assert.Empty(t, w.Bytes())
})
}
@ -118,7 +117,7 @@ func TestDelayWriter(t *testing.T) {
defer test.MockVariableValue(&setting.InternalToken, "Random")()
defer test.MockVariableValue(&setting.InstallLock, true)()
defer test.MockVariableValue(&setting.Git.VerbosePush, true)()
require.NoError(t, os.Setenv("SSH_ORIGINAL_COMMAND", "true"))
t.Setenv("SSH_ORIGINAL_COMMAND", "true")
// Setup the Stdin.
f, err := os.OpenFile(t.TempDir()+"/stdin", os.O_RDWR|os.O_CREATE|os.O_EXCL, 0o666)
@ -164,20 +163,6 @@ func TestDelayWriter(t *testing.T) {
})
}
func TestPushOptions(t *testing.T) {
require.NoError(t, os.Setenv(private.GitPushOptionCount, "3"))
require.NoError(t, os.Setenv("GIT_PUSH_OPTION_0", "force-push"))
require.NoError(t, os.Setenv("GIT_PUSH_OPTION_1", "option=value"))
require.NoError(t, os.Setenv("GIT_PUSH_OPTION_2", "option-double=another=value"))
require.NoError(t, os.Setenv("GIT_PUSH_OPTION_3", "not=valid"))
assert.Equal(t, map[string]string{
"force-push": "true",
"option": "value",
"option-double": "another=value",
}, pushOptions())
}
func TestRunHookUpdate(t *testing.T) {
app := cli.NewApp()
app.Commands = []*cli.Command{subcmdHookUpdate}
@ -189,23 +174,30 @@ func TestRunHookUpdate(t *testing.T) {
err := app.Run([]string{"./forgejo", "update", "refs/pull/1/head", "0a51ae26bc73c47e2f754560c40904cf14ed51a9", "0000000000000000000000000000000000000000"})
out := finish()
assert.Error(t, err)
require.Error(t, err)
assert.Contains(t, out, "The deletion of refs/pull/1/head is skipped as it's an internal reference.")
})
t.Run("Update of internal reference", func(t *testing.T) {
defer test.MockVariableValue(&cli.OsExiter, func(code int) {})()
defer test.MockVariableValue(&setting.IsProd, false)()
finish := captureOutput(t, os.Stderr)
err := app.Run([]string{"./forgejo", "update", "refs/pull/1/head", "0a51ae26bc73c47e2f754560c40904cf14ed51a9", "0000000000000000000000000000000000000001"})
assert.NoError(t, err)
out := finish()
require.Error(t, err)
assert.Contains(t, out, "The modification of refs/pull/1/head is skipped as it's an internal reference.")
})
t.Run("Removal of branch", func(t *testing.T) {
err := app.Run([]string{"./forgejo", "update", "refs/head/main", "0a51ae26bc73c47e2f754560c40904cf14ed51a9", "0000000000000000000000000000000000000000"})
assert.NoError(t, err)
require.NoError(t, err)
})
t.Run("Not enough arguments", func(t *testing.T) {
err := app.Run([]string{"./forgejo", "update"})
assert.NoError(t, err)
require.NoError(t, err)
})
}

View file

@ -124,6 +124,7 @@ func NewMainApp(version, versionExtra string) *cli.App {
var subCmdsStandalone []*cli.Command = make([]*cli.Command, 0, 10)
var subCmdWithConfig []*cli.Command = make([]*cli.Command, 0, 10)
var globalFlags []cli.Flag = make([]cli.Flag, 0, 10)
//
// If the executable is forgejo-cli, provide a Forgejo specific CLI
@ -131,6 +132,15 @@ func NewMainApp(version, versionExtra string) *cli.App {
//
if executable == "forgejo-cli" {
subCmdsStandalone = append(subCmdsStandalone, forgejo.CmdActions(context.Background()))
subCmdWithConfig = append(subCmdWithConfig, forgejo.CmdF3(context.Background()))
globalFlags = append(globalFlags, []cli.Flag{
&cli.BoolFlag{
Name: "quiet",
},
&cli.BoolFlag{
Name: "verbose",
},
}...)
} else {
//
// Otherwise provide a Gitea compatible CLI which includes Forgejo
@ -142,10 +152,10 @@ func NewMainApp(version, versionExtra string) *cli.App {
subCmdWithConfig = append(subCmdWithConfig, CmdActions)
}
return innerNewMainApp(version, versionExtra, subCmdsStandalone, subCmdWithConfig)
return innerNewMainApp(version, versionExtra, subCmdsStandalone, subCmdWithConfig, globalFlags)
}
func innerNewMainApp(version, versionExtra string, subCmdsStandaloneArgs, subCmdWithConfigArgs []*cli.Command) *cli.App {
func innerNewMainApp(version, versionExtra string, subCmdsStandaloneArgs, subCmdWithConfigArgs []*cli.Command, globalFlagsArgs []cli.Flag) *cli.App {
app := cli.NewApp()
app.HelpName = "forgejo"
app.Name = "Forgejo"
@ -185,6 +195,7 @@ func innerNewMainApp(version, versionExtra string, subCmdsStandaloneArgs, subCmd
app.DefaultCommand = CmdWeb.Name
globalFlags := appGlobalFlags()
globalFlags = append(globalFlags, globalFlagsArgs...)
app.Flags = append(app.Flags, cli.VersionFlag)
app.Flags = append(app.Flags, globalFlags...)
app.HideHelp = true // use our own help action to show helps (with more information like default config)

View file

@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
)
@ -141,7 +142,7 @@ func TestCliCmd(t *testing.T) {
}
args := strings.Split(c.cmd, " ") // for test only, "split" is good enough
r, err := runTestApp(app, args...)
assert.NoError(t, err, c.cmd)
require.NoError(t, err, c.cmd)
assert.NotEmpty(t, c.exp, c.cmd)
assert.Contains(t, r.Stdout, c.exp, c.cmd)
}
@ -150,28 +151,28 @@ func TestCliCmd(t *testing.T) {
func TestCliCmdError(t *testing.T) {
app := newTestApp(func(ctx *cli.Context) error { return fmt.Errorf("normal error") })
r, err := runTestApp(app, "./gitea", "test-cmd")
assert.Error(t, err)
require.Error(t, err)
assert.Equal(t, 1, r.ExitCode)
assert.Equal(t, "", r.Stdout)
assert.Equal(t, "Command error: normal error\n", r.Stderr)
app = newTestApp(func(ctx *cli.Context) error { return cli.Exit("exit error", 2) })
r, err = runTestApp(app, "./gitea", "test-cmd")
assert.Error(t, err)
require.Error(t, err)
assert.Equal(t, 2, r.ExitCode)
assert.Equal(t, "", r.Stdout)
assert.Equal(t, "exit error\n", r.Stderr)
app = newTestApp(func(ctx *cli.Context) error { return nil })
r, err = runTestApp(app, "./gitea", "test-cmd", "--no-such")
assert.Error(t, err)
require.Error(t, err)
assert.Equal(t, 1, r.ExitCode)
assert.Equal(t, "Incorrect Usage: flag provided but not defined: -no-such\n\n", r.Stdout)
assert.Equal(t, "", r.Stderr) // the cli package's strange behavior, the error message is not in stderr ....
app = newTestApp(func(ctx *cli.Context) error { return nil })
r, err = runTestApp(app, "./gitea", "test-cmd")
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, -1, r.ExitCode) // the cli.OsExiter is not called
assert.Equal(t, "", r.Stdout)
assert.Equal(t, "", r.Stderr)

View file

@ -18,7 +18,7 @@ import (
var CmdMigrate = &cli.Command{
Name: "migrate",
Usage: "Migrate the database",
Description: "This is a command for migrating the database, so that you can run gitea admin create-user before starting the server.",
Description: "This is a command for migrating the database, so that you can run gitea admin user create before starting the server.",
Action: runMigrate,
}

View file

@ -41,13 +41,13 @@ func createLocalStorage(t *testing.T) (storage.ObjectStorage, string) {
}
func TestMigratePackages(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
creator := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
content := "package main\n\nfunc main() {\nfmt.Println(\"hi\")\n}\n"
buf, err := packages_module.CreateHashedBufferFromReaderWithSize(strings.NewReader(content), 1024)
assert.NoError(t, err)
require.NoError(t, err)
defer buf.Close()
v, f, err := packages_service.CreatePackageAndAddFile(db.DefaultContext, &packages_service.PackageCreationInfo{
@ -68,7 +68,7 @@ func TestMigratePackages(t *testing.T) {
Data: buf,
IsLead: true,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.NotNil(t, v)
assert.NotNil(t, f)
@ -77,21 +77,21 @@ func TestMigratePackages(t *testing.T) {
dstStorage, p := createLocalStorage(t)
err = migratePackages(ctx, dstStorage)
assert.NoError(t, err)
require.NoError(t, err)
entries, err := os.ReadDir(p)
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, entries, 2)
assert.EqualValues(t, "01", entries[0].Name())
assert.EqualValues(t, "tmp", entries[1].Name())
}
func TestMigrateActionsArtifacts(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
srcStorage, _ := createLocalStorage(t)
defer test.MockVariableValue(&storage.ActionsArtifacts, srcStorage)()
id := int64(0)
id := int64(42)
addArtifact := func(storagePath string, status actions.ArtifactStatus) {
id++
@ -118,17 +118,17 @@ func TestMigrateActionsArtifacts(t *testing.T) {
dstStorage, _ := createLocalStorage(t)
assert.NoError(t, migrateActionsArtifacts(db.DefaultContext, dstStorage))
require.NoError(t, migrateActionsArtifacts(db.DefaultContext, dstStorage))
object, err := dstStorage.Open(exists)
assert.NoError(t, err)
require.NoError(t, err)
buf, err := io.ReadAll(object)
require.NoError(t, err)
assert.Equal(t, exists, string(buf))
_, err = dstStorage.Stat(expired)
assert.Error(t, err)
require.Error(t, err)
_, err = dstStorage.Stat(notFound)
assert.Error(t, err)
require.Error(t, err)
}

View file

@ -147,6 +147,12 @@ func runServ(c *cli.Context) error {
return nil
}
defer func() {
if err := recover(); err != nil {
_ = fail(ctx, "Internal Server Error", "Panic: %v\n%s", err, log.Stack(2))
}
}()
keys := strings.Split(c.Args().First(), "-")
if len(keys) != 2 || keys[0] != "key" {
return fail(ctx, "Key ID format error", "Invalid key argument: %s", c.Args().First())
@ -193,10 +199,7 @@ func runServ(c *cli.Context) error {
}
verb := words[0]
repoPath := words[1]
if repoPath[0] == '/' {
repoPath = repoPath[1:]
}
repoPath := strings.TrimPrefix(words[1], "/")
var lfsVerb string
if verb == lfsAuthenticateVerb {

View file

@ -17,7 +17,7 @@ import (
"strings"
"syscall"
"github.com/google/go-github/v57/github"
"github.com/google/go-github/v64/github"
"github.com/urfave/cli/v2"
"gopkg.in/yaml.v3"
)

View file

@ -8,8 +8,8 @@
"subdir": "grafonnet"
}
},
"version": "3626fc4dc2326931c530861ac5bebe39444f6cbf",
"sum": "gF8foHByYcB25jcUOBqP6jxk0OPifQMjPvKY0HaCk6w="
"version": "a1d61cce1da59c71409b99b5c7568511fec661ea",
"sum": "342u++/7rViR/zj2jeJOjshzglkZ1SY+hFNuyCBFMdc="
}
],
"legacyImports": false

View file

@ -1,4 +1,6 @@
{
"go.buildTags": "sqlite,sqlite_unlock_notify",
"go.testFlags": ["-v"]
"go.buildTags": "sqlite,sqlite_unlock_notify",
"go.testFlags": ["-v"],
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"]
}

View file

@ -61,7 +61,7 @@ WorkingDirectory=/var/lib/forgejo/
#RuntimeDirectory=forgejo
ExecStart=/usr/local/bin/forgejo web --config /etc/forgejo/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/forgejo
Environment=USER=git HOME=/home/git FORGEJO_WORK_DIR=/var/lib/forgejo
# If you install Git to directory prefix other than default PATH (which happens
# for example if you install other versions of Git side-to-side with
# distribution version), uncomment below line and add that prefix to PATH

View file

@ -328,6 +328,10 @@ RUN_USER = ; git
;; Maximum number of locks returned per page
;LFS_LOCKS_PAGING_NUM = 50
;;
;; When clients make lfs batch requests, reject them if there are more pointers than this number
;; zero means 'unlimited'
;LFS_MAX_BATCH_SIZE = 0
;;
;; Allow graceful restarts using SIGHUP to fork
;ALLOW_GRACEFUL_RESTARTS = true
;;
@ -349,16 +353,25 @@ RUN_USER = ; git
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
;; Database to use. Either "sqlite3", "mySQL" or "postgres".
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; SQLite Configuration
;;
DB_TYPE = sqlite3
;PATH= ; defaults to data/forgejo.db
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; MySQL Configuration
;;
DB_TYPE = mysql
HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
NAME = gitea
USER = root
;DB_TYPE = mysql
;HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
;NAME = gitea
;USER = root
;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
@ -377,26 +390,6 @@ USER = root
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; SQLite Configuration
;;
;DB_TYPE = sqlite3
;PATH= ; defaults to data/forgejo.db
;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; MSSQL Configuration
;;
;DB_TYPE = mssql
;HOST = 172.17.0.2:1433
;NAME = gitea
;USER = SA
;PASSWD = MwantsaSecurePassword1
;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Other settings
;;
;; For iterate buffer, default is 50
@ -529,7 +522,8 @@ INTERNAL_TOKEN =
;; HMAC to encode urls with, it **is required** if camo is enabled.
;HMAC_KEY =
;; Set to true to use camo for https too lese only non https urls are proxyed
;ALLWAYS = false
;; ALLWAYS is deprecated and will be removed in the future
;ALWAYS = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -635,7 +629,7 @@ LEVEL = Info
;[log.%(WriterMode)]
;MODE=console/file/conn/...
;LEVEL=
;FLAGS = stdflags
;FLAGS = stdflags or journald
;EXPRESSION =
;PREFIX =
;COLORIZE = false
@ -732,6 +726,7 @@ LEVEL = Info
;CLONE = 300
;PULL = 300
;GC = 60
;GREP = 2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Git config options
@ -923,6 +918,24 @@ LEVEL = Info
;; Valid site url schemes for user profiles
;VALID_SITE_URL_SCHEMES=http,https
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[service.explore]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Only allow signed in users to view the explore pages.
;REQUIRE_SIGNIN_VIEW = false
;;
;; Disable the users explore page.
;DISABLE_USERS_PAGE = false
;;
;; Disable the organizations explore page.
;DISABLE_ORGANIZATIONS_PAGE = false
;;
;; Disable the code explore page.
;DISABLE_CODE_PAGE = false
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -1349,9 +1362,9 @@ LEVEL = Info
;[ui.meta]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;AUTHOR = Gitea - Git with a cup of tea
;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go
;KEYWORDS = go,git,self-hosted,gitea
;AUTHOR = Forgejo Beyond coding. We forge.
;DESCRIPTION = Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance, it just does the job.
;KEYWORDS = git,forge,forgejo
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -1387,6 +1400,9 @@ LEVEL = Info
;;
;; Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit).
;MAX_FILE_SIZE = 524288
;;
;; Maximum allowed rows to render CSV files. (Set to 0 for no limit)
;MAX_ROWS = 2500
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -1724,6 +1740,10 @@ LEVEL = Info
;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `<>` to send an empty address.
;ENVELOPE_FROM =
;;
;; If gitea sends mails on behave of users, it will just use the name also displayed in the WebUI. If you want e.g. `Mister X (by CodeIt) <gitea@codeit.net>`,
;; set it to `{{ .DisplayName }} (by {{ .AppName }})`. Available Variables: `.DisplayName`, `.AppName` and `.Domain`.
;FROM_DISPLAY_NAME_FORMAT = {{ .DisplayName }}
;;
;; Mailer user name and password, if required by provider.
;USER =
;;
@ -1746,6 +1766,16 @@ LEVEL = Info
;; convert \r\n to \n for Sendmail
;SENDMAIL_CONVERT_CRLF = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[mailer.override_header]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is empty by default, use it only if you know what you need it for.
;Reply-To = test@example.com, test2@example.com
;Content-Type = text/html; charset=utf-8
;In-Reply-To =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[email.incoming]
@ -2277,7 +2307,7 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Delete all old actions from database
;; Delete all old activities from database
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[cron.delete_old_actions]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -2486,6 +2516,15 @@ LEVEL = Info
;; If set to true, completely ignores server certificate validation errors. This option is unsafe.
;SKIP_TLS_VERIFY = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[F3]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Enable/Disable Friendly Forge Format (F3)
;ENABLED = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;[federation]
@ -2577,6 +2616,8 @@ LEVEL = Info
;LIMIT_SIZE_SWIFT = -1
;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
;LIMIT_SIZE_VAGRANT = -1
;; Enable RPM re-signing by default. (It will overwrite the old signature ,using v4 format, not compatible with CentOS 6 or older)
;DEFAULT_RPM_SIGN_ENABLED = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -2624,6 +2665,10 @@ LEVEL = Info
;; override the minio base path if storage type is minio
;MINIO_BASE_PATH = lfs/
;[lfs_client]
;; When mirroring an upstream lfs endpoint, limit the number of pointers in each batch request to this number
;BATCH_SIZE = 20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; settings for packages, will override storage setting
@ -2682,7 +2727,15 @@ LEVEL = Info
;ENABLED = true
;; Default address to get action plugins, e.g. the default value means downloading from "https://code.forgejo.org/actions/checkout" for "uses: actions/checkout@v3"
;DEFAULT_ACTIONS_URL = https://code.forgejo.org
;; Default artifact retention time in days, default is 90 days
;; Logs retention time in days. Old logs will be deleted after this period.
;LOG_RETENTION_DAYS = 365
;; Log compression type, `none` for no compression, `zstd` for zstd compression.
;; Other compression types like `gzip` are NOT supported, since seekable stream is required for log view.
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
;LOG_COMPRESSION = zstd
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
;ARTIFACT_RETENTION_DAYS = 90
;; Timeout to stop the task which have running status, but haven't been updated for a long time
;ZOMBIE_TASK_TIMEOUT = 10m
@ -2692,6 +2745,8 @@ LEVEL = Info
;ABANDONED_JOB_TIMEOUT = 24h
;; Strings committers can place inside a commit message or PR title to skip executing the corresponding actions workflow
;SKIP_WORKFLOW_STRINGS = [skip ci],[ci skip],[no ci],[skip actions],[actions skip]
;; Limit on inputs for manual / workflow_dispatch triggers, default is 10
;LIMIT_DISPATCH_INPUTS = 10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

1169
eslint.config.mjs Normal file

File diff suppressed because it is too large Load diff

6
flake.lock generated
View file

@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"lastModified": 1720542800,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
"type": "github"
},
"original": {

View file

@ -30,6 +30,8 @@
# backend
go_1_22
gofumpt
sqlite
];
};
}

190
go.mod
View file

@ -1,83 +1,81 @@
module code.gitea.io/gitea
go 1.22.0
toolchain go1.22.4
go 1.23.3
require (
code.forgejo.org/f3/gof3/v3 v3.7.0
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251
code.forgejo.org/forgejo/reply v1.0.2
code.forgejo.org/go-chi/binding v1.0.0
code.forgejo.org/go-chi/cache v1.0.0
code.forgejo.org/go-chi/captcha v1.0.0
code.forgejo.org/go-chi/session v1.0.0
code.gitea.io/actions-proto-go v0.4.0
code.gitea.io/gitea-vet v0.2.3
code.gitea.io/sdk/gitea v0.17.1
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
connectrpc.com/connect v1.16.2
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed
gitea.com/go-chi/cache v0.2.0
gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96
connectrpc.com/connect v1.17.0
gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4
github.com/42wim/sshsig v0.0.0-20211121163825-841cf5bbc121
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358
github.com/ProtonMail/go-crypto v1.0.0
github.com/PuerkitoBio/goquery v1.9.2
github.com/PuerkitoBio/goquery v1.10.0
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2
github.com/alecthomas/chroma/v2 v2.14.0
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
github.com/blevesearch/bleve/v2 v2.4.0
github.com/buildkite/terminal-to-html/v3 v3.10.1
github.com/caddyserver/certmagic v0.21.0
github.com/blevesearch/bleve/v2 v2.4.2
github.com/buildkite/terminal-to-html/v3 v3.16.3
github.com/caddyserver/certmagic v0.21.4
github.com/chi-middleware/proxy v1.1.1
github.com/djherbis/buffer v1.2.0
github.com/djherbis/nio/v3 v3.0.1
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
github.com/dustin/go-humanize v1.0.1
github.com/editorconfig/editorconfig-core-go/v2 v2.6.2
github.com/emersion/go-imap v1.2.1
github.com/emirpasic/gods v1.18.1
github.com/felixge/fgprof v0.9.4
github.com/fsnotify/fsnotify v1.7.0
github.com/felixge/fgprof v0.9.5
github.com/fsnotify/fsnotify v1.8.0
github.com/gliderlabs/ssh v0.3.7
github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9
github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
github.com/go-chi/chi/v5 v5.0.11
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/cors v1.2.1
github.com/go-co-op/gocron v1.37.0
github.com/go-enry/go-enry/v2 v2.8.8
github.com/go-enry/go-enry/v2 v2.9.1
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-ldap/ldap/v3 v3.4.6
github.com/go-sql-driver/mysql v1.8.1
github.com/go-swagger/go-swagger v0.30.5
github.com/go-testfixtures/testfixtures/v3 v3.11.0
github.com/go-webauthn/webauthn v0.10.0
github.com/go-testfixtures/testfixtures/v3 v3.12.0
github.com/go-webauthn/webauthn v0.11.2
github.com/gobwas/glob v0.2.3
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
github.com/golang-jwt/jwt/v5 v5.2.0
github.com/google/go-github/v57 v57.0.0
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/go-github/v64 v64.0.0
github.com/google/pprof v0.0.0-20241017200806-017d972448fc
github.com/google/uuid v1.6.0
github.com/gorilla/feeds v1.1.2
github.com/gorilla/sessions v1.2.2
github.com/gorilla/feeds v1.2.0
github.com/gorilla/sessions v1.4.0
github.com/h2non/gock v1.2.0
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/huandu/xstrings v1.5.0
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056
github.com/jhillyerd/enmime v1.2.0
github.com/jhillyerd/enmime/v2 v2.0.0
github.com/json-iterator/go v1.1.12
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
github.com/klauspost/compress v1.17.8
github.com/klauspost/cpuid/v2 v2.2.7
github.com/klauspost/compress v1.17.11
github.com/klauspost/cpuid/v2 v2.2.8
github.com/lib/pq v1.10.9
github.com/markbates/goth v1.80.0
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.22
github.com/meilisearch/meilisearch-go v0.26.1
github.com/mattn/go-sqlite3 v1.14.24
github.com/meilisearch/meilisearch-go v0.29.0
github.com/mholt/archiver/v3 v3.5.1
github.com/microcosm-cc/bluemonday v1.0.26
github.com/minio/minio-go/v7 v7.0.70
github.com/microcosm-cc/bluemonday v1.0.27
github.com/minio/minio-go/v7 v7.0.78
github.com/msteinert/pam v1.2.0
github.com/nektos/act v0.2.52
github.com/niklasfasching/go-org v1.7.0
@ -85,56 +83,53 @@ require (
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
github.com/pquerna/otp v1.4.0
github.com/prometheus/client_golang v1.18.0
github.com/quasoft/websspi v1.1.2
github.com/redis/go-redis/v9 v9.5.2
github.com/prometheus/client_golang v1.20.5
github.com/redis/go-redis/v9 v9.7.0
github.com/robfig/cron/v3 v3.0.1
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/sassoftware/go-rpmutils v0.2.1-0.20240124161140-277b154961dd
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
github.com/sassoftware/go-rpmutils v0.4.0
github.com/sergi/go-diff v1.3.1
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92
github.com/stretchr/testify v1.9.0
github.com/syndtr/goleveldb v1.0.0
github.com/ulikunitz/xz v0.5.11
github.com/urfave/cli/v2 v2.27.2
github.com/ulikunitz/xz v0.5.12
github.com/urfave/cli/v2 v2.27.5
github.com/valyala/fastjson v1.6.4
github.com/xanzy/go-gitlab v0.96.0
github.com/xanzy/go-gitlab v0.109.0
github.com/yohcop/openid-go v1.0.1
github.com/yuin/goldmark v1.7.0
github.com/yuin/goldmark v1.7.8
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
github.com/yuin/goldmark-meta v1.1.0
go.uber.org/mock v0.4.0
golang.org/x/crypto v0.24.0
golang.org/x/image v0.17.0
golang.org/x/net v0.26.0
golang.org/x/oauth2 v0.21.0
golang.org/x/sys v0.21.0
golang.org/x/text v0.16.0
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.33.0
golang.org/x/crypto v0.29.0
golang.org/x/image v0.21.0
golang.org/x/net v0.31.0
golang.org/x/oauth2 v0.23.0
golang.org/x/sys v0.27.0
golang.org/x/text v0.20.0
golang.org/x/tools v0.26.0
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ini.v1 v1.67.0
gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.5.0
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
xorm.io/builder v0.3.13
xorm.io/xorm v1.3.7
xorm.io/xorm v1.3.9
)
require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
dario.cat/mergo v1.0.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 // indirect
github.com/ClickHouse/ch-go v0.61.5 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.24.0 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.26.0 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/RoaringBitmap/roaring v1.7.0 // indirect
github.com/RoaringBitmap/roaring v1.9.3 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
@ -142,13 +137,13 @@ require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/blevesearch/bleve_index_api v1.1.6 // indirect
github.com/blevesearch/bleve_index_api v1.1.10 // indirect
github.com/blevesearch/geo v0.1.20 // indirect
github.com/blevesearch/go-faiss v1.0.13 // indirect
github.com/blevesearch/go-faiss v1.0.20 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
github.com/blevesearch/gtreap v0.1.1 // indirect
github.com/blevesearch/mmap-go v1.0.4 // indirect
github.com/blevesearch/scorch_segment_api/v2 v2.2.9 // indirect
github.com/blevesearch/scorch_segment_api/v2 v2.2.15 // indirect
github.com/blevesearch/segment v0.9.1 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
@ -158,32 +153,32 @@ require (
github.com/blevesearch/zapx/v13 v13.3.10 // indirect
github.com/blevesearch/zapx/v14 v14.3.10 // indirect
github.com/blevesearch/zapx/v15 v15.3.13 // indirect
github.com/blevesearch/zapx/v16 v16.0.12 // indirect
github.com/blevesearch/zapx/v16 v16.1.5 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
github.com/caddyserver/zerossl v0.1.2 // indirect
github.com/caddyserver/zerossl v0.1.3 // indirect
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/couchbase/go-couchbase v0.1.1 // indirect
github.com/couchbase/gomemcached v0.3.0 // indirect
github.com/couchbase/goutils v0.1.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudflare/circl v1.3.8 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-ap/errors v0.0.0-20231003111023-183eef4b31b7 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-enry/go-oniguruma v1.2.1 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.7.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-openapi/analysis v0.22.2 // indirect
github.com/go-openapi/errors v0.21.0 // indirect
github.com/go-openapi/inflect v0.19.0 // indirect
@ -195,23 +190,24 @@ require (
github.com/go-openapi/strfmt v0.22.0 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-openapi/validate v0.22.6 // indirect
github.com/go-webauthn/x v0.1.6 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/go-webauthn/x v0.1.14 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/go-tpm v0.9.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 // indirect
github.com/google/go-tpm v0.9.1 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
@ -226,9 +222,9 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/markbates/going v1.0.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mholt/acmez/v2 v2.0.1 // indirect
github.com/miekg/dns v1.1.59 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mholt/acmez/v2 v2.0.3 // indirect
github.com/miekg/dns v1.1.62 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
@ -237,6 +233,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
@ -247,13 +244,13 @@ require (
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rhysd/actionlint v1.6.27 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@ -270,14 +267,11 @@ require (
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/toqueteos/webbrowser v1.2.0 // indirect
github.com/unknwon/com v1.0.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.mongodb.org/mongo-driver v1.13.1 // indirect
go.opentelemetry.io/otel v1.26.0 // indirect
@ -286,10 +280,10 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
@ -299,16 +293,8 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
replace github.com/nektos/act => gitea.com/gitea/act v0.261.1
replace github.com/gorilla/feeds => github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5
exclude github.com/gofrs/uuid v3.2.0+incompatible
exclude github.com/gofrs/uuid v4.0.0+incompatible
exclude github.com/goccy/go-json v0.4.11
exclude github.com/satori/go.uuid v1.2.0
replace github.com/nektos/act => code.forgejo.org/forgejo/act v1.21.5
replace github.com/mholt/archiver/v3 => code.forgejo.org/forgejo/archiver/v3 v3.5.1
replace github.com/goccy/go-json => github.com/grafana/go-json v0.0.0-20241106155216-71a03f133f5c

416
go.sum
View file

@ -1,9 +1,23 @@
cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
code.forgejo.org/f3/gof3/v3 v3.7.0 h1:ZfuCP8CGm8ZJbWmL+V0pUu3E0X4FCAA7GfRDy/y5/K4=
code.forgejo.org/f3/gof3/v3 v3.7.0/go.mod h1:oNhOeqD4DZYjVcNjQXIOdDX9b/1tqxi9ITLS8H9/Csw=
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251 h1:HTZl3CBk3ABNYtFI6TPLvJgGKFIhKT5CBk0sbOtkDKU=
code.forgejo.org/forgejo-contrib/go-libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:PphB88CPbx601QrWPMZATeorACeVmQlyv3u+uUMbSaM=
code.forgejo.org/forgejo/act v1.21.5 h1:rWI+bhClocogdNwjRrM836rZYY7JBcHY3VUAwkYqEtw=
code.forgejo.org/forgejo/act v1.21.5/go.mod h1:+PcvJ9iv+NTFeJSh79ra9Jbk9l0vvyA9D9me5/dbxYM=
code.forgejo.org/forgejo/archiver/v3 v3.5.1 h1:UmmbA7D5550uf71SQjarmrn6yKwOGxtEjb3jaYYtmSE=
code.forgejo.org/forgejo/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4=
code.forgejo.org/forgejo/reply v1.0.2 h1:dMhQCHV6/O3L5CLWNTol+dNzDAuyCK88z4J/lCdgFuQ=
code.forgejo.org/forgejo/reply v1.0.2/go.mod h1:RyZUfzQLc+fuLIGjTSQWDAJWPiL4WtKXB/FifT5fM7U=
code.forgejo.org/go-chi/binding v1.0.0 h1:EIDJtk9brK7WsT7rvS/D4cxX8XlnhY3LMy8ex1jeHu0=
code.forgejo.org/go-chi/binding v1.0.0/go.mod h1:fWwqaHj0H1/KeCpBqdvKunflq8pYfciEHI5v3UUeE2E=
code.forgejo.org/go-chi/cache v1.0.0 h1:akLfGxNlHcacmtutovNtYFSTMsbdcp5MGjAEsP4pxnE=
code.forgejo.org/go-chi/cache v1.0.0/go.mod h1:OVlZ/TqDYJ+RUJ+R+J+OLxtlyjo3pbjBeK7LAWAB+Vk=
code.forgejo.org/go-chi/captcha v1.0.0 h1:ZKVznXrPfruc1RMavCFBEINGxB3RAYr4I+WQAK8+eP0=
code.forgejo.org/go-chi/captcha v1.0.0/go.mod h1:YLOsiln/arX3egGtxG4QNp49G2CIqP9pqD2VL56obLc=
code.forgejo.org/go-chi/session v1.0.0 h1:1hjLWHpXkb4vs/g9rk/unhRL4AoKEqVUPJ+opI8UO3Y=
code.forgejo.org/go-chi/session v1.0.0/go.mod h1:lS76JFHZqGXYJTBHqwZ910UG046hIXAaYIN6J0Lf8sI=
code.gitea.io/actions-proto-go v0.4.0 h1:OsPBPhodXuQnsspG1sQ4eRE1PeoZyofd7+i73zCwnsU=
code.gitea.io/actions-proto-go v0.4.0/go.mod h1:mn7Wkqz6JbnTOHQpot3yDeHx+O5C9EGhMEE+htvHBas=
code.gitea.io/gitea-vet v0.2.3 h1:gdFmm6WOTM65rE8FUBTRzeQZYzXePKSSB1+r574hWwI=
@ -12,24 +26,14 @@ code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8=
code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM=
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 h1:TXbikPqa7YRtfU9vS6QJBg77pUvbEb6StRdZO8t1bEY=
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570/go.mod h1:IIAjsijsd8q1isWX8MACefDEgTQslQ4stk2AeeTt3kM=
connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE=
connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc=
connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk=
connectrpc.com/connect v1.17.0/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:cliQ4HHsCo6xi2oWZYKWW4bly/Ory9FuTpFPRxj/mAg=
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs=
gitea.com/gitea/act v0.261.1 h1:iACWLc/k8wct9fCF2WdYKqn2Hxx6NjW9zbOP79HF4H4=
gitea.com/gitea/act v0.261.1/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok=
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed h1:EZZBtilMLSZNWtHHcgq2mt6NSGhJSZBuduAlinMEmso=
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed/go.mod h1:E3i3cgB04dDx0v3CytCgRTTn9Z/9x891aet3r456RVw=
gitea.com/go-chi/cache v0.2.0 h1:E0npuTfDW6CT1yD8NMDVc1SK6IeRjfmRL2zlEsCEd7w=
gitea.com/go-chi/cache v0.2.0/go.mod h1:iQlVK2aKTZ/rE9UcHyz9pQWGvdP9i1eI2spOpzgCrtE=
gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098 h1:p2ki+WK0cIeNQuqjR98IP2KZQKRzJJiV7aTeMAFwaWo=
gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098/go.mod h1:LjzIOHlRemuUyO7WR12fmm18VZIlCAaOt9L3yKw40pk=
gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96 h1:IFDiMBObsP6CZIRaDLd54SR6zPYAffPXiXck5Xslu0Q=
gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96/go.mod h1:0iEpFKnwO5dG0aF98O4eq6FMsAiXkNBaDIlUOlq4BtM=
gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4 h1:IFT+hup2xejHqdhS7keYWioqfmxdnfblFDTGoOwcZ+o=
gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
@ -40,12 +44,10 @@ github.com/6543/go-version v1.3.1 h1:HvOp+Telns7HWJ2Xo/05YXQSB2bE0WmVgbHqwMPZT4U
github.com/6543/go-version v1.3.1/go.mod h1:oqFAHCwtLVUTLdhQmVZWYvaHXTdsbB4SY85at64SQEo=
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8=
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/ClickHouse/ch-go v0.61.5 h1:zwR8QbYI0tsMiEcze/uIMK+Tz1D3XZXLdNrlaOpeEI4=
github.com/ClickHouse/ch-go v0.61.5/go.mod h1:s1LJW/F/LcFs5HJnuogFMta50kKDO0lf9zzfrbl0RQg=
github.com/ClickHouse/clickhouse-go/v2 v2.24.0 h1:L/n/pVVpk95KtkHOiKuSnO7cu2ckeW4gICbbOh5qs74=
github.com/ClickHouse/clickhouse-go/v2 v2.24.0/go.mod h1:iDTViXk2Fgvf1jn2dbJd1ys+fBkdD1UMRnXlwmhijhQ=
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/ClickHouse/clickhouse-go/v2 v2.26.0 h1:j4/y6NYaCcFkJwN/TU700ebW+nmsIy34RmUAAcZKy9w=
github.com/ClickHouse/clickhouse-go/v2 v2.26.0/go.mod h1:iDTViXk2Fgvf1jn2dbJd1ys+fBkdD1UMRnXlwmhijhQ=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
@ -60,10 +62,12 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=
github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE=
github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk=
github.com/RoaringBitmap/roaring v1.7.0 h1:OZF303tJCER1Tj3x+aArx/S5X7hrT186ri6JjrGvG68=
github.com/RoaringBitmap/roaring v1.7.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/PuerkitoBio/goquery v1.10.0 h1:6fiXdLuUvYs2OJSvNRqlNPoBm6YABE226xrbavY5Wv4=
github.com/PuerkitoBio/goquery v1.10.0/go.mod h1:TjZZl68Q3eGHNBA8CWaxAN7rOU1EbDz3CWuolcO5Yu4=
github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4S2OByM=
github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2 h1:cSXom2MoKJ9KPPw29RoZtHvUETY4F4n/kXl8m9btnQ0=
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2/go.mod h1:JitQWJ8JuV4Y87l8VsHiiwhb3cgdyn68mX40s7NT6PA=
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
@ -75,7 +79,6 @@ github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW5
github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA=
github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
@ -95,22 +98,22 @@ github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJR
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb h1:m935MPodAbYS46DG4pJSv7WO+VECIWUQ7OJYSoTrMh4=
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
github.com/blevesearch/bleve/v2 v2.4.0 h1:2xyg+Wv60CFHYccXc+moGxbL+8QKT/dZK09AewHgKsg=
github.com/blevesearch/bleve/v2 v2.4.0/go.mod h1:IhQHoFAbHgWKYavb9rQgQEJJVMuY99cKdQ0wPpst2aY=
github.com/blevesearch/bleve_index_api v1.1.6 h1:orkqDFCBuNU2oHW9hN2YEJmet+TE9orml3FCGbl1cKk=
github.com/blevesearch/bleve_index_api v1.1.6/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8=
github.com/blevesearch/bleve/v2 v2.4.2 h1:NooYP1mb3c0StkiY9/xviiq2LGSaE8BQBCc/pirMx0U=
github.com/blevesearch/bleve/v2 v2.4.2/go.mod h1:ATNKj7Yl2oJv/lGuF4kx39bST2dveX6w0th2FFYLkc8=
github.com/blevesearch/bleve_index_api v1.1.10 h1:PDLFhVjrjQWr6jCuU7TwlmByQVCSEURADHdCqVS9+g0=
github.com/blevesearch/bleve_index_api v1.1.10/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8=
github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM=
github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w=
github.com/blevesearch/go-faiss v1.0.13 h1:zfFs7ZYD0NqXVSY37j0JZjZT1BhE9AE4peJfcx/NB4A=
github.com/blevesearch/go-faiss v1.0.13/go.mod h1:jrxHrbl42X/RnDPI+wBoZU8joxxuRwedrxqswQ3xfU8=
github.com/blevesearch/go-faiss v1.0.20 h1:AIkdTQFWuZ5LQmKQSebgMR4RynGNw8ZseJXaan5kvtI=
github.com/blevesearch/go-faiss v1.0.20/go.mod h1:jrxHrbl42X/RnDPI+wBoZU8joxxuRwedrxqswQ3xfU8=
github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo=
github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M=
github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y=
github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk=
github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc=
github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs=
github.com/blevesearch/scorch_segment_api/v2 v2.2.9 h1:3nBaSBRFokjE4FtPW3eUDgcAu3KphBg1GP07zy/6Uyk=
github.com/blevesearch/scorch_segment_api/v2 v2.2.9/go.mod h1:ckbeb7knyOOvAdZinn/ASbB7EA3HoagnJkmEV3J7+sg=
github.com/blevesearch/scorch_segment_api/v2 v2.2.15 h1:prV17iU/o+A8FiZi9MXmqbagd8I0bCqM7OKUYPbnb5Y=
github.com/blevesearch/scorch_segment_api/v2 v2.2.15/go.mod h1:db0cmP03bPNadXrCDuVkKLV6ywFSiRgPFT1YVrestBc=
github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU=
github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw=
github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s=
@ -129,29 +132,28 @@ github.com/blevesearch/zapx/v14 v14.3.10 h1:SG6xlsL+W6YjhX5N3aEiL/2tcWh3DO75Bnz7
github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQEOehF78m6oTgns=
github.com/blevesearch/zapx/v15 v15.3.13 h1:6EkfaZiPlAxqXz0neniq35my6S48QI94W/wyhnpDHHQ=
github.com/blevesearch/zapx/v15 v15.3.13/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg=
github.com/blevesearch/zapx/v16 v16.0.12 h1:Uccxvjmn+hQ6ywQP+wIiTpdq9LnAviGoryJOmGwAo/I=
github.com/blevesearch/zapx/v16 v16.0.12/go.mod h1:MYnOshRfSm4C4drxx1LGRI+MVFByykJ2anDY1fxdk9Q=
github.com/blevesearch/zapx/v16 v16.1.5 h1:b0sMcarqNFxuXvjoXsF8WtwVahnxyhEvBSRJi/AUHjU=
github.com/blevesearch/zapx/v16 v16.1.5/go.mod h1:J4mSF39w1QELc11EWRSBFkPeZuO7r/NPKkHzDCoiaI8=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 h1:N7oVaKyGp8bttX0bfZGmcGkjz7DLQXhAn3DNd3T0ous=
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874/go.mod h1:r5xuitiExdLAJ09PR7vBVENGvp4ZuTBeWTGtxuX3K+c=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buildkite/terminal-to-html/v3 v3.10.1 h1:znT9eD26LQ59dDJJEpMCwkP4wEptEAPi74hsTBuHdEo=
github.com/buildkite/terminal-to-html/v3 v3.10.1/go.mod h1:qtuRyYs6/Sw3FS9jUyVEaANHgHGqZsGqMknPLyau5cQ=
github.com/buildkite/terminal-to-html/v3 v3.16.3 h1:IGuJjboHjuMLWOGsKZKNxbbn41emOLiHzXPmQZk31fk=
github.com/buildkite/terminal-to-html/v3 v3.16.3/go.mod h1:r/J7cC9c3EzBzP3/wDz0RJLPwv5PUAMp+KF2w+ntMc0=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/caddyserver/certmagic v0.21.0 h1:yDoifClc4hIxhHer3AxUj4buhF+NzRR6torw/AOnuUE=
github.com/caddyserver/certmagic v0.21.0/go.mod h1:OgUZNXYV/ylYoFJNmoYVR5nntydLNMQISePPgqZTyhc=
github.com/caddyserver/zerossl v0.1.2 h1:tlEu1VzWGoqcCpivs9liKAKhfpJWYJkHEMmlxRbVAxE=
github.com/caddyserver/zerossl v0.1.2/go.mod h1:wtiJEHbdvunr40ZzhXlnIkOB8Xj4eKtBKizCcZitJiQ=
github.com/caddyserver/certmagic v0.21.4 h1:e7VobB8rffHv8ZZpSiZtEwnLDHUwLVYLWzWSa1FfKI0=
github.com/caddyserver/certmagic v0.21.4/go.mod h1:swUXjQ1T9ZtMv95qj7/InJvWLXURU85r+CfG0T+ZbDE=
github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA=
github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a h1:MISbI8sU/PSK/ztvmWKFcI7UGb5/HQT7B+i3a2myKgI=
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a/go.mod h1:2GxOXOlEPAMFPfp014mK1SWq8G8BN8o7/dfYqJrVGn8=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chi-middleware/proxy v1.1.1 h1:4HaXUp8o2+bhHr1OhVy+VjN0+L7/07JDcn6v7YrTjrQ=
github.com/chi-middleware/proxy v1.1.1/go.mod h1:jQwMEJct2tz9VmtCELxvnXoMfa+SOdikvbVJVHv/M+0=
github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
@ -161,18 +163,11 @@ github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwys
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/couchbase/go-couchbase v0.1.1 h1:ClFXELcKj/ojyoTYbsY34QUrrYCBi/1G749sXSCkdhk=
github.com/couchbase/go-couchbase v0.1.1/go.mod h1:+/bddYDxXsf9qt0xpDUtRR47A2GjaXmGGAqQ/k3GJ8A=
github.com/couchbase/gomemcached v0.3.0 h1:XkMDdP6w7rtvLijDE0/RhcccX+XvAk5cboyBv1YcI0U=
github.com/couchbase/gomemcached v0.3.0/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo=
github.com/couchbase/goutils v0.1.2 h1:gWr8B6XNWPIhfalHNog3qQKfGiYyh4K4VhO3P2o9BCs=
github.com/couchbase/goutils v0.1.2/go.mod h1:h89Ek/tiOxxqjz30nPPlwZdQbdB8BwgnuBxeoUe/ViE=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cloudflare/circl v1.3.8 h1:j+V8jJt09PoeMFIu2uh5JUyEaIHTXVOHslFoLNAKqwI=
github.com/cloudflare/circl v1.3.8/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -195,14 +190,14 @@ github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55k
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY=
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4=
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/editorconfig/editorconfig-core-go/v2 v2.6.2 h1:dKG8sc7n321deIVRcQtwlMNoBEra7j0qQ8RwxO8RN0w=
github.com/editorconfig/editorconfig-core-go/v2 v2.6.2/go.mod h1:7dvD3GCm7eBw53xZ/lsiq72LqobdMg3ITbMBxnmJmqY=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
github.com/emersion/go-imap v1.2.1 h1:+s9ZjMEjOB8NzZMVTM3cCenz2JrQIGGo5j1df19WjTA=
@ -216,8 +211,8 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/felixge/fgprof v0.9.4 h1:ocDNwMFlnA0NU0zSB3I52xkO4sFXk80VK9lXjLClu88=
github.com/felixge/fgprof v0.9.4/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM=
github.com/felixge/fgprof v0.9.5 h1:8+vR6yu2vvSKn08urWyEuxx75NWPEvybbkBirEpsbVY=
github.com/felixge/fgprof v0.9.5/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
@ -226,10 +221,10 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=
github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9 h1:j2TrkUG/NATGi/EQS+MvEoF79CxiRUmT16ErFroNcKI=
@ -241,14 +236,14 @@ github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73/go.mod h1:jyveZeGw5La
github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA=
github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA=
github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
github.com/go-co-op/gocron v1.37.0 h1:ZYDJGtQ4OMhTLKOKMIch+/CY70Brbb1dGdooLEhh7b0=
github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY=
github.com/go-enry/go-enry/v2 v2.8.8 h1:EhfxWpw4DQ3WEFB1Y77X8vKqZL0D0EDUUWYDUAIv9/4=
github.com/go-enry/go-enry/v2 v2.8.8/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
github.com/go-enry/go-enry/v2 v2.9.1 h1:G9iDteJ/Mc0F4Di5NeQknf83R2OkRbwY9cAYmcqVG6U=
github.com/go-enry/go-enry/v2 v2.9.1/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
@ -266,6 +261,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ldap/ldap/v3 v3.4.6 h1:ert95MdbiG7aWo/oPYp9btL3KJlMPKnP58r09rI8T+A=
github.com/go-ldap/ldap/v3 v3.4.6/go.mod h1:IGMQANNtxpsOzj7uUAMjpGBaOVTC4DYyIy8VsTdxmtc=
github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0=
@ -290,8 +287,6 @@ github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR
github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0=
github.com/go-openapi/validate v0.22.6 h1:+NhuwcEYpWdO5Nm4bmvhGLW0rt1Fcc532Mu3wpypXfo=
github.com/go-openapi/validate v0.22.6/go.mod h1:eaddXSqKeTg5XpSmj1dYyFTK/95n/XHwcOY+BMxKMyM=
github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-swagger/go-swagger v0.30.5 h1:SQ2+xSonWjjoEMOV5tcOnZJVlfyUfCBhGQGArS1b9+U=
@ -299,21 +294,19 @@ github.com/go-swagger/go-swagger v0.30.5/go.mod h1:cWUhSyCNqV7J1wkkxfr5QmbcnCewe
github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0=
github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-testfixtures/testfixtures/v3 v3.11.0 h1:XxQr8AnPORcZkyNd7go5UNLPD3dULN8ixYISlzrlfEQ=
github.com/go-testfixtures/testfixtures/v3 v3.11.0/go.mod h1:THmudHF1Ixq++J2/UodcJpxUphfyEd77m83TvDtryqE=
github.com/go-webauthn/webauthn v0.10.0 h1:yuW2e1tXnRAwAvKrR4q4LQmc6XtCMH639/ypZGhZCwk=
github.com/go-webauthn/webauthn v0.10.0/go.mod h1:l0NiauXhL6usIKqNLCUM3Qir43GK7ORg8ggold0Uv/Y=
github.com/go-webauthn/x v0.1.6 h1:QNAX+AWeqRt9loE8mULeWJCqhVG5D/jvdmJ47fIWCkQ=
github.com/go-webauthn/x v0.1.6/go.mod h1:W8dFVZ79o4f+nY1eOUICy/uq5dhrRl7mxQkYhXTo0FA=
github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-testfixtures/testfixtures/v3 v3.12.0 h1:Ew0+c2o1mXSUqMwjuNup3MK/vw1HkLS3ILljX5C6lVE=
github.com/go-testfixtures/testfixtures/v3 v3.12.0/go.mod h1:13F0m6/DtqqSDso9IAVuhbZ4I7AiRAHrolmDMu9v5vY=
github.com/go-webauthn/webauthn v0.11.2 h1:Fgx0/wlmkClTKlnOsdOQ+K5HcHDsDcYIvtYmfhEOSUc=
github.com/go-webauthn/webauthn v0.11.2/go.mod h1:aOtudaF94pM71g3jRwTYYwQTG1KyTILTcZqN1srkmD0=
github.com/go-webauthn/x v0.1.14 h1:1wrB8jzXAofojJPAaRxnZhRgagvLGnLjhCAwg3kTpT0=
github.com/go-webauthn/x v0.1.14/go.mod h1:UuVvFZ8/NbOnkDz3y1NaxtUN87pmtpC1PQ+/5BBQRdc=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f h1:3BSP1Tbs2djlpprl7wCLuiqMaUh5SJkkzI2gDs+FgLs=
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
@ -321,8 +314,8 @@ github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:UjoPNDAQ5JP
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
@ -332,7 +325,6 @@ github.com/golang/geo v0.0.0-20230421003525-6adc56603217/go.mod h1:8wI0hitZ3a1Ix
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
@ -340,13 +332,15 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
@ -354,54 +348,51 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs=
github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw=
github.com/google/go-github/v64 v64.0.0 h1:4G61sozmY3eiPAjjoOHponXDBONm+utovTKbyUb2Qdg=
github.com/google/go-github/v64 v64.0.0/go.mod h1:xB3vqMQNdHzilXBiO2I+M7iEFtHf+DP/omBOv6tQzVo=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk=
github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU=
github.com/google/go-tpm v0.9.1 h1:0pGc4X//bAlmZzMKf8iz6IsDo1nYTbYJ6FZN/rg4zdM=
github.com/google/go-tpm v0.9.1/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g=
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/pprof v0.0.0-20241017200806-017d972448fc h1:NGyrhhFhwvRAZg02jnYVg3GBQy0qGBKmFQJwaPmpmxs=
github.com/google/pprof v0.0.0-20241017200806-017d972448fc/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw=
github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
github.com/gorilla/feeds v1.2.0 h1:O6pBiXJ5JHhPvqy53NsjKOThq+dNFm8+DFrxBEdzSCc=
github.com/gorilla/feeds v1.2.0/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y=
github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1 h1:LqbZZ9sNMWVjeXS4NN5oVvhMjDyLhmA1LG86oSo+IqY=
github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTjY=
github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ=
github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ=
github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik=
github.com/grafana/go-json v0.0.0-20241106155216-71a03f133f5c h1:yKBKEC347YZpgii1KazRCfxHsTaxMqWZzoivM1OTT50=
github.com/grafana/go-json v0.0.0-20241106155216-71a03f133f5c/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/h2non/gock v1.2.0 h1:K6ol8rfrRkUOefooBC8elXoaNGYkpp7y2qcxGG6BzUE=
github.com/h2non/gock v1.2.0/go.mod h1:tNhoxHYW2W42cYkYb1WqzdbYIieALC99kpYr7rH/BQk=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@ -438,38 +429,29 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jhillyerd/enmime v1.2.0 h1:dIu1IPEymQgoT2dzuB//ttA/xcV40NMPpQtmd4wslHk=
github.com/jhillyerd/enmime v1.2.0/go.mod h1:FRFuUPCLh8PByQv+8xRcLO9QHqaqTqreYhopv5eyk4I=
github.com/jhillyerd/enmime/v2 v2.0.0 h1:I39PYf0peLGroKq+uX2yGB1ExH/78HcRJy4VmERQAVk=
github.com/jhillyerd/enmime/v2 v2.0.0/go.mod h1:wQkz7BochDzSukAz5ajAQaXOB7pEg5Vh5QWs7m1uAPw=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 h1:cTxwSmnaqLoo+4tLukHoB9iqHOu3LmLhRmgUxZo6Vp4=
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
@ -482,14 +464,13 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de/go.mod h1:3q8WtuPQsoRbatJuy3nvq/hRSvuBJrHHr+ybPPiNvHQ=
github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af/go.mod h1:Cqz6pqow14VObJ7peltM+2n3PWOz7yTrfUuGbVFkzN0=
github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0 h1:F/3FfGmKdiKFa8kL3YrpZ7pe9H4l4AzA1pbaOUnRvPI=
github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0/go.mod h1:JEfTc3+2DF9Z4PXhLLvXL42zexJyh8rIq3OzUj/0rAk=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
@ -506,23 +487,22 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/meilisearch/meilisearch-go v0.26.1 h1:3bmo2uLijX7kvBmiZ9LupVfC95TFcRJDgrRTzbOoE4A=
github.com/meilisearch/meilisearch-go v0.26.1/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
github.com/mholt/acmez/v2 v2.0.1 h1:3/3N0u1pLjMK4sNEAFSI+bcvzbPhRpY383sy1kLHJ6k=
github.com/mholt/acmez/v2 v2.0.1/go.mod h1:fX4c9r5jYwMyMsC+7tkYRxHibkOTgta5DIFGoe67e1U=
github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58=
github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs=
github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs=
github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM=
github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/meilisearch/meilisearch-go v0.29.0 h1:HZ9NEKN59USINQ/DXJge/aaXq8IrsKbXGTdAoBaaDz4=
github.com/meilisearch/meilisearch-go v0.29.0/go.mod h1:2cRCAn4ddySUsFfNDLVPod/plRibQsJkXF/4gLhxbOk=
github.com/mholt/acmez/v2 v2.0.3 h1:CgDBlEwg3QBp6s45tPQmFIBrkRIkBT4rW4orMM6p4sw=
github.com/mholt/acmez/v2 v2.0.3/go.mod h1:pQ1ysaDeGrIMvJ9dfJMk5kJNkn7L2sb3UhyrX6Q91cw=
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.70 h1:1u9NtMgfK1U42kUxcsl5v0yj6TEOPR497OAQxpJnn2g=
github.com/minio/minio-go/v7 v7.0.70/go.mod h1:4yBA8v80xGA30cfM3fz0DKYMXunWl/AV/6tWEs9ryzo=
github.com/minio/minio-go/v7 v7.0.78 h1:LqW2zy52fxnI4gg8C2oZviTaKHcBV36scS+RzJnxUFs=
github.com/minio/minio-go/v7 v7.0.78/go.mod h1:84gmIilaX4zcvAWWzJ5Z1WI5axN+hAbM5w25xf8xvC0=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
@ -543,6 +523,8 @@ github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
github.com/msteinert/pam v1.2.0 h1:mYfjlvN2KYs2Pb9G6nb/1f/nPfAttT/Jee5Sq9r3bGE=
github.com/msteinert/pam v1.2.0/go.mod h1:d2n0DCUK8rGecChV3JzvmsDjOY4R7AYbsNxAT+ftQl0=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/niklasfasching/go-org v1.7.0 h1:vyMdcMWWTe/XmANk19F4k8XGBYg0GQ/gJGMimOjGMek=
@ -561,12 +543,10 @@ github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5Bn
github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
@ -579,7 +559,6 @@ github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzb
github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU=
github.com/paulmach/orb v0.11.1/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU=
github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI=
github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
@ -595,18 +574,16 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg=
github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y=
github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/quasoft/websspi v1.1.2 h1:/mA4w0LxWlE3novvsoEL6BBA1WnjJATbjkh1kFrTidw=
github.com/quasoft/websspi v1.1.2/go.mod h1:HmVdl939dQ0WIXZhyik+ARdI03M6bQzaSEKcgpFmewk=
github.com/redis/go-redis/v9 v9.5.2 h1:L0L3fcSNReTRGyZ6AqAEN0K56wYeYAwapBIhkvh0f3E=
github.com/redis/go-redis/v9 v9.5.2/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E=
github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rhysd/actionlint v1.6.27 h1:xxwe8YmveBcC8lydW6GoHMGmB6H/MTqUU60F2p10wjw=
@ -621,18 +598,18 @@ github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4=
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
github.com/sassoftware/go-rpmutils v0.2.1-0.20240124161140-277b154961dd h1:KpbqRPDwcAQTyaP+L+YudTRb3CnJlQ64Hfn1SF/zHBA=
github.com/sassoftware/go-rpmutils v0.2.1-0.20240124161140-277b154961dd/go.mod h1:TJJQYtLe/BeEmEjelI3b7xNZjzAukEkeWKmoakvaOoI=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw=
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
github.com/sassoftware/go-rpmutils v0.4.0 h1:ojND82NYBxgwrV+mX1CWsd5QJvvEZTKddtCdFLPWhpg=
github.com/sassoftware/go-rpmutils v0.4.0/go.mod h1:3goNWi7PGAT3/dlql2lv3+MSN5jNYPjT5mVcQcIsYzI=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
@ -643,22 +620,11 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs=
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d/go.mod h1:vq0tzqLRu6TS7Id0wMo2N5QzJoKedVeovOpHjnykSzY=
github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg=
github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck=
github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8=
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
@ -697,25 +663,16 @@ github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9r
github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs=
github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xanzy/go-gitlab v0.96.0 h1:LGkZ+wSNMRtHIBaYE4Hq3dZVjprwHv3Y1+rhKU3WETs=
github.com/xanzy/go-gitlab v0.96.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI=
github.com/xanzy/go-gitlab v0.109.0 h1:RcRme5w8VpLXTSTTMZdVoQWY37qTJWg+gwdQl4aAttE=
github.com/xanzy/go-gitlab v0.109.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
@ -725,10 +682,8 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5 h1:3seWKGVhGoc66Ht5QlhQsr4xT2caDnFegsnh2NqvENU=
github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yohcop/openid-go v1.0.1 h1:DPRd3iPO5F6O5zX2e62XpVAbPT6wV51cuucH0z9g3js=
github.com/yohcop/openid-go v1.0.1/go.mod h1:b/AvD03P0KHj4yuihb+VtLD6bYYgsy0zqBzPCRjkCNs=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
@ -737,16 +692,14 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark v1.7.0 h1:EfOIvIMZIzHdB/R/zVrikYLPPwJlfMcNczJFMs1m6sA=
github.com/yuin/goldmark v1.7.0/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ=
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I=
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY=
github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg=
github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ=
github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI=
github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE=
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
@ -761,7 +714,6 @@ go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZu
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
@ -771,44 +723,36 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/image v0.17.0 h1:nTRVVdajgB8zCMZVsViyzhnMKPwYeroEERRC64JuLco=
golang.org/x/image v0.17.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
@ -816,10 +760,10 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -827,16 +771,13 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190730183949-1393eb018365/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -847,8 +788,6 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -862,9 +801,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@ -874,10 +812,9 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
@ -888,15 +825,11 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
@ -904,17 +837,16 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA=
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -922,10 +854,9 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@ -937,7 +868,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/ini.v1 v1.44.2/go.mod h1:M3Cogqpuv0QCi3ExAY5V4uOt4qb/R3xZubo9m8lK5wg=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
@ -976,9 +906,7 @@ modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE=
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 h1:mUcz5b3FJbP5Cvdq7Khzn6J9OCUQJaBwgBkCR+MOwSs=
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:FJGmPh3vz9jSos1L/F91iAgnC/aejc0wIIrF2ZwJxdY=
xorm.io/builder v0.3.13 h1:a3jmiVVL19psGeXx8GIurTp7p0IIgqeDmwhcR6BAOAo=
xorm.io/builder v0.3.13/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
xorm.io/xorm v1.3.7 h1:mLceAGu0b87r9pD4qXyxGHxifOXIIrAdVcA6k95/osw=
xorm.io/xorm v1.3.7/go.mod h1:LsCCffeeYp63ssk0pKumP6l96WZcHix7ChpurcLNuMw=
xorm.io/xorm v1.3.9 h1:TUovzS0ko+IQ1XnNLfs5dqK1cJl1H5uHpWbWqAQ04nU=
xorm.io/xorm v1.3.9/go.mod h1:LsCCffeeYp63ssk0pKumP6l96WZcHix7ChpurcLNuMw=

View file

@ -69,7 +69,7 @@ func CreateArtifact(ctx context.Context, t *ActionTask, artifactName, artifactPa
OwnerID: t.OwnerID,
CommitSHA: t.CommitSHA,
Status: int64(ArtifactStatusUploadPending),
ExpiredUnix: timeutil.TimeStamp(time.Now().Unix() + 3600*24*expiredDays),
ExpiredUnix: timeutil.TimeStamp(time.Now().Unix() + timeutil.Day*expiredDays),
}
if _, err := db.GetEngine(ctx).Insert(artifact); err != nil {
return nil, err
@ -78,6 +78,13 @@ func CreateArtifact(ctx context.Context, t *ActionTask, artifactName, artifactPa
} else if err != nil {
return nil, err
}
if _, err := db.GetEngine(ctx).ID(artifact.ID).Cols("expired_unix").Update(&ActionArtifact{
ExpiredUnix: timeutil.TimeStamp(time.Now().Unix() + timeutil.Day*expiredDays),
}); err != nil {
return nil, err
}
return artifact, nil
}

View file

@ -4,7 +4,7 @@ package actions
import (
"context"
"encoding/hex"
"crypto/subtle"
"fmt"
auth_model "code.gitea.io/gitea/models/auth"
@ -14,7 +14,7 @@ import (
gouuid "github.com/google/uuid"
)
func RegisterRunner(ctx context.Context, ownerID, repoID int64, token string, labels []string, name, version string) (*ActionRunner, error) {
func RegisterRunner(ctx context.Context, ownerID, repoID int64, token string, labels *[]string, name, version string) (*ActionRunner, error) {
uuid, err := gouuid.FromBytes([]byte(token[:16]))
if err != nil {
return nil, fmt.Errorf("gouuid.FromBytes %v", err)
@ -26,22 +26,28 @@ func RegisterRunner(ctx context.Context, ownerID, repoID int64, token string, la
has, err := db.GetEngine(ctx).Where("uuid=?", uuidString).Get(&runner)
if err != nil {
return nil, fmt.Errorf("GetRunner %v", err)
} else if !has {
}
var mustUpdateSecret bool
if has {
//
// The runner exists, check if the rest of the token has changed.
//
mustUpdateSecret = subtle.ConstantTimeCompare(
[]byte(runner.TokenHash),
[]byte(auth_model.HashToken(token, runner.TokenSalt)),
) != 1
} else {
//
// The runner does not exist yet, create it
//
saltBytes, err := util.CryptoRandomBytes(16)
if err != nil {
return nil, fmt.Errorf("CryptoRandomBytes %v", err)
}
salt := hex.EncodeToString(saltBytes)
hash := auth_model.HashToken(token, salt)
runner = ActionRunner{
UUID: uuidString,
TokenHash: hash,
TokenSalt: salt,
UUID: uuidString,
AgentLabels: []string{},
}
if err := runner.UpdateSecret(token); err != nil {
return &runner, fmt.Errorf("can't set new runner's secret: %w", err)
}
if err := CreateRunner(ctx, &runner); err != nil {
@ -54,13 +60,23 @@ func RegisterRunner(ctx context.Context, ownerID, repoID int64, token string, la
//
name, _ = util.SplitStringAtByteN(name, 255)
cols := []string{"name", "owner_id", "repo_id", "version"}
runner.Name = name
runner.OwnerID = ownerID
runner.RepoID = repoID
runner.Version = version
runner.AgentLabels = labels
if labels != nil {
runner.AgentLabels = *labels
cols = append(cols, "agent_labels")
}
if mustUpdateSecret {
if err := runner.UpdateSecret(token); err != nil {
return &runner, fmt.Errorf("can't change runner's secret: %w", err)
}
cols = append(cols, "token_hash", "token_salt")
}
if err := UpdateRunner(ctx, &runner, "name", "owner_id", "repo_id", "version", "agent_labels"); err != nil {
if err := UpdateRunner(ctx, &runner, cols...); err != nil {
return &runner, fmt.Errorf("can't update the runner %+v %w", runner, err)
}

View file

@ -11,19 +11,168 @@ import (
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestActions_RegisterRunner(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
func TestActions_RegisterRunner_Token(t *testing.T) {
require.NoError(t, unittest.PrepareTestDatabase())
ownerID := int64(0)
repoID := int64(0)
token := "0123456789012345678901234567890123456789"
labels := []string{}
name := "runner"
version := "v1.2.3"
runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, labels, name, version)
assert.NoError(t, err)
runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, &labels, name, version)
require.NoError(t, err)
assert.EqualValues(t, name, runner.Name)
assert.EqualValues(t, 1, subtle.ConstantTimeCompare([]byte(runner.TokenHash), []byte(auth_model.HashToken(token, runner.TokenSalt))), "the token cannot be verified with the same method as routers/api/actions/runner/interceptor.go as of 8228751c55d6a4263f0fec2932ca16181c09c97d")
}
// TestActions_RegisterRunner_TokenUpdate tests that a token's secret is updated
// when a runner already exists and RegisterRunner is called with a token
// parameter whose first 16 bytes match that record but where the last 24 bytes
// do not match.
func TestActions_RegisterRunner_TokenUpdate(t *testing.T) {
const recordID = 12345678
oldToken := "7e577e577e577e57feedfacefeedfacefeedface"
newToken := "7e577e577e577e57deadbeefdeadbeefdeadbeef"
require.NoError(t, unittest.PrepareTestDatabase())
before := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
require.Equal(t,
before.TokenHash, auth_model.HashToken(oldToken, before.TokenSalt),
"the initial token should match the runner's secret",
)
RegisterRunner(db.DefaultContext, before.OwnerID, before.RepoID, newToken, nil, before.Name, before.Version)
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
assert.Equal(t, before.UUID, after.UUID)
assert.NotEqual(t,
after.TokenHash, auth_model.HashToken(oldToken, after.TokenSalt),
"the old token can still be verified",
)
assert.Equal(t,
after.TokenHash, auth_model.HashToken(newToken, after.TokenSalt),
"the new token cannot be verified",
)
}
func TestActions_RegisterRunner_CreateWithLabels(t *testing.T) {
require.NoError(t, unittest.PrepareTestDatabase())
ownerID := int64(0)
repoID := int64(0)
token := "0123456789012345678901234567890123456789"
name := "runner"
version := "v1.2.3"
labels := []string{"woop", "doop"}
labelsCopy := labels // labels may be affected by the tested function so we copy them
runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, &labels, name, version)
require.NoError(t, err)
// Check that the returned record has been updated, except for the labels
assert.EqualValues(t, ownerID, runner.OwnerID)
assert.EqualValues(t, repoID, runner.RepoID)
assert.EqualValues(t, name, runner.Name)
assert.EqualValues(t, version, runner.Version)
assert.EqualValues(t, labelsCopy, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID})
assert.EqualValues(t, ownerID, after.OwnerID)
assert.EqualValues(t, repoID, after.RepoID)
assert.EqualValues(t, name, after.Name)
assert.EqualValues(t, version, after.Version)
assert.EqualValues(t, labelsCopy, after.AgentLabels)
}
func TestActions_RegisterRunner_CreateWithoutLabels(t *testing.T) {
require.NoError(t, unittest.PrepareTestDatabase())
ownerID := int64(0)
repoID := int64(0)
token := "0123456789012345678901234567890123456789"
name := "runner"
version := "v1.2.3"
runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, nil, name, version)
require.NoError(t, err)
// Check that the returned record has been updated, except for the labels
assert.EqualValues(t, ownerID, runner.OwnerID)
assert.EqualValues(t, repoID, runner.RepoID)
assert.EqualValues(t, name, runner.Name)
assert.EqualValues(t, version, runner.Version)
assert.EqualValues(t, []string{}, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID})
assert.EqualValues(t, ownerID, after.OwnerID)
assert.EqualValues(t, repoID, after.RepoID)
assert.EqualValues(t, name, after.Name)
assert.EqualValues(t, version, after.Version)
assert.EqualValues(t, []string{}, after.AgentLabels)
}
func TestActions_RegisterRunner_UpdateWithLabels(t *testing.T) {
const recordID = 12345678
token := "7e577e577e577e57feedfacefeedfacefeedface"
require.NoError(t, unittest.PrepareTestDatabase())
unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
newOwnerID := int64(1)
newRepoID := int64(1)
newName := "rennur"
newVersion := "v4.5.6"
newLabels := []string{"warp", "darp"}
labelsCopy := newLabels // labels may be affected by the tested function so we copy them
runner, err := RegisterRunner(db.DefaultContext, newOwnerID, newRepoID, token, &newLabels, newName, newVersion)
require.NoError(t, err)
// Check that the returned record has been updated
assert.EqualValues(t, newOwnerID, runner.OwnerID)
assert.EqualValues(t, newRepoID, runner.RepoID)
assert.EqualValues(t, newName, runner.Name)
assert.EqualValues(t, newVersion, runner.Version)
assert.EqualValues(t, labelsCopy, runner.AgentLabels)
// Check that whatever is in the DB has been updated
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
assert.EqualValues(t, newOwnerID, after.OwnerID)
assert.EqualValues(t, newRepoID, after.RepoID)
assert.EqualValues(t, newName, after.Name)
assert.EqualValues(t, newVersion, after.Version)
assert.EqualValues(t, labelsCopy, after.AgentLabels)
}
func TestActions_RegisterRunner_UpdateWithoutLabels(t *testing.T) {
const recordID = 12345678
token := "7e577e577e577e57feedfacefeedfacefeedface"
require.NoError(t, unittest.PrepareTestDatabase())
before := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
newOwnerID := int64(1)
newRepoID := int64(1)
newName := "rennur"
newVersion := "v4.5.6"
runner, err := RegisterRunner(db.DefaultContext, newOwnerID, newRepoID, token, nil, newName, newVersion)
require.NoError(t, err)
// Check that the returned record has been updated, except for the labels
assert.EqualValues(t, newOwnerID, runner.OwnerID)
assert.EqualValues(t, newRepoID, runner.RepoID)
assert.EqualValues(t, newName, runner.Name)
assert.EqualValues(t, newVersion, runner.Version)
assert.EqualValues(t, before.AgentLabels, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
assert.EqualValues(t, newOwnerID, after.OwnerID)
assert.EqualValues(t, newRepoID, after.RepoID)
assert.EqualValues(t, newName, after.Name)
assert.EqualValues(t, newVersion, after.Version)
assert.EqualValues(t, before.AgentLabels, after.AgentLabels)
}

View file

@ -146,7 +146,11 @@ func (run *ActionRun) GetPushEventPayload() (*api.PushPayload, error) {
}
func (run *ActionRun) GetPullRequestEventPayload() (*api.PullRequestPayload, error) {
if run.Event == webhook_module.HookEventPullRequest || run.Event == webhook_module.HookEventPullRequestSync {
if run.Event == webhook_module.HookEventPullRequest ||
run.Event == webhook_module.HookEventPullRequestSync ||
run.Event == webhook_module.HookEventPullRequestAssign ||
run.Event == webhook_module.HookEventPullRequestMilestone ||
run.Event == webhook_module.HookEventPullRequestLabel {
var payload api.PullRequestPayload
if err := json.Unmarshal([]byte(run.EventPayload), &payload); err != nil {
return nil, err

View file

@ -6,10 +6,12 @@ package actions
import (
"context"
"encoding/binary"
"encoding/hex"
"fmt"
"strings"
"time"
auth_model "code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/shared/types"
@ -24,14 +26,25 @@ import (
)
// ActionRunner represents runner machines
//
// It can be:
// 1. global runner, OwnerID is 0 and RepoID is 0
// 2. org/user level runner, OwnerID is org/user ID and RepoID is 0
// 3. repo level runner, OwnerID is 0 and RepoID is repo ID
//
// Please note that it's not acceptable to have both OwnerID and RepoID to be non-zero,
// or it will be complicated to find runners belonging to a specific owner.
// For example, conditions like `OwnerID = 1` will also return runner {OwnerID: 1, RepoID: 1},
// but it's a repo level runner, not an org/user level runner.
// To avoid this, make it clear with {OwnerID: 0, RepoID: 1} for repo level runners.
type ActionRunner struct {
ID int64
UUID string `xorm:"CHAR(36) UNIQUE"`
Name string `xorm:"VARCHAR(255)"`
Version string `xorm:"VARCHAR(64)"`
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
OwnerID int64 `xorm:"index"`
Owner *user_model.User `xorm:"-"`
RepoID int64 `xorm:"index"` // repo level runner, if OwnerID also is zero, then it's a global
RepoID int64 `xorm:"index"`
Repo *repo_model.Repository `xorm:"-"`
Description string `xorm:"TEXT"`
Base int // 0 native 1 docker 2 virtual machine
@ -151,6 +164,22 @@ func (r *ActionRunner) GenerateToken() (err error) {
return err
}
// UpdateSecret updates the hash based on the specified token. It does not
// ensure that the runner's UUID matches the first 16 bytes of the token.
func (r *ActionRunner) UpdateSecret(token string) error {
saltBytes, err := util.CryptoRandomBytes(16)
if err != nil {
return fmt.Errorf("CryptoRandomBytes %v", err)
}
salt := hex.EncodeToString(saltBytes)
r.Token = token
r.TokenSalt = salt
r.TokenHash = auth_model.HashToken(token, salt)
return nil
}
func init() {
db.RegisterModel(&ActionRunner{})
}
@ -158,7 +187,7 @@ func init() {
type FindRunnerOptions struct {
db.ListOptions
RepoID int64
OwnerID int64
OwnerID int64 // it will be ignored if RepoID is set
Sort string
Filter string
IsOnline optional.Option[bool]
@ -175,8 +204,7 @@ func (opts FindRunnerOptions) ToConds() builder.Cond {
c = c.Or(builder.Eq{"repo_id": 0, "owner_id": 0})
}
cond = cond.And(c)
}
if opts.OwnerID > 0 {
} else if opts.OwnerID > 0 { // OwnerID is ignored if RepoID is set
c := builder.NewCond().And(builder.Eq{"owner_id": opts.OwnerID})
if opts.WithAvailable {
c = c.Or(builder.Eq{"repo_id": 0, "owner_id": 0})
@ -279,6 +307,11 @@ func DeleteRunner(ctx context.Context, id int64) error {
// CreateRunner creates new runner.
func CreateRunner(ctx context.Context, t *ActionRunner) error {
if t.OwnerID != 0 && t.RepoID != 0 {
// It's trying to create a runner that belongs to a repository, but OwnerID has been set accidentally.
// Remove OwnerID to avoid confusion; it's not worth returning an error here.
t.OwnerID = 0
}
return db.Insert(ctx, t)
}

View file

@ -7,23 +7,39 @@ import (
"fmt"
"testing"
auth_model "code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// TestUpdateSecret checks that ActionRunner.UpdateSecret() sets the Token,
// TokenSalt and TokenHash fields based on the specified token.
func TestUpdateSecret(t *testing.T) {
runner := ActionRunner{}
token := "0123456789012345678901234567890123456789"
err := runner.UpdateSecret(token)
require.NoError(t, err)
assert.Equal(t, token, runner.Token)
assert.Regexp(t, "^[0-9a-f]{32}$", runner.TokenSalt)
assert.Equal(t, runner.TokenHash, auth_model.HashToken(token, runner.TokenSalt))
}
func TestDeleteRunner(t *testing.T) {
const recordID = 12345678
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
before := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
err := DeleteRunner(db.DefaultContext, recordID)
assert.NoError(t, err)
require.NoError(t, err)
var after ActionRunner
found, err := db.GetEngine(db.DefaultContext).ID(recordID).Unscoped().Get(&after)
assert.NoError(t, err)
require.NoError(t, err)
assert.True(t, found)
// Most fields (namely Name, Version, OwnerID, RepoID, Description, Base, RepoRange,

View file

@ -15,12 +15,23 @@ import (
)
// ActionRunnerToken represents runner tokens
//
// It can be:
// 1. global token, OwnerID is 0 and RepoID is 0
// 2. org/user level token, OwnerID is org/user ID and RepoID is 0
// 3. repo level token, OwnerID is 0 and RepoID is repo ID
//
// Please note that it's not acceptable to have both OwnerID and RepoID to be non-zero,
// or it will be complicated to find tokens belonging to a specific owner.
// For example, conditions like `OwnerID = 1` will also return token {OwnerID: 1, RepoID: 1},
// but it's a repo level token, not an org/user level token.
// To avoid this, make it clear with {OwnerID: 0, RepoID: 1} for repo level tokens.
type ActionRunnerToken struct {
ID int64
Token string `xorm:"UNIQUE"`
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
OwnerID int64 `xorm:"index"`
Owner *user_model.User `xorm:"-"`
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
RepoID int64 `xorm:"index"`
Repo *repo_model.Repository `xorm:"-"`
IsActive bool // true means it can be used
@ -58,7 +69,14 @@ func UpdateRunnerToken(ctx context.Context, r *ActionRunnerToken, cols ...string
}
// NewRunnerToken creates a new active runner token and invalidate all old tokens
// ownerID will be ignored and treated as 0 if repoID is non-zero.
func NewRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerToken, error) {
if ownerID != 0 && repoID != 0 {
// It's trying to create a runner token that belongs to a repository, but OwnerID has been set accidentally.
// Remove OwnerID to avoid confusion; it's not worth returning an error here.
ownerID = 0
}
token, err := util.CryptoRandomString(40)
if err != nil {
return nil, err
@ -84,6 +102,12 @@ func NewRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerTo
// GetLatestRunnerToken returns the latest runner token
func GetLatestRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerToken, error) {
if ownerID != 0 && repoID != 0 {
// It's trying to get a runner token that belongs to a repository, but OwnerID has been set accidentally.
// Remove OwnerID to avoid confusion; it's not worth returning an error here.
ownerID = 0
}
var runnerToken ActionRunnerToken
has, err := db.GetEngine(ctx).Where("owner_id=? AND repo_id=?", ownerID, repoID).
OrderBy("id DESC").Get(&runnerToken)

View file

@ -10,31 +10,32 @@ import (
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetLatestRunnerToken(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
token := unittest.AssertExistsAndLoadBean(t, &ActionRunnerToken{ID: 3})
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
assert.NoError(t, err)
assert.EqualValues(t, token, expectedToken)
require.NoError(t, err)
assert.EqualValues(t, expectedToken, token)
}
func TestNewRunnerToken(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
token, err := NewRunnerToken(db.DefaultContext, 1, 0)
assert.NoError(t, err)
require.NoError(t, err)
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
assert.NoError(t, err)
assert.EqualValues(t, token, expectedToken)
require.NoError(t, err)
assert.EqualValues(t, expectedToken, token)
}
func TestUpdateRunnerToken(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
token := unittest.AssertExistsAndLoadBean(t, &ActionRunnerToken{ID: 3})
token.IsActive = true
assert.NoError(t, UpdateRunnerToken(db.DefaultContext, token))
require.NoError(t, UpdateRunnerToken(db.DefaultContext, token))
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
assert.NoError(t, err)
assert.EqualValues(t, token, expectedToken)
require.NoError(t, err)
assert.EqualValues(t, expectedToken, token)
}

View file

@ -13,8 +13,6 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/timeutil"
webhook_module "code.gitea.io/gitea/modules/webhook"
"github.com/robfig/cron/v3"
)
// ActionSchedule represents a schedule of a workflow file
@ -53,8 +51,6 @@ func GetReposMapByIDs(ctx context.Context, ids []int64) (map[int64]*repo_model.R
return repos, db.GetEngine(ctx).In("id", ids).Find(&repos)
}
var cronParser = cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
// CreateScheduleTask creates new schedule task.
func CreateScheduleTask(ctx context.Context, rows []*ActionSchedule) error {
// Return early if there are no rows to insert
@ -80,19 +76,21 @@ func CreateScheduleTask(ctx context.Context, rows []*ActionSchedule) error {
now := time.Now()
for _, spec := range row.Specs {
specRow := &ActionScheduleSpec{
RepoID: row.RepoID,
ScheduleID: row.ID,
Spec: spec,
}
// Parse the spec and check for errors
schedule, err := cronParser.Parse(spec)
schedule, err := specRow.Parse()
if err != nil {
continue // skip to the next spec if there's an error
}
specRow.Next = timeutil.TimeStamp(schedule.Next(now).Unix())
// Insert the new schedule spec row
if err = db.Insert(ctx, &ActionScheduleSpec{
RepoID: row.RepoID,
ScheduleID: row.ID,
Spec: spec,
Next: timeutil.TimeStamp(schedule.Next(now).Unix()),
}); err != nil {
if err = db.Insert(ctx, specRow); err != nil {
return err
}
}
@ -120,21 +118,23 @@ func DeleteScheduleTaskByRepo(ctx context.Context, id int64) error {
return committer.Commit()
}
func CleanRepoScheduleTasks(ctx context.Context, repo *repo_model.Repository) error {
func CleanRepoScheduleTasks(ctx context.Context, repo *repo_model.Repository, cancelPreviousJobs bool) error {
// If actions disabled when there is schedule task, this will remove the outdated schedule tasks
// There is no other place we can do this because the app.ini will be changed manually
if err := DeleteScheduleTaskByRepo(ctx, repo.ID); err != nil {
return fmt.Errorf("DeleteCronTaskByRepo: %v", err)
}
// cancel running cron jobs of this repository and delete old schedules
if err := CancelPreviousJobs(
ctx,
repo.ID,
repo.DefaultBranch,
"",
webhook_module.HookEventSchedule,
); err != nil {
return fmt.Errorf("CancelPreviousJobs: %v", err)
if cancelPreviousJobs {
// cancel running cron jobs of this repository and delete old schedules
if err := CancelPreviousJobs(
ctx,
repo.ID,
repo.DefaultBranch,
"",
webhook_module.HookEventSchedule,
); err != nil {
return fmt.Errorf("CancelPreviousJobs: %v", err)
}
}
return nil
}

View file

@ -5,6 +5,8 @@ package actions
import (
"context"
"strings"
"time"
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
@ -32,8 +34,29 @@ type ActionScheduleSpec struct {
Updated timeutil.TimeStamp `xorm:"updated"`
}
// Parse parses the spec and returns a cron.Schedule
// Unlike the default cron parser, Parse uses UTC timezone as the default if none is specified.
func (s *ActionScheduleSpec) Parse() (cron.Schedule, error) {
return cronParser.Parse(s.Spec)
parser := cron.NewParser(cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
schedule, err := parser.Parse(s.Spec)
if err != nil {
return nil, err
}
// If the spec has specified a timezone, use it
if strings.HasPrefix(s.Spec, "TZ=") || strings.HasPrefix(s.Spec, "CRON_TZ=") {
return schedule, nil
}
specSchedule, ok := schedule.(*cron.SpecSchedule)
// If it's not a spec schedule, like "@every 5m", timezone is not relevant
if !ok {
return schedule, nil
}
// Set the timezone to UTC
specSchedule.Location = time.UTC
return specSchedule, nil
}
func init() {

View file

@ -22,6 +22,10 @@ func (specs SpecList) GetScheduleIDs() []int64 {
}
func (specs SpecList) LoadSchedules(ctx context.Context) error {
if len(specs) == 0 {
return nil
}
scheduleIDs := specs.GetScheduleIDs()
schedules, err := GetSchedulesMapByIDs(ctx, scheduleIDs)
if err != nil {
@ -50,6 +54,10 @@ func (specs SpecList) GetRepoIDs() []int64 {
}
func (specs SpecList) LoadRepos(ctx context.Context) error {
if len(specs) == 0 {
return nil
}
repoIDs := specs.GetRepoIDs()
repos, err := repo_model.GetRepositoriesMapByIDs(ctx, repoIDs)
if err != nil {

View file

@ -0,0 +1,71 @@
// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package actions
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestActionScheduleSpec_Parse(t *testing.T) {
// Mock the local timezone is not UTC
local := time.Local
tz, err := time.LoadLocation("Asia/Shanghai")
require.NoError(t, err)
defer func() {
time.Local = local
}()
time.Local = tz
now, err := time.Parse(time.RFC3339, "2024-07-31T15:47:55+08:00")
require.NoError(t, err)
tests := []struct {
name string
spec string
want string
wantErr assert.ErrorAssertionFunc
}{
{
name: "regular",
spec: "0 10 * * *",
want: "2024-07-31T10:00:00Z",
wantErr: assert.NoError,
},
{
name: "invalid",
spec: "0 10 * *",
want: "",
wantErr: assert.Error,
},
{
name: "with timezone",
spec: "TZ=America/New_York 0 10 * * *",
want: "2024-07-31T14:00:00Z",
wantErr: assert.NoError,
},
{
name: "timezone irrelevant",
spec: "@every 5m",
want: "2024-07-31T07:52:55Z",
wantErr: assert.NoError,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &ActionScheduleSpec{
Spec: tt.spec,
}
got, err := s.Parse()
tt.wantErr(t, err)
if err == nil {
assert.Equal(t, tt.want, got.Next(now).UTC().Format(time.RFC3339))
}
})
}
}

View file

@ -35,7 +35,7 @@ type ActionTask struct {
RunnerID int64 `xorm:"index"`
Status Status `xorm:"index"`
Started timeutil.TimeStamp `xorm:"index"`
Stopped timeutil.TimeStamp
Stopped timeutil.TimeStamp `xorm:"index(stopped_log_expired)"`
RepoID int64 `xorm:"index"`
OwnerID int64 `xorm:"index"`
@ -51,8 +51,8 @@ type ActionTask struct {
LogInStorage bool // read log from database or from storage
LogLength int64 // lines count
LogSize int64 // blob size
LogIndexes LogIndexes `xorm:"LONGBLOB"` // line number to offset
LogExpired bool // files that are too old will be deleted
LogIndexes LogIndexes `xorm:"LONGBLOB"` // line number to offset
LogExpired bool `xorm:"index(stopped_log_expired)"` // files that are too old will be deleted
Created timeutil.TimeStamp `xorm:"created"`
Updated timeutil.TimeStamp `xorm:"updated index"`
@ -470,6 +470,16 @@ func StopTask(ctx context.Context, taskID int64, status Status) error {
return nil
}
func FindOldTasksToExpire(ctx context.Context, olderThan timeutil.TimeStamp, limit int) ([]*ActionTask, error) {
e := db.GetEngine(ctx)
tasks := make([]*ActionTask, 0, limit)
// Check "stopped > 0" to avoid deleting tasks that are still running
return tasks, e.Where("stopped > 0 AND stopped < ? AND log_expired = ?", olderThan, false).
Limit(limit).
Find(&tasks)
}
func isSubset(set, subset []string) bool {
m := make(container.Set[string], len(set))
for _, v := range set {
@ -492,7 +502,13 @@ func convertTimestamp(timestamp *timestamppb.Timestamp) timeutil.TimeStamp {
}
func logFileName(repoFullName string, taskID int64) string {
return fmt.Sprintf("%s/%02x/%d.log", repoFullName, taskID%256, taskID)
ret := fmt.Sprintf("%s/%02x/%d.log", repoFullName, taskID%256, taskID)
if setting.Actions.LogCompression.IsZstd() {
ret += ".zst"
}
return ret
}
func getTaskIDFromCache(token string) int64 {

View file

@ -5,7 +5,6 @@ package actions
import (
"context"
"errors"
"strings"
"code.gitea.io/gitea/models/db"
@ -15,6 +14,18 @@ import (
"xorm.io/builder"
)
// ActionVariable represents a variable that can be used in actions
//
// It can be:
// 1. global variable, OwnerID is 0 and RepoID is 0
// 2. org/user level variable, OwnerID is org/user ID and RepoID is 0
// 3. repo level variable, OwnerID is 0 and RepoID is repo ID
//
// Please note that it's not acceptable to have both OwnerID and RepoID to be non-zero,
// or it will be complicated to find variables belonging to a specific owner.
// For example, conditions like `OwnerID = 1` will also return variable {OwnerID: 1, RepoID: 1},
// but it's a repo level variable, not an org/user level variable.
// To avoid this, make it clear with {OwnerID: 0, RepoID: 1} for repo level variables.
type ActionVariable struct {
ID int64 `xorm:"pk autoincr"`
OwnerID int64 `xorm:"UNIQUE(owner_repo_name)"`
@ -29,30 +40,26 @@ func init() {
db.RegisterModel(new(ActionVariable))
}
func (v *ActionVariable) Validate() error {
if v.OwnerID != 0 && v.RepoID != 0 {
return errors.New("a variable should not be bound to an owner and a repository at the same time")
}
return nil
}
func InsertVariable(ctx context.Context, ownerID, repoID int64, name, data string) (*ActionVariable, error) {
if ownerID != 0 && repoID != 0 {
// It's trying to create a variable that belongs to a repository, but OwnerID has been set accidentally.
// Remove OwnerID to avoid confusion; it's not worth returning an error here.
ownerID = 0
}
variable := &ActionVariable{
OwnerID: ownerID,
RepoID: repoID,
Name: strings.ToUpper(name),
Data: data,
}
if err := variable.Validate(); err != nil {
return variable, err
}
return variable, db.Insert(ctx, variable)
}
type FindVariablesOpts struct {
db.ListOptions
OwnerID int64
RepoID int64
OwnerID int64 // it will be ignored if RepoID is set
Name string
}
@ -60,8 +67,13 @@ func (opts FindVariablesOpts) ToConds() builder.Cond {
cond := builder.NewCond()
// Since we now support instance-level variables,
// there is no need to check for null values for `owner_id` and `repo_id`
cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
cond = cond.And(builder.Eq{"repo_id": opts.RepoID})
if opts.RepoID != 0 { // if RepoID is set
// ignore OwnerID and treat it as 0
cond = cond.And(builder.Eq{"owner_id": 0})
} else {
cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
}
if opts.Name != "" {
cond = cond.And(builder.Eq{"name": strings.ToUpper(opts.Name)})

View file

@ -440,6 +440,7 @@ type GetFeedsOptions struct {
OnlyPerformedByActor bool // only actions performed by the original actor
IncludeDeleted bool // include deleted actions
Date string // the day we want activity for: YYYY-MM-DD
IncludeInaccessible bool // if inaccessible activities should be included
}
// GetFeeds returns actions according to the provided options
@ -526,7 +527,7 @@ func activityQueryCondition(ctx context.Context, opts GetFeedsOptions) (builder.
}
// check readable repositories by doer/actor
if opts.Actor == nil || !opts.Actor.IsAdmin {
if !opts.IncludeInaccessible && (opts.Actor == nil || !opts.Actor.IsAdmin) {
cond = cond.And(builder.In("repo_id", repo_model.AccessibleRepoIDsQuery(opts.Actor)))
}

View file

@ -17,10 +17,11 @@ import (
"code.gitea.io/gitea/modules/setting"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestAction_GetRepoPath(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
action := &activities_model.Action{RepoID: repo.ID}
@ -28,7 +29,7 @@ func TestAction_GetRepoPath(t *testing.T) {
}
func TestAction_GetRepoLink(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
comment := unittest.AssertExistsAndLoadBean(t, &issue_model.Comment{ID: 2})
@ -42,7 +43,7 @@ func TestAction_GetRepoLink(t *testing.T) {
func TestGetFeeds(t *testing.T) {
// test with an individual user
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
actions, count, err := activities_model.GetFeeds(db.DefaultContext, activities_model.GetFeedsOptions{
@ -52,7 +53,7 @@ func TestGetFeeds(t *testing.T) {
OnlyPerformedBy: false,
IncludeDeleted: true,
})
assert.NoError(t, err)
require.NoError(t, err)
if assert.Len(t, actions, 1) {
assert.EqualValues(t, 1, actions[0].ID)
assert.EqualValues(t, user.ID, actions[0].UserID)
@ -65,13 +66,13 @@ func TestGetFeeds(t *testing.T) {
IncludePrivate: false,
OnlyPerformedBy: false,
})
assert.NoError(t, err)
assert.Len(t, actions, 0)
require.NoError(t, err)
assert.Empty(t, actions)
assert.Equal(t, int64(0), count)
}
func TestGetFeedsForRepos(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
privRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
pubRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 8})
@ -81,8 +82,8 @@ func TestGetFeedsForRepos(t *testing.T) {
RequestedRepo: privRepo,
IncludePrivate: true,
})
assert.NoError(t, err)
assert.Len(t, actions, 0)
require.NoError(t, err)
assert.Empty(t, actions)
assert.Equal(t, int64(0), count)
// public repo & no login
@ -90,7 +91,7 @@ func TestGetFeedsForRepos(t *testing.T) {
RequestedRepo: pubRepo,
IncludePrivate: true,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, actions, 1)
assert.Equal(t, int64(1), count)
@ -100,7 +101,7 @@ func TestGetFeedsForRepos(t *testing.T) {
IncludePrivate: true,
Actor: user,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, actions, 1)
assert.Equal(t, int64(1), count)
@ -110,14 +111,14 @@ func TestGetFeedsForRepos(t *testing.T) {
IncludePrivate: true,
Actor: user,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, actions, 1)
assert.Equal(t, int64(1), count)
}
func TestGetFeeds2(t *testing.T) {
// test with an organization user
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
org := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3})
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
@ -128,7 +129,7 @@ func TestGetFeeds2(t *testing.T) {
OnlyPerformedBy: false,
IncludeDeleted: true,
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, actions, 1)
if assert.Len(t, actions, 1) {
assert.EqualValues(t, 2, actions[0].ID)
@ -143,8 +144,8 @@ func TestGetFeeds2(t *testing.T) {
OnlyPerformedBy: false,
IncludeDeleted: true,
})
assert.NoError(t, err)
assert.Len(t, actions, 0)
require.NoError(t, err)
assert.Empty(t, actions)
assert.Equal(t, int64(0), count)
}
@ -189,14 +190,14 @@ func TestActivityReadable(t *testing.T) {
}
func TestNotifyWatchers(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
action := &activities_model.Action{
ActUserID: 8,
RepoID: 1,
OpType: activities_model.ActionStarRepo,
}
assert.NoError(t, activities_model.NotifyWatchers(db.DefaultContext, action))
require.NoError(t, activities_model.NotifyWatchers(db.DefaultContext, action))
// One watchers are inactive, thus action is only created for user 8, 1, 4, 11
unittest.AssertExistsAndLoadBean(t, &activities_model.Action{
@ -226,7 +227,7 @@ func TestNotifyWatchers(t *testing.T) {
}
func TestGetFeedsCorrupted(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
unittest.AssertExistsAndLoadBean(t, &activities_model.Action{
ID: 8,
@ -238,8 +239,8 @@ func TestGetFeedsCorrupted(t *testing.T) {
Actor: user,
IncludePrivate: true,
})
assert.NoError(t, err)
assert.Len(t, actions, 0)
require.NoError(t, err)
assert.Empty(t, actions)
assert.Equal(t, int64(0), count)
}
@ -247,47 +248,46 @@ func TestConsistencyUpdateAction(t *testing.T) {
if !setting.Database.Type.IsSQLite3() {
t.Skip("Test is only for SQLite database.")
}
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
id := 8
unittest.AssertExistsAndLoadBean(t, &activities_model.Action{
ID: int64(id),
})
_, err := db.GetEngine(db.DefaultContext).Exec(`UPDATE action SET created_unix = "" WHERE id = ?`, id)
assert.NoError(t, err)
require.NoError(t, err)
actions := make([]*activities_model.Action, 0, 1)
//
// XORM returns an error when created_unix is a string
//
err = db.GetEngine(db.DefaultContext).Where("id = ?", id).Find(&actions)
if assert.Error(t, err) {
assert.Contains(t, err.Error(), "type string to a int64: invalid syntax")
}
require.ErrorContains(t, err, "type string to a int64: invalid syntax")
//
// Get rid of incorrectly set created_unix
//
count, err := activities_model.CountActionCreatedUnixString(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 1, count)
count, err = activities_model.FixActionCreatedUnixString(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 1, count)
count, err = activities_model.CountActionCreatedUnixString(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 0, count)
count, err = activities_model.FixActionCreatedUnixString(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 0, count)
//
// XORM must be happy now
//
assert.NoError(t, db.GetEngine(db.DefaultContext).Where("id = ?", id).Find(&actions))
require.NoError(t, db.GetEngine(db.DefaultContext).Where("id = ?", id).Find(&actions))
unittest.CheckConsistencyFor(t, &activities_model.Action{})
}
func TestDeleteIssueActions(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
// load an issue
issue := unittest.AssertExistsAndLoadBean(t, &issue_model.Issue{ID: 4})
@ -295,26 +295,26 @@ func TestDeleteIssueActions(t *testing.T) {
// insert a comment
err := db.Insert(db.DefaultContext, &issue_model.Comment{Type: issue_model.CommentTypeComment, IssueID: issue.ID})
assert.NoError(t, err)
require.NoError(t, err)
comment := unittest.AssertExistsAndLoadBean(t, &issue_model.Comment{Type: issue_model.CommentTypeComment, IssueID: issue.ID})
// truncate action table and insert some actions
err = db.TruncateBeans(db.DefaultContext, &activities_model.Action{})
assert.NoError(t, err)
require.NoError(t, err)
err = db.Insert(db.DefaultContext, &activities_model.Action{
OpType: activities_model.ActionCommentIssue,
CommentID: comment.ID,
})
assert.NoError(t, err)
require.NoError(t, err)
err = db.Insert(db.DefaultContext, &activities_model.Action{
OpType: activities_model.ActionCreateIssue,
RepoID: issue.RepoID,
Content: fmt.Sprintf("%d|content...", issue.Index),
})
assert.NoError(t, err)
require.NoError(t, err)
// assert that the actions exist, then delete them
unittest.AssertCount(t, &activities_model.Action{}, 2)
assert.NoError(t, activities_model.DeleteIssueActions(db.DefaultContext, issue.RepoID, issue.ID, issue.Index))
require.NoError(t, activities_model.DeleteIssueActions(db.DefaultContext, issue.RepoID, issue.ID, issue.Index))
unittest.AssertCount(t, &activities_model.Action{}, 0)
}

View file

@ -10,6 +10,7 @@ import (
_ "code.gitea.io/gitea/models"
_ "code.gitea.io/gitea/models/actions"
_ "code.gitea.io/gitea/models/forgefed"
)
func TestMain(m *testing.M) {

View file

@ -287,13 +287,14 @@ type UserIDCount struct {
Count int64
}
// GetUIDsAndNotificationCounts between the two provided times
// GetUIDsAndNotificationCounts returns the unread counts for every user between the two provided times.
// It must return all user IDs which appear during the period, including count=0 for users who have read all.
func GetUIDsAndNotificationCounts(ctx context.Context, since, until timeutil.TimeStamp) ([]UserIDCount, error) {
sql := `SELECT user_id, count(*) AS count FROM notification ` +
sql := `SELECT user_id, sum(case when status= ? then 1 else 0 end) AS count FROM notification ` +
`WHERE user_id IN (SELECT user_id FROM notification WHERE updated_unix >= ? AND ` +
`updated_unix < ?) AND status = ? GROUP BY user_id`
`updated_unix < ?) GROUP BY user_id`
var res []UserIDCount
return res, db.GetEngine(ctx).SQL(sql, since, until, NotificationStatusUnread).Find(&res)
return res, db.GetEngine(ctx).SQL(sql, NotificationStatusUnread, since, until).Find(&res)
}
// SetIssueReadBy sets issue to be read by given user.

View file

@ -14,13 +14,14 @@ import (
user_model "code.gitea.io/gitea/models/user"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestCreateOrUpdateIssueNotifications(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1})
assert.NoError(t, activities_model.CreateOrUpdateIssueNotifications(db.DefaultContext, issue.ID, 0, 2, 0))
require.NoError(t, activities_model.CreateOrUpdateIssueNotifications(db.DefaultContext, issue.ID, 0, 2, 0))
// User 9 is inactive, thus notifications for user 1 and 4 are created
notf := unittest.AssertExistsAndLoadBean(t, &activities_model.Notification{UserID: 1, IssueID: issue.ID})
@ -32,7 +33,7 @@ func TestCreateOrUpdateIssueNotifications(t *testing.T) {
}
func TestNotificationsForUser(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
notfs, err := db.Find[activities_model.Notification](db.DefaultContext, activities_model.FindNotificationOptions{
UserID: user.ID,
@ -41,7 +42,7 @@ func TestNotificationsForUser(t *testing.T) {
activities_model.NotificationStatusUnread,
},
})
assert.NoError(t, err)
require.NoError(t, err)
if assert.Len(t, notfs, 3) {
assert.EqualValues(t, 5, notfs[0].ID)
assert.EqualValues(t, user.ID, notfs[0].UserID)
@ -53,25 +54,25 @@ func TestNotificationsForUser(t *testing.T) {
}
func TestNotification_GetRepo(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
notf := unittest.AssertExistsAndLoadBean(t, &activities_model.Notification{RepoID: 1})
repo, err := notf.GetRepo(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, repo, notf.Repository)
assert.EqualValues(t, notf.RepoID, repo.ID)
}
func TestNotification_GetIssue(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
notf := unittest.AssertExistsAndLoadBean(t, &activities_model.Notification{RepoID: 1})
issue, err := notf.GetIssue(db.DefaultContext)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, issue, notf.Issue)
assert.EqualValues(t, notf.IssueID, issue.ID)
}
func TestGetNotificationCount(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
cnt, err := db.Count[activities_model.Notification](db.DefaultContext, activities_model.FindNotificationOptions{
UserID: user.ID,
@ -79,7 +80,7 @@ func TestGetNotificationCount(t *testing.T) {
activities_model.NotificationStatusRead,
},
})
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 0, cnt)
cnt, err = db.Count[activities_model.Notification](db.DefaultContext, activities_model.FindNotificationOptions{
@ -88,28 +89,28 @@ func TestGetNotificationCount(t *testing.T) {
activities_model.NotificationStatusUnread,
},
})
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, 1, cnt)
}
func TestSetNotificationStatus(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
notf := unittest.AssertExistsAndLoadBean(t,
&activities_model.Notification{UserID: user.ID, Status: activities_model.NotificationStatusRead})
_, err := activities_model.SetNotificationStatus(db.DefaultContext, notf.ID, user, activities_model.NotificationStatusPinned)
assert.NoError(t, err)
require.NoError(t, err)
unittest.AssertExistsAndLoadBean(t,
&activities_model.Notification{ID: notf.ID, Status: activities_model.NotificationStatusPinned})
_, err = activities_model.SetNotificationStatus(db.DefaultContext, 1, user, activities_model.NotificationStatusRead)
assert.Error(t, err)
require.Error(t, err)
_, err = activities_model.SetNotificationStatus(db.DefaultContext, unittest.NonexistentID, user, activities_model.NotificationStatusRead)
assert.Error(t, err)
require.Error(t, err)
}
func TestUpdateNotificationStatuses(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
notfUnread := unittest.AssertExistsAndLoadBean(t,
&activities_model.Notification{UserID: user.ID, Status: activities_model.NotificationStatusUnread})
@ -117,7 +118,7 @@ func TestUpdateNotificationStatuses(t *testing.T) {
&activities_model.Notification{UserID: user.ID, Status: activities_model.NotificationStatusRead})
notfPinned := unittest.AssertExistsAndLoadBean(t,
&activities_model.Notification{UserID: user.ID, Status: activities_model.NotificationStatusPinned})
assert.NoError(t, activities_model.UpdateNotificationStatuses(db.DefaultContext, user, activities_model.NotificationStatusUnread, activities_model.NotificationStatusRead))
require.NoError(t, activities_model.UpdateNotificationStatuses(db.DefaultContext, user, activities_model.NotificationStatusUnread, activities_model.NotificationStatusRead))
unittest.AssertExistsAndLoadBean(t,
&activities_model.Notification{ID: notfUnread.ID, Status: activities_model.NotificationStatusRead})
unittest.AssertExistsAndLoadBean(t,
@ -127,14 +128,14 @@ func TestUpdateNotificationStatuses(t *testing.T) {
}
func TestSetIssueReadBy(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1})
assert.NoError(t, db.WithTx(db.DefaultContext, func(ctx context.Context) error {
require.NoError(t, db.WithTx(db.DefaultContext, func(ctx context.Context) error {
return activities_model.SetIssueReadBy(ctx, issue.ID, user.ID)
}))
nt, err := activities_model.GetIssueNotification(db.DefaultContext, user.ID, issue.ID)
assert.NoError(t, err)
require.NoError(t, err)
assert.EqualValues(t, activities_model.NotificationStatusRead, nt.Status)
}

View file

@ -34,6 +34,7 @@ type ActivityStats struct {
OpenedPRAuthorCount int64
MergedPRs issues_model.PullRequestList
MergedPRAuthorCount int64
ActiveIssues issues_model.IssueList
OpenedIssues issues_model.IssueList
OpenedIssueAuthorCount int64
ClosedIssues issues_model.IssueList
@ -172,7 +173,7 @@ func (stats *ActivityStats) MergedPRPerc() int {
// ActiveIssueCount returns total active issue count
func (stats *ActivityStats) ActiveIssueCount() int {
return stats.OpenedIssueCount() + stats.ClosedIssueCount()
return len(stats.ActiveIssues)
}
// OpenedIssueCount returns open issue count
@ -285,13 +286,21 @@ func (stats *ActivityStats) FillIssues(ctx context.Context, repoID int64, fromTi
stats.ClosedIssueAuthorCount = count
// New issues
sess = issuesForActivityStatement(ctx, repoID, fromTime, false, false)
sess = newlyCreatedIssues(ctx, repoID, fromTime)
sess.OrderBy("issue.created_unix ASC")
stats.OpenedIssues = make(issues_model.IssueList, 0)
if err = sess.Find(&stats.OpenedIssues); err != nil {
return err
}
// Active issues
sess = activeIssues(ctx, repoID, fromTime)
sess.OrderBy("issue.created_unix ASC")
stats.ActiveIssues = make(issues_model.IssueList, 0)
if err = sess.Find(&stats.ActiveIssues); err != nil {
return err
}
// Opened issue authors
sess = issuesForActivityStatement(ctx, repoID, fromTime, false, false)
if _, err = sess.Select("count(distinct issue.poster_id) as `count`").Table("issue").Get(&count); err != nil {
@ -317,6 +326,22 @@ func (stats *ActivityStats) FillUnresolvedIssues(ctx context.Context, repoID int
return sess.Find(&stats.UnresolvedIssues)
}
func newlyCreatedIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID).
And("issue.is_pull = ?", false). // Retain the is_pull check to exclude pull requests
And("issue.created_unix >= ?", fromTime.Unix()) // Include all issues created after fromTime
return sess
}
func activeIssues(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID).
And("issue.is_pull = ?", false).
And("issue.created_unix >= ? OR issue.closed_unix >= ?", fromTime.Unix(), fromTime.Unix())
return sess
}
func issuesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time, closed, unresolved bool) *xorm.Session {
sess := db.GetEngine(ctx).Where("issue.repo_id = ?", repoID).
And("issue.is_closed = ?", closed)

View file

@ -0,0 +1,30 @@
// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package activities
import (
"testing"
"time"
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetActivityStats(t *testing.T) {
require.NoError(t, unittest.PrepareTestDatabase())
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
stats, err := GetActivityStats(db.DefaultContext, repo, time.Unix(0, 0), true, true, true, true)
require.NoError(t, err)
assert.EqualValues(t, 2, stats.ActiveIssueCount())
assert.EqualValues(t, 2, stats.OpenedIssueCount())
assert.EqualValues(t, 0, stats.ClosedIssueCount())
assert.EqualValues(t, 3, stats.ActivePRCount())
}

View file

@ -53,6 +53,7 @@ func getUserHeatmapData(ctx context.Context, user *user_model.User, team *organi
// * For organizations actions by all users that were made in owned
// repositories are counted.
OnlyPerformedBy: !user.IsOrganization(),
IncludeInaccessible: true,
})
if err != nil {
return nil, err

View file

@ -4,7 +4,6 @@
package activities_test
import (
"fmt"
"testing"
"time"
@ -16,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/timeutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetUserHeatmapDataByUser(t *testing.T) {
@ -56,7 +56,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
},
}
// Prepare
assert.NoError(t, unittest.PrepareTestDatabase())
require.NoError(t, unittest.PrepareTestDatabase())
// Mock time
timeutil.MockSet(time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC))
@ -67,7 +67,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
doer := &user_model.User{ID: tc.doerID}
_, err := unittest.LoadBeanIfExists(doer)
assert.NoError(t, err)
require.NoError(t, err)
if tc.doerID == 0 {
doer = nil
}
@ -80,7 +80,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
OnlyPerformedBy: true,
IncludeDeleted: true,
})
assert.NoError(t, err)
require.NoError(t, err)
// Get the heatmap and compare
heatmap, err := activities_model.GetUserHeatmapDataByUser(db.DefaultContext, user, doer)
@ -88,14 +88,14 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
for _, hm := range heatmap {
contributions += int(hm.Contributions)
}
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, actions, contributions, "invalid action count: did the test data became too old?")
assert.Equal(t, count, int64(contributions))
assert.Equal(t, tc.CountResult, contributions, fmt.Sprintf("testcase '%s'", tc.desc))
assert.Equal(t, tc.CountResult, contributions, tc.desc)
// Test JSON rendering
jsonData, err := json.Marshal(heatmap)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, tc.JSONResult, string(jsonData))
}
}

View file

@ -13,8 +13,8 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/timeutil"
"github.com/keybase/go-crypto/openpgp"
"github.com/keybase/go-crypto/openpgp/packet"
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/packet"
"xorm.io/builder"
)
@ -141,7 +141,12 @@ func parseGPGKey(ctx context.Context, ownerID int64, e *openpgp.Entity, verified
// Parse Subkeys
subkeys := make([]*GPGKey, len(e.Subkeys))
for i, k := range e.Subkeys {
subs, err := parseSubGPGKey(ownerID, pubkey.KeyIdString(), k.PublicKey, expiry)
subKeyExpiry := expiry
if k.Sig.KeyLifetimeSecs != nil {
subKeyExpiry = k.PublicKey.CreationTime.Add(time.Duration(*k.Sig.KeyLifetimeSecs) * time.Second)
}
subs, err := parseSubGPGKey(ownerID, pubkey.KeyIdString(), k.PublicKey, subKeyExpiry)
if err != nil {
return nil, ErrGPGKeyParsing{ParseError: err}
}
@ -156,7 +161,8 @@ func parseGPGKey(ctx context.Context, ownerID int64, e *openpgp.Entity, verified
emails := make([]*user_model.EmailAddress, 0, len(e.Identities))
for _, ident := range e.Identities {
if ident.Revocation != nil {
// Check if the identity is revoked.
if ident.Revoked(time.Now()) {
continue
}
email := strings.ToLower(strings.TrimSpace(ident.UserId.Email))

Some files were not shown because too many files have changed in this diff Show more