Commit graph

19853 commits

Author SHA1 Message Date
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
Beowulf
4f4f97b69e Org buttons add missing vertical padding (#3964)
This adds the missing vertical padding between the new repository and new migration button.

| Before | After (btns horizontal) | After (btns vertical) |
| -- | -- | -- |
| ![](/attachments/4f74c5c5-ccc7-4b57-936b-09e3a226c170) | <img width="293" alt="grafik" src="/attachments/560a0e85-3453-4357-bca0-75b1cbdfe658">  | <img width="284" alt="grafik" src="/attachments/2be0383b-2d44-48ef-8a35-1bd143ef044c"> |

## Manual test steps:

- Open org page
- Resize window
- Check padding

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3964
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2024-06-09 18:24:38 +00:00
Earl Warren
77078cded4 Merge pull request 'fix(cmd): actions artifacts cannot be migrated' (#4085) from earl-warren/forgejo:wip-migration-artifacts into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4085
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-06-09 14:51:04 +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
Earl Warren
e759794408
tests(cmd): add coverage for migrateActionsArtifacts
Also convert a comment into a warning in the logs when the deletion of
an artifact cannot find the file in the destination storage.

The case were an error happens while deleting the file is not covered
as it would require to mock the storage.Copy function.
2024-06-09 16:02:31 +02:00
Rowan Bohde
4afbfd3946
fix: allow actions artifacts storage migration to complete succesfully (#31251)
Change the copy to use `ActionsArtifact.StoragePath` instead of the
`ArtifactPath`. Skip artifacts that are expired, and don't error if the
file to copy does not exist.

---

When trying to migrate actions artifact storage from local to MinIO, we
encountered errors that prevented the process from completing
successfully:

* The migration tries to copy the files using the per-run
`ArtifactPath`, instead of the unique `StoragePath`.
* Artifacts that have been marked expired and had their files deleted
would throw an error
* Artifacts that are pending, but don't have a file uploaded yet will
throw an error.

This PR addresses these cases, and allow the process to complete
successfully.

(cherry picked from commit 8de8972baf5d82ff7b58ed77d78e8e1869e64eb5)
2024-06-09 16:02:31 +02:00
Mai-Lapyst
0a7767eaaa [FEAT] Adds x-mode-only anchor styles to display images based if the theme is light or dark mode. (#3985)
Adds a feature similar to this https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/ , by adding styles to elements which `src` or `href` attribute ends with `#light-mode-only` or `#dark-mode-only`. To improve compability, the github variants with the `gh-` prefix are also contained.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3985
Reviewed-by: 0ko <0ko@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-09 10:50:53 +00: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
Earl Warren
96f661e821 Merge pull request 'Update dependency @github/relative-time-element to v4.4.1' (#4081) from renovate/github-relative-time-element-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4081
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-09 07:22:08 +00:00
Renovate Bot
0f9f23eb6c Update dependency @github/relative-time-element to v4.4.1 2024-06-09 06:46:42 +00:00
Earl Warren
144aea4b91 Merge pull request 'Update module code.forgejo.org/forgejo/reply to v1.0.2' (#4080) from renovate/code.forgejo.org-forgejo-reply-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4080
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-09 05:55:02 +00:00
Earl Warren
795bfd045d Merge pull request 'chore(deadcode): restore the previous format' (#4078) from earl-warren/forgejo:wip-deadcode into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4078
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-06-09 05:26:50 +00:00
Renovate Bot
b25f5265b1 Update module code.forgejo.org/forgejo/reply to v1.0.2 2024-06-09 00:05:02 +00:00
Earl Warren
9464d51b2b
chore(deadcode): restore the previous format
While the newer default format is machine parsable, it also contains
line numbers which makes it sensitive to any change unrelated to deadcode.
2024-06-08 22:04:04 +02:00
Earl Warren
52f47aa46c Merge pull request 'Update instance title in tests' (#4077) from 0ko/forgejo:tests-actual-title into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4077
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-08 19:42:28 +00:00