Corrected miss-spelled description for the `is_private` field on `repoSearch`, in which 'public' was spelled as 'pubic'.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7199
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: luxzi <lesson085@gmail.com>
Co-committed-by: luxzi <lesson085@gmail.com>
The related CSS `milestone-card` is used in 3 places:
* global milestone view `/milestones`
* per-repo milestone view
* per-user/org projects view
The first two had gaps too small basically provided by whitespace. The latter was using an unusually large gap via tailwind.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7174
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
When passed a socket name that starts with @, go will listen on an
abstract unix domain socket. Forgejo breaks this by assuming the socket
name is a file path and normalizing it to an absolute path.
This small commit prevents treating the socket name as a filesystem path
if it starts with @.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7020
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mewp <codeberg.org@mewp.pl>
Co-committed-by: Mewp <codeberg.org@mewp.pl>
Allow translating theme names. Not even for i18n reasons but because this way the menu is clearer and cleaner.
The number of translated entries is kept minimal for now. It is easy to pollute locales with these names otherwise.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7168
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
- Replies to pending review comments no longer generate a notification, this was caused by an incomplete determination if the comment was part of the pending review or not.
- The logic was reworked to do the following if it's part of a pending review: It is not a single review and if it's a reply then the comment it is replying to is part of a pending review.
- Added integration test.
- Resolvesforgejo/forgejo#7151
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7167
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
- Issue title rendering can lead to nested `<a>` which is incorrect. So
revert a portion of forgejo/forgejo#6715.
- Integration test adjusted
- Resolvesforgejo/forgejo#7076
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7171
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
18px is not a size used for icons often. In these cases it was also inconsistent with most of the UI.
Affected areas:
* `filter_list` - dropdown, filtering repo issues by project
* `filter_actions` - dropdown, mass-editing issues via issue list
* `sidebar/projects` - dropdown in issue view
* `new_form` - dropdown when creating issue. Projects must be enabled in repo
So all areas are dropdowns. I think these were inconsistent because other dropdowns like Reviewers and Milestones use the usual icons of 16px.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7175
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
- Instead of using `...`, use the unicode character for ellipsis `…`.
- According to weblate: Using the Unicode character is in most cases the better approach and looks better rendered, and may sound better with text-to-speech.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7154
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
`AllThemes` is only used by `user/settings/appearance.tmpl`, not by all settings pages.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7163
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
- Add the ability to regenerate existing access tokens in the UI. This preserves the ID of the access token, but generates a new salt and token contents.
- Integration test added.
- Unit test added.
- Resolves#6880
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6963
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Co-committed-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
## Dropping SSPI auth support
SSPI authentication relied on Microsoft Windows support, removal started in https://codeberg.org/forgejo/forgejo/pulls/5353, because it was broken anyway. We have no knowledge of any users using SSPI authentication. However, if you somehow managed to run Forgejo on Windows, or want to upgrade from a Gitea version which does, please ensure that you do not use SSPI as an authentication mechanism for user accounts. Feel free to reach out if you need assistance.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7148
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Otto Richter <otto@codeberg.org>
Co-committed-by: Otto Richter <otto@codeberg.org>
- Some email clients send inline attachments using the `multipart/related` Mime-Type and enmime collects these in the `Envelope.OtherParts` list; until now only Envelope.Attachments and Envelope.Inline were considered while parsing incoming mail.
- As some email clients send attachments without filename, especially in the multipart/related case, this PR implements `constructFilename`, which guesses the filename based on the ContentType.
How the issue was disovered:
I implemented an otherwise unrelated application written in go that parses emails with enmime just like Forgejo does.
I noticed that in a few occasions that system would fail to detect all attachments.
Investigating this issue led me to realize the above described issue.
After implementing a fix for that application, I looked through the Forgejo email parsing code and discovered the same problem.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7136
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>
- The security patch of forgejo/forgejo#6843 fixed the issue where project boards loaded all issues without considering if the doer actually had permission to view that issue. Within that patch the call to `Issues` was modified to include this permission checking.
- The query being generated was not entirely correct. Issues in public repositories weren't considered correctly (partly the fault of not setting `AllPublic` unconditionally) in the cause an authenticated user loaded the project.
- This is now fixed by setting `AllPublic` unconditionally and subsequently fixing the `Issue` function to ensure that the combination of setting `AllPublic` and `User` generates the correct query, by combining the permission check and issues in public repositories as one `AND` query.
- Added unit testing.
- Added integration testing.
- ResolvesCodeberg/Community#1809
- Regression of https://codeberg.org/forgejo/forgejo/pulls/6843
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7143
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
Some email clients like to be special and only set the "Precedence" header to "auto_reply" when sending automatic replies.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7137
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>
- Simplify if-else expression to `NotFoundOrServerError`.
- I cannot find an existing scenario where `Getdiff` returns an error
and where it therefore should show a 404 error in the context of
rendering a diff of a commit. So simply return it as an Internal Server
Error, this also helps with debugging if an actual error occurs
here (404 errors are only logged at the DEBUG level).
- The first change is already covered under existing testing, the second
change is not trivial to test.
Closes: https://codeberg.org/forgejo/forgejo/issues/6042
Continuation of: https://codeberg.org/forgejo/forgejo/pulls/6284
Replaces: https://codeberg.org/forgejo/forgejo/pulls/6285
Context: https://codeberg.org/forgejo/forgejo/pulls/6284#issuecomment-2518599
Create a new type of comment: `CommentTypeAggregator`
Replaces the grouping of labels and review request in a single place: the comment aggregator
The whole list of comments is "scanned", if they can get aggregated (diff of time < 60secs, same poster, open / close issue, add / del labels, add /del review req), they are added to the aggregator.
Once needed, the list of all the aggregated comments are replaced with a single aggregated comment containing all the data required.
In templates, have a specific HTML rendering part for the comment aggregator, reuse the same rendering as with the other types of comments.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6523
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Litchi Pi <litchi.pi@proton.me>
Co-committed-by: Litchi Pi <litchi.pi@proton.me>
Encapsulates the federation server counterpart & makes the test more configurable.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7115
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
This fixes an issue with Simplified Chinese (and likely other languages)
where the "Actions" button would be shown in English and have a different
height compared to the other buttons in Chinese.
This solution was proposed by Codeberg user "aimuz".
Co-authored-by: aimuz
- If the caller function has generics then
`runtime.FuncForPC(...).Name()` will not show the generic types and
instead collapse it to `[...]`. Remove this suffix from the function
name.
- This fixes an issue where the logging of functions that use generics
such as `db.Find` to be logged as `]()` instead of `Find()`, as the last
dot in `[...]` was being used as a cutoff point.
- Unit test added.
So it is consistent with the icon used in the tab with comments.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7099
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>