Commit graph

20048 commits

Author SHA1 Message Date
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
Earl Warren
717495a980 Merge pull request '[port] Use old behavior for telegram webhook (gitea#31588)' (#4504) from algernon/forgejo:gitea/port/31588 into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-remote-cacher (map[image:docker.io/valkey/valkey:7.2.5-alpine3.19 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:ghcr.io/microsoft/garnet-alpine:1.0.14 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:redis:7.2 port:6379]) (push) Blocked by required conditions
testing / test-remote-cacher (map[image:registry.redict.io/redict:7.3.0-scratch port:6379]) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
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
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