summaryrefslogtreecommitdiffstats
path: root/services (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add search action jobs for API routes, repo, org and global level (#6300)Jaime merino2025-01-142-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Do not report warning when git shows new reference (#6540)Zsombor Gegesy2025-01-132-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## 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. - [ ] 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 - [x] 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/6540 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Zsombor Gegesy <gzsombor@gmail.com> Co-committed-by: Zsombor Gegesy <gzsombor@gmail.com>
* chore(deps): Update gitlab api to updated library (#6487)Gusted2025-01-072-2/+2
| | | | | | | | | | | - Per https://github.com/xanzy/go-gitlab?tab=readme-ov-file#go-gitlab-deprecated - Move to https://gitlab.com/gitlab-org/api/client-go - Use v0.116.0 because v0.117.0 has incorrect requirement of go 1.23.4, it will be fixed in v0.119.0 which is not yet released Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6487 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
* fix: f3: label color must start with #limiting-factor2025-01-071-2/+3
|
* fix: f3: update milestone is_closed & deadline_unixlimiting-factor2025-01-071-1/+1
|
* fix: f3: update issue is_lockedlimiting-factor2025-01-071-1/+1
|
* fix: f3: update issue labelslimiting-factor2025-01-071-29/+32
|
* fix: f3: update issue assigneeslimiting-factor2025-01-071-23/+42
| | | | | The ID must be obtained from the repository ID and the index, otherwise it is zero and the assignees are not updated.
* fix: f3: support modify milestonelimiting-factor2025-01-071-2/+5
|
* Fix duplicate co-author in squashed merge commit messages (#33020)hiifong2025-01-051-1/+5
| | | | | | | | | Fix: #31980 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit a87168869a4ceffb2a3d84986640da357b0793cf)
* Test webhook email (#33033)wxiaoguang2025-01-051-0/+11
| | | | | | Close #27918 (cherry picked from commit 1dbf0d7f0822c10b379a21c192c2d63e34fd52f9)
* Merge pull request 'Rewrite OpenGraph Header' (#6447) from ↵Otto2025-01-031-0/+4
|\ | | | | | | | | | | | | JakobDev/forgejo:ogrewrite into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6447 Reviewed-by: Otto <otto@codeberg.org>
| * Rewrite OpenGraph HeaderJakobDev2025-01-011-0/+4
| |
* | Merge pull request 'feat(webhook): sourcehut: submit SSH URL for private ↵Gusted2025-01-032-8/+150
|\ \ | |/ |/| | | | | | | | | repository (or when pre-filled)' (#6445) from oliverpool/forgejo:sourcehut-refactor into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6445 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * sourcehut: use ssh sources URL when appropriateoliverpool2025-01-012-3/+59
| | | | | | | | Co-authored-by: Jordan Anderson <jordan@jba.io>
| * add manifest testsoliverpool2025-01-011-0/+81
| |
| * refactor sourcehut manifest buildingoliverpool2025-01-011-5/+10
| |
* | Merge pull request 'feat: Add summary card for repos and releases' (#6269) ↵Otto2025-01-011-0/+7
|\ \ | |/ |/| | | | | | | | | | | 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>
| * Merge branch 'forgejo' into repocardJakobDev2024-12-298-14/+70
| |\
| * \ Merge branch 'forgejo' into repocardJakobDev2024-12-191-1/+1
| |\ \
| * | | UpdateJakobDev2024-12-181-0/+5
| | | |
| * | | feat: Add summary card for repos and releasesJakobDev2024-12-141-0/+2
| | | |
* | | | Merge pull request '[gitea] week 2024-53 cherry pick (gitea/main -> ↵Earl Warren2024-12-302-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | demilestone should not include milestone (#32923)Lunny Xiao2024-12-282-0/+12
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #32887 (cherry picked from commit f44712f22bc7bfce049c64c27f60453ff1e41a5c) Conflicts: services/issue/milestone_test.go trivial conflicts (require vs assert)
* | | | Merge branch 'forgejo' into feat/add-oidc-ssh-keysMaks1mS2024-12-268-14/+70
|\| | |
| * | | Merge pull request '[gitea] week 2024-52 cherry pick (gitea/main -> ↵Earl Warren2024-12-242-0/+9
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | forgejo)' (#6342) from earl-warren/wcp/2024-52 into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6342 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| | * | | Add more load functions to make sure the reference object loaded (#32901)Lunny Xiao2024-12-222-0/+9
| | | |/ | | |/| | | | | | | | | | | | | | | | | Fix #32897 (cherry picked from commit dc8f59baa54d4f47edab6feb76a6903947584326)
| * | | feat: allow changing default branch update styleGeorge Bartolomey2024-12-232-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | fix: repo avatar generating (#6338)Snoweuph2024-12-222-3/+37
| | | |
| * | | Merge pull request 'fix: template config path (#2836)' (#6335) from ↵Gusted2024-12-221-10/+18
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snoweuph/forgejo:fix/template-file into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6335 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| | * | | fix: template config path (#2836)Snoweuph2024-12-221-10/+18
| | |/ /
| * / / fix: Ignore self review request notificationGabriel A. Giovanini2024-12-211-1/+2
| |/ / | | | | | | | | | | | | A notification would be trigger if a user request itself as review of a PR.
* | | Merge remote-tracking branch 'upstream/forgejo' into feat/add-oidc-ssh-keysMaxim Slipenko2024-12-197-391/+5
|\| |
| * | Detect whether action view branch was deleted (#32764)Lunny Xiao2024-12-151-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Fix #32761 ![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb) (cherry picked from commit 6370d2fb93a5ee897b82969ca30a9feb33667714) Conflicts: routers/web/repo/actions/actions.go routers/web/repo/actions/view.go trivial context conflicts
| * fix: Revert "allow synchronizing user status from OAuth2 login providers ↵Gusted2024-12-126-295/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31572)" This commit has a fundamental flaw, in order to syncronize if external users are still active the commit checks if the refresh token is accepted by the OAuth provider, if that is not the case it sees that as the user is disabled and sets the is active field to `false` to signal that. Because it might be possible (this commit makes this a highly likelyhood) that the OAuth provider still recognizes this user the commit introduces code to allow users to re-active themselves via the oauth flow if they were disabled because of this. However this code makes no distinction in why the user was disabled and always re-actives the user. Thus the reactivation via the OAuth flow allows users to bypass the manually activation setting (`[service].REGISTER_MANUAL_CONFIRM`) or if the admin for other reasons disabled the user. This reverts commit 21fdd28f084e7f1aef309c9ebd7599ffa6986453.
* | fix: do not rewrite when there are no keysMaxim Slipenko2024-12-101-0/+4
| |
* | style: run make fmtMaxim Slipenko2024-12-101-3/+2
| |
* | feat: add synchronization for SSH keys with OpenID ConnectMaxim Slipenko2024-12-095-9/+118
|/ | | | Co-authored-by: Kirill Kolmykov <cyberk1ra@ya.ru>
* Add support for indexing arch filesdragon2024-12-091-7/+29
|
* Do not rewrite ssh keys files when deleting a user without one (#6097)Andreas Shimokawa2024-12-053-10/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Problem Big instances can have huge authorized_keys files when using OpenSSH instead of the internal ssh server. Forgejo always re-generates the contents of that file when a user is deleted, even if he does not even have a public key uploaded. In case of codeberg.org, a 15MB file gets rewritten. If we batch delete 100 Spam users without ssh keys, we rewrite 1.5GB, this takes time and wears the SSD. In addition, there is a high chance of hitting a race contidion bug, when deleting users in parallel. ### Solution / Mitigation This patch prevents rewriting authorized_keys files, when not necessary. It greatly speeds up deleting malicious users, saves IO bandwidth and SSD wear. It also greatly reduces the chance of hitting a race condition bug. Fixing the race condition is not the scope of this patch though. ## 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. - [ ] 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 - [x] 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. Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6097 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org> Co-committed-by: Andreas Shimokawa <shimokawa@fsfe.org>
* Merge pull request '[gitea] week 2024-49 cherry pick (gitea/main -> ↵Earl Warren2024-12-033-27/+34
|\ | | | | | | | | | | | | forgejo)' (#6110) from earl-warren/wcp/2024-49 into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6110 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * Validate OAuth Redirect URIs (#32643)Rowan Bohde2024-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a TODO in the code to validate the RedirectURIs when adding or editing an OAuth application in user settings. This also includes a refactor of the user settings tests to only create the DB once per top-level test to avoid reloading fixtures. (cherry picked from commit 16a7d343d78807e39df124756e5d43a69a2203a3) Conflicts: services/forms/user_form.go tests/integration/user_settings_test.go simple conflicts
| * Add github compatible tarball download API endpoints (#32572)Lunny Xiao2024-12-032-26/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #29654 Fix #32481 (cherry picked from commit 703be6bf307ed19ce8dc8cd311d24aeb6e5b9861) Conflicts: routers/api/v1/repo/file.go routers/web/repo/repo.go services/repository/archiver/archiver.go services/repository/archiver/archiver_test.go trivial context conflicts add missing function PathParam skipped in a very large refactor
* | Merge pull request 'fix: clean up log files that no longer exist' (#6128) ↵Earl Warren2024-12-032-1/+34
|\ \ | | | | | | | | | | | | | | | | | | from gusted/forgejo-cleanup into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6128 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * | fix: clean up log files that no longer existGusted2024-12-032-1/+34
| | | | | | | | | | | | | | | | | | - If for some reason a action log file does not longer exist in the database or on the file system, then mark it as being cleaned up. - Unit test added.
* | | Merge pull request 'fix: dbconsistency check adding missing quotes' (#6124) ↵Gusted2024-12-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | from 71rd/forgejo:dbconsistency-forgejo into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6124 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * | | fix: dbconsistency check adding missing quotes71rd2024-12-021-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | On postgres the new check for orphaned authorization tokens fails with: - [E] Error: pq: syntax error at or near "." whilst counting Authorization token without existing User Adding marks to the user table reference allows the check to succeed
* | | Merge pull request 'fix: return correct type in `GetSubModule`' (#6114) from ↵Gusted2024-12-031-3/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | gusted/forgejo-submodule-entry into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6114 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * | Fix: return correct type in `GetSubModule`Gusted2024-12-021-3/+3
| |/ | | | | | | | | | | | | | | - `GetSubModules` already solely stores the URL of the submodule and not a `*SubModule` entry, so don't try to type assert it to be a struct. - I am not able to pinpoint when this was regressed but if I had to guess it might be #4941. - Added integration test.
* | Merge branch 'forgejo' into forgejoFermé le Lundi2024-11-281-0/+11
|\ \