Commit graph

20081 commits

Author SHA1 Message Date
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
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
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
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