Commit graph

1191 commits

Author SHA1 Message Date
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)
Some checks are pending
/ release (push) Waiting to run
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
Some checks are pending
Integration tests for the release process / release-simulation (push) Waiting to run
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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
Earl Warren
380e266440 Merge pull request '[gitea] week 2024-51 cherry pick (gitea/main -> forgejo)' (#6271) from earl-warren/wcp/2024-51 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6271
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-12-19 07:08:01 +00:00
JakobDev
4568ebc913
Update 2024-12-18 22:33:22 +01:00
JakobDev
df570a1d71 Merge branch 'forgejo' into repocard 2024-12-18 19:27:24 +00:00
Otto
66e1975e24 Merge pull request '[gitea] Add links to commit lists in contributors graph page (#32799)' (#6274) from wetneb/forgejo:gitea_contributor_link into forgejo
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Integration tests for the release process / release-simulation (push) Has been cancelled
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6274
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-12-16 21:19:11 +00:00
Otto
6a4a24e2d7 Merge pull request 'Add sorting functionality to /api/v1/admin/users endpoint' (#6228) from awiteb/forgejo:sort-user-search-endpoint into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6228
Reviewed-by: Otto <otto@codeberg.org>
2024-12-16 21:00:13 +00:00
Renovate Bot
07a9178009 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.62.2 (forgejo) (#6291)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2024-12-16 20:31:57 +00:00
Awiteb
dbbd359984
Add sorting functionality to user search endpoint
Signed-off-by: Awiteb <a@4rs.nl>
2024-12-16 23:27:29 +03:00
Antonin Delpeuch
a6a9314bdb Add copyright header and watch header 2024-12-16 09:13:14 +01:00
Antonin Delpeuch
3cd36c4b21 Add Playwright test 2024-12-15 22:38:01 +01:00
Rowan Bohde
7ceb30c000
Avoid MacOS keychain dialog in integration tests (#32813)
Mac's git installation ships with a system wide config that configures
the credential helper `osxkeychain`, which will prompt the user with a
dialog.

```
$ git config list --system
credential.helper=osxkeychain
```
By setting the environment variable
[`GIT_CONFIG_NOSYSTEM=true`](https://git-scm.com/docs/git-config#ENVIRONMENT),
Git will not load the system wide config, preventing the dialog from
populating.

Closes #26717

(cherry picked from commit a03fdd9566d62abd208af9ae30e58802a658e358)
2024-12-15 09:46:39 +01:00
Kemal Zebari
b0d6a7f07b
Implement update branch API (#32433)
Resolves #22526.

Builds upon #23061.

---------

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c)

Conflicts:
	routers/api/v1/api.go
  context conflict + s/PathParam/Params/
	templates/swagger/v1_json.tmpl
  make generate-swagger
2024-12-15 09:24:31 +01:00
Sebastian T. T.
bf934c96c9
Add standard-compliant route to serve outdated R packages (#32783)
The R package repository currently does not have support for older
versions of packages which should be stored in a separate /Archive
router. This PR remedies that by adding a new path router.

I am a member of a group that loves using Gitea and this bug has been
annoying us for a long time. Hope it can be merged in time for Gitea
1.23.0.

Any feedback much appreciated.

Fixes #32782

(cherry picked from commit 874b8484aa9f7e10172fd1a8a7c768e70b36c475)
2024-12-15 09:12:46 +01:00