1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-20 16:50:28 -05:00
Commit graph

1203 commits

Author SHA1 Message Date
Beowulf
d68e0d3e39 fix(ui): hide git note add button for commit if commit already has a note (#6613)
Regression from f5c0570533

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6613
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-01-18 19:39:42 +00:00
Beowulf
34e1100ae2 fix(ui): reset content of text field for comments when cancelling (#6595)
Currently, the content of the text field is not reset when you cancel editing. This change resets the content of the text field when editing is canceled.

If this is not done and you click on cancel and then on edit again, you can no longer return to the initial content without completely reloading the page.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6595
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-01-17 20:14:28 +00:00
Gusted
b2a3a0411c [PORT] Remove SHA1 for support for ssh rsa signing (#31857) (#5303)
https://github.com/go-fed/httpsig seems to be unmaintained.

Switch to github.com/42wim/httpsig which has removed deprecated crypto
and default sha256 signing for ssh rsa.

No impact for those that use ed25519 ssh certificates.

This is a breaking change for:
- gitea.com/gitea/tea (go-sdk) - I'll be sending a PR there too
- activitypub using deprecated crypto (is this actually used?)

(cherry picked from commit 01dec7577a051d9bb30e91f6cf6653dc51a37d06)

---
Conflict resolution: trivial

Co-authored-by: Wim <wim@42.be>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5303
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-01-17 03:17:10 +00:00
Earl Warren
387f590d9c [gitea] week 2025-03 cherry pick (gitea/main -> forgejo) (#6539)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6539
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-01-17 01:58:00 +00:00
Otto Richter
e7299eb0fb tests(e2e): Mask user heatmap in screenshots
It depends on both relative activity and date the test is run on
2025-01-15 19:16:28 +01:00
Otto Richter
f7ba8f0e41 tests(e2e): Do not fail early when comparing screenshots
Also set a unique outputDir so that artifacts are preserved and not overwritten by the following tests.
2025-01-15 19:16:28 +01:00
Otto Richter
a975b6ab94 tests(e2e): Explicitly generate screenshots
As per https://codeberg.org/forgejo/forgejo/pulls/6400, the after hook runs for every test, resulting in duplicated screenshots.

Not all tests are supposed to generate screenshots, especially because they could be flaky (also see 206d4cfb7a ).
Additionally, the implicit behaviour might have caused confusion, so we now create screenshots explicitly, adding the statements from the tests that already generated screenshots.
2025-01-15 15:09:24 +01:00
Jaime merino
9f842f0dec Add search action jobs for API routes, repo, org and global level (#6300)
This PR wants to improve information of the tasks waiting to be executed on a global, organization, user and repository leve.
The main motivation is explained here https://codeberg.org/forgejo/discussions/issues/241

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/6300): <!--number 6300 --><!--line 0 --><!--description QWRkIHNlYXJjaCBhY3Rpb24gam9icyBmb3IgQVBJIHJvdXRlcywgcmVwbywgb3JnIGFuZCBnbG9iYWwgbGV2ZWw=-->Add search action jobs for API routes, repo, org and global level<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarzª>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6300
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Jaime merino <cobak78@gmail.com>
Co-committed-by: Jaime merino <cobak78@gmail.com>
2025-01-14 11:17:42 +00:00
Thilina Jayanath
ed96852fdb fix: enable releases and/or wiki if user set the options in repo migration (#6051)
## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6051
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Thilina Jayanath <thilina91@gmail.com>
Co-committed-by: Thilina Jayanath <thilina91@gmail.com>
2025-01-12 09:16:45 +00:00
Lunny Xiao
d09b8ba9cf
Fix fuzz test (#33156)
(cherry picked from commit ba5e3a5161a497aa8c73827774870fb94676e68b)
2025-01-12 09:02:47 +01:00
Gusted
46e15e57f7 port(gitea#31954): Add lock for parallel maven upload (#6513)
Backport #31851
Fix #30171

---

Fixes https://github.com/go-gitea/gitea/issues/30171, this is also a
issue in Forgejo. Backport the implementation that uses the existing
sync module which does not work for multiple instances which is
perfectly fine for Forgejo for now.

(cherry picked from commit 9c990ac043a0167dc59f1c822988ed2316f7c1df)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6513
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-09 17:39:38 +00:00
Gusted
8ed4b77f1f chore: remove illegal git usage (#6488)
This is no longer possible in future go-git versions, so lets hardcode it

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6488
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-01-07 17:28:42 +00:00
Kemal Zebari
76a85d26c8
Use Project-URL metadata field to get a PyPI package's homepage URL (#33089)
Resolves #33085.

(cherry picked from commit 188e0ee8e40ad0b32f9db33a0a217043cfdf3610)

Conflicts:
	tests/integration/api_packages_pypi_test.go
  trivial context conflict
2025-01-05 13:46:20 +00:00
wxiaoguang
e507fa30df
Refactor env var related code (#33075)
And add more comments

(cherry picked from commit 4f386e2c5e39b860424faf4cbc02c16f641f956e)

Conflicts:
	cmd/main_test.go
	tests/integration/integration_test.go
  trivial context conflicts
2025-01-05 13:46:19 +00:00
Julian Schlarb
68d690b6b9 chore(e2e): simplify authentication setup (#6400)
Replaced manual login and context loading across tests with Playwright's `test.use` configuration for user authentication. This simplifies test setup, improves readability, and reduces repetition.

For #6362

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6400
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Julian Schlarb <julian.schlarb@denktmit.de>
Co-committed-by: Julian Schlarb <julian.schlarb@denktmit.de>
2025-01-05 05:17:04 +00:00
Angel Nunez Mencias
a2eb249766 feat: add files to compare (#6461)
Add the changed files between two commits to the response of the compare API, part of forgejo/forgejo#6460

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6461
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Angel Nunez Mencias <git@angelnu.com>
Co-committed-by: Angel Nunez Mencias <git@angelnu.com>
2025-01-05 02:32:46 +00:00
0ko
339814f3bc fix(ui): show oauth divider on signup page (#6463)
Fix a minor UI bug introduced in https://codeberg.org/forgejo/forgejo/pulls/6112.

The condition `if .EnableInternalSignIn` was added to display of the divider, but it is only available when `oauth_container.tmpl` is called from signIn page, it is not relevant to signUp page.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6463
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-01-04 08:45:08 +00:00
Gusted
da5445ac87 Merge pull request 'Permit to download patch and diff file between tags and branches' (#5385) from mirkoperillo/forgejo:issue-3728 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5385
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-01-02 00:59:44 +00:00
Otto
b01f3b9b05 Merge pull request 'feat: Add summary card for repos and releases' (#6269) from JakobDev/forgejo:repocard into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6269
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2025-01-01 17:48:28 +00:00
Shiny Nematoda
c53d21965a fix(code search): empty mode dropdown when keyword is empty 2025-01-01 12:32:41 +00:00
mirko
11a433ed1c Fix tests 2025-01-01 08:08:11 +01:00
mirko
f1bf489203 Fix formatting 2025-01-01 08:08:11 +01:00
mirko
b13ac5fcbf Fix formatting 2025-01-01 08:08:11 +01:00
mirko
4e819f1b3c Test compare patch download 2025-01-01 08:08:11 +01:00
mirko
9195d6a318 Add patch/diff compare download 2025-01-01 08:08:11 +01:00
mirko
4b69aa5c10 Add integration test for downloading a patch/diff file in compare page 2025-01-01 08:08:11 +01:00
Otto
ceee649086 Merge pull request 'Fix issue/comment menus' (#6419) from fnetx/issue-view-a11y into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6419
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-12-30 20:28:53 +00:00
Otto Richter
2885ea8da2 Rework user profile settings
Accessibility:

- improved semantic layout
- Fixes unlabelled input for custom pronouns. CC @hazy
- Adds labels to dropdowns.
- Shortens certain texts for less verbose screen reader outputs and
  people with slow reading speed.
- Turned optional username rename helper text with low contrast into
  "normal" help text.

UI/UX:

- Removes section about primary email which is no longer managed in the
  profile section.
- Fixes section about primary email not displaying in user settings when notifications are
  not available.
- Removes primary email display, because it is not actually a form
  element here. (Alternatively, we could display it and link to the
account settings for managing the email)
2024-12-30 16:42:58 +01:00
Otto Richter
c67d63d88a Fix issue/comment menus
Closes https://codeberg.org/forgejo/forgejo/issues/1120

- Adds labels to reaction and context menu.
- Fixes taborder in markdown combobox buttons. They are now only one
  "tab" stop and can be navigated with arrow buttons and in the right
order (previously, it would skip the table button).
- Generates more verbose output for the reactio selectors to provide
  content for users who cannot identify the meaning of these buttons
visually. Explicit aria-labels are now preferred over auto-generated
ones.
2024-12-30 16:06:18 +01:00
Earl Warren
8d6f0d49c6 Merge pull request '[gitea] week 2024-53 cherry pick (gitea/main -> forgejo)' (#6391) from earl-warren/wcp/2024-53 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6391
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-30 08:26:15 +00:00
Earl Warren
a5dc315a64 Merge pull request 'feat: don't allow blocking the doer' (#6411) from gusted/forgejo-org-block-yourown into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6411
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-12-30 08:14:17 +00:00
Gusted
e14f2d0c84
feat: don't allow blocking the doer
- In the case of organization blocking users, disallow blocking the doer.
- Resolves #5390
- Added integration test.
2024-12-30 00:09:07 +01:00
Gusted
db7be1a1db Merge pull request 'feat: add synchronization for SSH keys for OpenID Connect' (#6232) from Maks1mS/forgejo:feat/add-oidc-ssh-keys into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6232
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-29 22:43:28 +00:00
Otto
6d61ae5cbe Merge pull request 'Rework new repo dialog' (#6386) from fnetx/new-repo-form into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6386
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-12-29 13:22:48 +00:00
Otto Richter
8d829a97b2 tests(e2e): Test new repo dialog and behaviour
- screenshots and basic accessibility scan of collapsed and expanded sections
  - the dropdowns do not pass the accessibility checks, but I haven't found an easy fix
  - I manually confirmed the dropdown behaviour via orca and firefox, though
2024-12-29 13:49:28 +01:00
Otto Richter
8d32ca32c2 New repo: Rework initialization
- only show settings when ticked
- only offer README selection when there are multiple options
2024-12-29 13:05:30 +01:00
JakobDev
a82cd18d9a Merge branch 'forgejo' into repocard 2024-12-29 11:20:09 +00:00
Earl Warren
37f05617a5
Improve Actions test (#32883) (followup) 2024-12-28 21:56:33 +00:00
Zettat123
b18dcd69f2
Improve Actions test (#32883)
This PR adds a mock runner to test more actions features.

(cherry picked from commit df98452c0de9d01338f00aa5d85757623523b1fc)
2024-12-28 19:33:53 +00:00
Zettat123
92ac337263
Support org labels when adding labels by label names (#32988)
Fix #32891

(cherry picked from commit 44b4fb21a4e99f327303f66cc7e48f7ca7ba09e1)
2024-12-28 19:32:09 +00:00
Maks1mS
8a3fb4885e Merge branch 'forgejo' into feat/add-oidc-ssh-keys 2024-12-26 14:33:09 +00:00
Litchi Pi
dd4a1107ed template: repo: compare: display a warning if the user is not logged in
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
2024-12-25 17:18:00 +00:00
George Bartolomey
13ca6c14f1
feat: allow changing default branch update style
This commit allows chaning default branch update style through global
and repository settings. The setting affects "Update branch" button
in PR view (button shows when some commits are ahead of master branch).
When default update style is set to "rebase", dropdown button updates branch
by rebase by default. When update style is set to other value, dropdown button
updates branch by merge. Any of these actions may be selected using dropdown
in any case.

Signed-off-by: George Bartolomey <george@bh4.ru>
2024-12-23 18:55:25 +03:00
Gusted
54255688f5 Merge pull request 'fix: template config path (#2836)' (#6335) from Snoweuph/forgejo:fix/template-file into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6335
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-22 14:53:16 +00:00
Shiny Nematoda
ee214cb886 feat: filepath filter for code search (#6143)
Added support for searching content in a specific directory or file.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6143
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
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-12-22 12:24:29 +00:00
Snoweuph
fcb98c6d3c
fix: template config path (#2836) 2024-12-22 11:05:24 +01:00
Maxim Slipenko
4f92b738b5 style: make fmt 2024-12-21 21:44:05 +00:00
Maxim Slipenko
283d883e5a add integration tests for synchronization for SSH keys with OpenID Connect 2024-12-21 21:25:45 +00:00
Gabriel A. Giovanini
d7fa527605 test: Test notification count for self review
This tests the case where the user adds itself as reviewer and it
shouldn't get a notification.
2024-12-21 20:03:36 +01:00
JakobDev
265174bd5e Merge branch 'forgejo' into repocard 2024-12-19 15:11:12 +00:00