Commit graph

17785 commits

Author SHA1 Message Date
Gusted
83b6e59718 Merge pull request 'Accessibility: Focus styling and fix Watch/Unwatch buttons' (#2379) from fnetx/accessibility into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2379
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-02 19:16:47 +00:00
Gusted
c559dcddf0 Merge pull request '[FEAT] Show follow symlink button' (#2530) from gusted/forgejo-follow-symlink into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2530
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-02 17:23:18 +00:00
Gusted
c63b52c126
[FEAT] Show follow symlink button
- When a user goes opens a symlink file in Forgejo, the file would be
rendered with the path of the symlink as content.
- Add a button that is shown when the user opens a *valid* symlink file,
which means that the symlink must have an valid path to an existent
file and after 999 follows isn't a symlink anymore.
- Return the relative path from the `FollowLink` functions, because Git
really doesn't want to tell where an file is located based on the blob ID.
- Adds integration tests.
2024-03-02 17:58:09 +01:00
Earl Warren
0bba571f5b Merge pull request '[RELEASE] publish container images tagged with the major version' (#2538) from earl-warren/forgejo:wip-release-publish into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2538
2024-03-02 14:45:18 +00:00
Otto Richter
88f68850b5 Accessibility: Watch & Star on small screens
The elements were hidden on small screens to preserve space and the
icons still conveyed the meaning for users with intact eye vision.
However, the names were no longer exposed to screen readers, and their
users usually cannot obtain the meaning from the icons.

Adding aria-labels to the affected templates results in certain
complexity due to the DOM, so instead I decided to use some accessible
CSS tricks to move the content off the screen instead of hiding it. It
should remain accessible for most screen readers.
2024-03-02 14:31:10 +01:00
Otto Richter
4d2c019b5a Add focus styling to most button types
While it might be favourable to have distinct focus and hover styling,
having no focus styling at all makes keyboard navigation very difficult.

Some people consider :focus to be equal to a keyboard-driven :hover, so
I'm moving the focus pseudo-classes from being a no-op to adding the
hover styling.
2024-03-02 14:31:10 +01:00
Otto Richter
30e0b2f851 Label and focus styling for mobile menu button 2024-03-02 14:31:10 +01:00
Gusted
92c1ff76ea Merge pull request 'Make settings tab not active when on repository "Add units" tab' (#2524) from hazy/forgejo:add-more-active into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2524
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-02 12:32:01 +00:00
Gusted
abe3351187 Merge pull request '[BUG] Allow to select commit email for file updload/delete' (#2383) from 0ko/forgejo:fix-commit-del into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2383
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-02 12:00:45 +00:00
Earl Warren
9e662fe2cd
[RELEASE] publish container images tagged with the major version
Now that semantic versions are used, the major version must be used
instead of major.minor to distinguish releases with breaking changes.

Before:

Forgejo v1.21.1-0, tags 1.21.1-0 and 1.21
Forgejo v1.21.2-0, tags 1.21.2-0 and 1.21
Forgejo v1.22.1-0, tags 1.22.1-0 and 1.22

After

Forgejo v7.0.0 tags 7.0.0 and 7
Forgejo v7.0.1 tags 7.0.1 and 7
Forgejo v7.1.2 tags 7.1.2 and 7
Forgejo v8.0.1 tags 8.0.1 and 8
2024-03-02 19:48:28 +08:00
Gusted
9ce3068f36 Merge pull request '[BUG] Ensure HasIssueContentHistory takes into account comment_id' (#2518) from gusted/forgejo-default-value-sql-error into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2518
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-01 14:48:06 +00:00
Gusted
eadcbcf7d1 Merge pull request '[BUG] Sort file list case insensitively' (#2522) from gusted/forgejo-sort-file-list into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2522
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-01 13:58:38 +00:00
Gusted
86b46085c7
[BUG] Sort file list case insensitively
- Make the sorting done on the entries list case insensitive.
- Adds integration test.
- Resolves #317
2024-02-29 21:14:06 +01:00
Gusted
a4fa0f985f Merge pull request '[I18N] Improve registration / password reset emails' (#2529) from n0toose/service-email-improvements into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2529
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-29 20:07:22 +00:00
Panagiotis "Ivory" Vasilopoulos
f7c26a4491 [I18N] Improve registration / password reset emails
This change does not introduce any new strings, but improves upon some
existing ones.
2024-02-29 19:53:17 +01:00
Gusted
331fa44956
[BUG] Ensure HasIssueContentHistory takes into account comment_id
- The content history table contains the content history of issues and
comments. For issues they are saved with an comment id of zero.
- If you want to check if the issue has an content history, it should
take into account that SQL has `comment_id = 0`, as it otherwise could
return incorrect results when for example the issue already has an
comment that has an content history.
- Fix the code of `HasIssueContentHistory` to take this into account, it
relied on XORM to generate the SQL from the non-default values of the
struct, this wouldn't generate the `comment_id = 0` SQL as `0` is the
default value of an integer.
- Remove an unncessary log (it's not the responsibility of `models`
code to do logging).
- Adds unit test.
- Resolves #2513
2024-02-29 18:23:06 +01:00
Earl Warren
32a0afe8b7 Merge pull request '[SEMVER] X.Y.Z+A.B.C replaced with X.Y.Z+gitea-A.B.C' (#2514) from earl-warren/forgejo:wip-semantic-gitea into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2514
2024-02-29 15:59:48 +00:00
Gusted
42ae3d3d81
[BUG] Fix header name in swagger response
- This was incorrectly copied from the `swaggerCommitList` struct, which
on the other hand does set `X-Total`, but the API handler that uses this
response only sets `X-Total-Count`.
2024-02-29 14:08:10 +01:00
hazycora
6e6ebe4857
Make settings tab not active when on repository units tab 2024-02-28 21:17:53 -06:00
Gusted
d0e5af7079 Merge pull request '[UI] Actions: Link to Workflow in View' (#1866) from n0toose/forgejo:forgejo-add-workflow-link into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1866
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-28 17:28:16 +00:00
Earl Warren
07b99560cc
[SEMVER] X.Y.Z+A.B.C replaced with X.Y.Z+gitea-A.B.C
Gitea versions are

* A.B.C
* A.B.C+rc-0
* A.B.C+dev-5-g4fb9056

If Forgejo versions are:

* X.Y.Z+A.B.C
* X.Y.Z-rc0+A.B.C
* X.Y.Z-dev-1232-g4fb905687+A.B.C

It is non trivial for a client trying to sort out if the server
responding to `/api/v1/version` is Forgejo or Gitea. The Forgejo
version changes to be:

* X.Y.Z+gitea-A.B.C
* X.Y.Z-rc0+gitea-A.B.C
* X.Y.Z-dev-1232-g4fb905687+gitea-A.B.C

and a client can now:

* Split the version with +
* If the second part (the metadata) exists and contains "gitea", the
  answer server is Forgejo
* Otherwise it is Gitea
2024-02-28 15:57:48 +01:00
Earl Warren
7af1349c1d Merge pull request '[BUG] Correct changed files for codeowners' (#2507) from gusted/forgejo-codeowner-diff into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2507
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-02-28 12:15:49 +00:00
Earl Warren
7584ed6a4e Merge pull request '[CHORE] Update connect-go to maintained fork' (#2417) from gusted/forgejo-move-dep into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2417
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-28 11:11:26 +00:00
Codeberg Translate
1a8f579b6e [I18N] Translations update from Weblate (#2479)
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: b1nar10 <amtaboada99@gmail.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: mondstern <mondstern@monocles.de>
Co-authored-by: Xinayder <me+codeberg@aoalmeida.com>
Co-authored-by: earl-warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2479
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-02-28 10:27:44 +00:00
Earl Warren
4fb9056877 Merge pull request '[RELEASE] switch to semantic versioning' (#2459) from earl-warren/forgejo:wip-release-number into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2459
Reviewed-by: Otto <otto@codeberg.org>
2024-02-28 10:18:20 +00:00
Gusted
0c4872f839
[CHORE] Update connect-go to maintained fork
- Update github.com/bufbuild/connect-go to
https://github.com/connectrpc/connect-go.
- This is a fork that's actively maintained and is recommend by the
original library. Looking at the recent release notes, it looks like
going in the right direction what one would expect of a library, no
strange features being added, lots of improvements.
- There's still an indirect dependency by
`code.gitea.io/actions-proto-go` on a old version of `connect-go`.
2024-02-28 09:40:56 +01:00
Gusted
64a0d61aff [BUG] Implement commit mail selection for other Git operations
- Implement the commit mail selection feature for the other supported
Git operations that can be done trough the web UI.
- Adds integration tests (goodluck reviewing this).
- Ref: #1788

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
2024-02-27 22:41:58 +00:00
Gusted
fb2795b5bb
[BUG] Correct changed files for codeowners
- The CODEOWNER feature relies on the changed files to determine which
reviewers should be added according to the `CODEOWNER` file.
- The current approach was to 'diff' between the base and head branch,
which seems logical but fail in practice when the pull request is out of
date with the base branch. Therefore it should instead diff between the
head branch and the merge base of the head and base branch, so only the
actual affected files by the pull requests are used, the same approach
is used by the diff of an unmerged pull request.
- Add integration testing (for the feature as well).
- Resolves #2458
2024-02-27 23:16:00 +01:00
Earl Warren
2855727c85 Merge pull request 'Disabling Stars should disable the routes too' (#2471) from algernon/forgejo:stars/disable-routes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2471
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-27 21:24:25 +00:00
Earl Warren
22dece5eec Merge pull request '[CI] adjust swagger version to be compatible with go1.22' (#2312) from oliverpool/forgejo:go1.22 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2312
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 21:23:32 +00:00
oliverpool
f489341fe6 [Swagger] update to latest version 2024-02-27 20:45:57 +00:00
Earl Warren
b678123de8 Merge pull request 'Fix the Fork button in repo headers' (#2495) from algernon/forgejo:b/fork-button-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2495
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 18:36:37 +00:00
Gergely Nagy
aef0b024b7 Fix the Fork button in repo headers
In #2445, I lifted out the fork button into its own template, but did
not update it properly. This resulted in the fork button's counter not
displaying, and pointing to the wrong place too.

This patch updates the template to account for it moving to a separate
file, and also adds test cases to verify the button is display as it
should be.

Fixes #2494.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-27 18:36:37 +00:00
Earl Warren
e6f1863476 Merge pull request '[gitea] add attachment support for code review comments gitea#29220' (#2501) from oliverpool/forgejo:review_attachment_support into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2501
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 18:35:43 +00:00
oliverpool
e154655c87 fix missing argument 2024-02-27 18:35:43 +00:00
oliverpool
3c9b176348 fix cherry-pick 2024-02-27 18:35:43 +00:00
Jimmy Praet
f95fb8cc44 Add attachment support for code review comments (#29220)
Fixes #27960, #24411, #12183

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-02-27 18:35:43 +00:00
Earl Warren
590f86796b Merge pull request 'Allow 's in mentions' (#2485) from algernon/forgejo:mentions/the-book-of-aposthropes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2485
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 18:26:59 +00:00
Gergely Nagy
00b24d2d9a Allow 's in mentions
When mentioning a user in a comment, or a similar place, sometimes one
would wish to use a possessive: `As per @user's suggestion` or somesuch.
This patch modifies the `mentionPattern` used to find mentions, to allow
- and then ignore - apostrophes and whatever comes after them.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-27 18:26:59 +00:00
Earl Warren
c39321c6ca Merge pull request '[UI] Agit: Add link to docs and tooltip to label' (#2499) from n0toose/agit-add-ui-hints into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2499
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 17:46:58 +00:00
Panagiotis "Ivory" Vasilopoulos
5bc7b8baf8 [UI] Agit: Add link to docs and tooltip to label
Continuation of #2444, which introduced the commit
bf7fb89178 but only added
the label and the tests.

The tooltip explaining what AGit is and its advantages is not
meant to advertise AGit - it is meant to inform the reader that
is presumably not familiar with the workflow that they will not
be able to find a fork or a branch associated with the Pull Request
as a direct consequence of this workflow.

Issue #2474 mentions that we should show instructions on how to
fetch an AGit-created Pull Request, and this is the plan. However,
this may take time, so I might as well make the label a bit more
"complete" and less out-of-place for now if we do not manage to
improve these instructions until the next release (Forgejo v1.22).

Refs: https://codeberg.org/forgejo/forgejo/issues/2474
2024-02-27 17:46:58 +00:00
Earl Warren
6cbc64e0a5 Merge pull request '[I18N] Improve English strings & consistency' (#2492) from 0ko/forgejo:english20240226 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2492
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 17:42:59 +00:00
0ko
2e76e4fb33 [I18N] Improve English strings & consistency 2024-02-27 17:42:59 +00:00
Earl Warren
d29e9374c7 Merge pull request 'Restore the ability to view tags without a release' (#2498) from algernon/forgejo:b/tag-view-fix into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2498
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-27 15:43:07 +00:00
Gergely Nagy
c9b410fb35
Highlight the correct small menu item when viewing a tag
When viewing a tag that isn't associated with a release, highlight the
"N Tags" sub-menu item, rather than the "M releases" one.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-27 13:32:55 +01:00
Gergely Nagy
fc635f1014
Restore the ability to view tags without a release
The `repo.SingleRelease` handler was broken by gitea#29149, as the
switch to `getReleaseInfos` stopped returning tags without an associated
release. This resulted in the web UI showing a 404 when trying to view a
tag without a release.

This restores the functionality by explicitly including tags in the
search, and also adds tests to exercise the fix.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-27 13:32:55 +01:00
Earl Warren
3fa4962a88 Merge pull request '[gitea] cherry-pick' (#2478) from earl-warren/forgejo:wip-gitea-cherry-pick into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2478
2024-02-27 10:39:41 +00:00
Earl Warren
d9ae3717b5 Merge pull request '[BUG] Remember topic only in repo search' (#2489) from gusted/forgejo-topic-explore into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2489
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-26 22:40:34 +00:00
Earl Warren
0f098d1ad7
[DEADCODE] update 2024-02-26 22:30:27 +01:00
Earl Warren
6ed19cc00d
templates: Safe & Escape no longer exist 2024-02-26 22:30:27 +01:00