Commit graph

18928 commits

Author SHA1 Message Date
Earl Warren a215e9db30
fix(services): set SendNotificationEmailOnNewUser
regression from 767e9634d3. It changed
the parsing of the [admin] section from being derived from the content
of each key with mustMapSetting(rootCfg, "admin", &Admin) to
explicitly listing all keys in the code.

SEND_NOTIFICATION_EMAIL_ON_NEW_USER was not added and therefore
ignored. As a consequence notifications of newly registered users were
never sent.

(cherry picked from commit ff2a3f4e3a)

Conflict:
   modules/setting/admin_test.go
   EXTERNAL_USER_DISABLE_FEATURES does not exist in v7.0
2024-05-25 17:32:52 +02:00
Earl Warren 60ee476b57 Merge pull request '[v7.0/forgejo] fix(cli): add missing quote in storage help' (#3902) from bp-v7.0/forgejo-84bc466 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3902
2024-05-25 08:30:01 +00:00
Earl Warren 5a0059afd1 fix(cli): add missing quote in storage help
(cherry picked from commit 84bc4662c2)
2024-05-25 07:50:18 +00:00
Earl Warren 6bb1b001f9 Merge pull request '[gitea] week 2024-21-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#3859) from earl-warren/wcp/2024-21-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3859
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-05-24 19:59:51 +00:00
Earl Warren 4db698ce24 Merge pull request '[v7.0/forgejo] gitea#30342: Fix label-list rendering in timeline, decrease gap #3242' (#3877) from fnetx/fix-issue-label-display into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3877
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-05-24 15:23:14 +00:00
Earl Warren 75554579a6 Merge pull request '[v7.0/forgejo] mysql: faster user deletion (hook_task query) for mariadb 10' (#3888) from bp-v7.0/forgejo-4ffda65-bb165fa into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3888
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 13:45:38 +00:00
Earl Warren 1890eda1b7 Merge pull request '[v7.0/forgejo] Fix expand diff in pull requests being 404 (port of gitea#31013)' (#3887) from bp-v7.0/forgejo-fd9ee19-a62a887 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3887
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 13:31:41 +00:00
wxiaoguang 1fd1100ac9
Simplify mirror repository API logic (#30963)
Fix #30921

(cherry picked from commit 821d2fc2a3cc897f21d707455850177077b72410)
(cherry picked from commit 50b4e7f26e)

Equivalent to the Gitea v1.22 commit
(cherry picked from commit 8eac16de217978c1f7034f8e360f54d8d638e95e)
2024-05-24 15:15:07 +02:00
silverwind 50ef4ecefe
Upgrade tqdm dependency (#30996)
Result of `make update-py`

Fixes: https://github.com/go-gitea/gitea/security/dependabot/65
(cherry picked from commit a73e3c6a696029541ebd423f4eb2fec1ba151f79)
(cherry picked from commit 87def3837b)

Equivalent to the Gitea v1.22 commit
(cherry picked from commit f0e74da71929196dfdcab48616303d8b1c2c30da)
2024-05-24 15:15:07 +02:00
Lunny Xiao 6e17262567
Remove unnecessary double quotes on language file (#30977)
The double quotes and the prefix/suffix space are unnecessary.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit 5b6f80989fbd0574ca188ab683389ff7659de30d)
(cherry picked from commit a20e924ee7)

Equivalent to the Gitea v1.22 commit
(cherry picked from commit cb52eb639e5d9b36794e46ec2e09d633c23c7322)
2024-05-24 15:15:07 +02:00
wxiaoguang 37228ea080
Always load or generate oauth2 jwt secret (#30942)
Fix #30923

(cherry picked from commit effb405cae88474c27f5c8322a2627019af1cf64)
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>

Conflicts:
	- modules/setting/oauth2.go
	  Conflicted due to different ways of logging. Since the log
	  message is removed anyway, resolved by removing it.
	- modules/setting/oauth2_test.go
	  Manually copied the test added by Gitea.
	- routers/install/install.go
	  Not a conflict per se, but adjusted to use NewJwtSecret().
(cherry picked from commit 193ac67176)

Equivalent to the Gitea v1.22 commit
(cherry picked from commit 5b7e54f72f7b85b3394d7af20b27152d26e26256)
2024-05-24 15:15:07 +02:00
oliverpool 8f99d82cf2 mysql: use inner join for hook_task deletion
Attempt to fix #3678

(cherry picked from commit 4ffda656e8)
2024-05-24 12:46:33 +00:00
oliverpool cef84d7abf test: check hook_task deletion
move test to integration to ensure Sqlite + MySQL testing

(cherry picked from commit bb165fadf6)
2024-05-24 12:46:33 +00:00
Gergely Nagy 9ac51ddeb7 tests: Add a test for code expansion on PRs
This adds a new test case to `TestCompareCodeExpand` to exercise the
case where we're viewing a PR's diff.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit fd9ee1901b)
2024-05-24 12:45:35 +00:00
wxiaoguang d3b4f9d326 Fix incorrect "blob excerpt" link when comparing files (#31013)
When comparing files between the base repo and forked repo, the "blob
excerpt" link should point to the forked repo, because the commit
doesn't exist in base repo.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit f48cc501c46a2d34eb701561f01d888d689d60d5)

Conflicts:
	- templates/repo/diff/section_split.tmpl
	- templates/repo/diff/section_unified.tmpl
          Resolved the conflict by picking Gitea's change over ours, and
	  porting it.
	- tests/integration/compare_test.go
	  Kept our test, but picked the "compare all of the relevant
	  links" part of the Gitea test.
(cherry picked from commit a62a887649)
2024-05-24 12:45:35 +00:00
Earl Warren 391e311bbe [v7.0/forgejo] docs(release-notes): 7.0.3 (#3884)
Backport: https://codeberg.org/forgejo/forgejo/pulls/3858
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3884
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-05-24 12:40:26 +00:00
Earl Warren 09b08bcf7c Merge pull request '[v7.0/forgejo] [BUG] Fix SourceHut Builds webhook with triggers field' (#3881) from bp-v7.0/forgejo-0e479f3-1f6f909-c9f38e2-7b47cb4 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3881
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-05-24 07:56:48 +00:00
oliverpool 2459145150 add release-notes
(cherry picked from commit 0e479f3502)
2024-05-24 00:26:20 +00:00
oliverpool 1c99c289f6 refactor: sourcehut_builds ignore unused fields
(cherry picked from commit 1f6f909b2e)
2024-05-24 00:26:19 +00:00
oliverpool 287253ff7d fix: sourcehut_builds preserve unused fields
Fix #3820

(cherry picked from commit c9f38e2813)
2024-05-24 00:26:19 +00:00
oliverpool 855f95f7a2 test: sourcehut_builds trigger
(cherry picked from commit 7b47cb43c1)
2024-05-24 00:26:19 +00:00
silverwind 269f7b76e0 [PORT] gitea#30342: Fix label-list rendering in timeline, decrease gap
Not sure exactly when this regressed, but has been a while I think.

Before:

<img width="895" alt="Screenshot 2024-04-08 at 22 46 50"
src="https://github.com/go-gitea/gitea/assets/115237/9b1788f8-017e-4fe1-8ab9-938e0d76fb41">

After:

<img width="689" alt="Screenshot 2024-04-08 at 23 00 58"
src="https://github.com/go-gitea/gitea/assets/115237/90193df9-5c24-4a1a-96fe-3d4e8392063c">

Co-authored-by: Giteabot <teabot@gitea.io>

---
Conflict resolution: none

(cherry picked from commit 8d14266269f1b4fd5e13d701830919c1a1613444)
2024-05-24 01:45:38 +02:00
Earl Warren b5c49a19d2 Merge pull request 'Revert "Prevent automatic OAuth grants for public clients (#30790) (#30836)"' (#3867) from earl-warren/forgejo:wip-oauth-revert into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3867
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-05-22 15:06:48 +00:00
Earl Warren 6771312133
Revert "Prevent automatic OAuth grants for public clients (#30790) (#30836)"
This reverts commit 248a5b8d7a.

This commit introduces a regression descrdibed at

https://github.com/go-gitea/gitea/pull/30790#issuecomment-2118812426

There is a commit to try and fix it, but it is similarly
untested. Let's not accumulate regressions and wait until it is either
field tested by humans in Gitea or a test is written.

https://github.com/go-gitea/gitea/pull/31015/files
2024-05-22 16:37:00 +02:00
Earl Warren 07ad7dd8f6 Merge pull request 'fix: Forgejo 7.0 is compatible with Gitea v1.21.11' (#3857) from earl-warren/forgejo:wip-gitea-compatibility into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3857
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-21 13:43:05 +00:00
Earl Warren 6a472f90f8
fix: Forgejo 7.0 is compatible with Gitea v1.21.11 2024-05-21 15:01:37 +02:00
0ko f00123b893 [v7/forgejo][I18N] Translations update from Weblate (#3852)
Manual backport of #3759 with MSSQL removal conflict resolved in zh-TW `require_db_desc`.

Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: Fitik <Fitik@users.noreply.translate.codeberg.org>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Mumulhl <mumulhl@duck.com>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3852
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-21 03:15:55 +00:00
Earl Warren 0f61cb389a Merge pull request '[v7.0/forgejo] Fix error on renaming merged PRs' (#3842) from bp-v7.0/forgejo-3351ce2 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3842
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-20 14:08:11 +00:00
Earl Warren cbdef1792f Merge pull request '[v7.0/forgejo] badges: Relax the default workflow badge conditions' (#3846) from bp-v7.0/forgejo-d6915f4 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3846
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-20 11:44:22 +00:00
Gergely Nagy ef4c6abbb9 badges: Relax the default workflow badge conditions
Previously, if no branch was explicitly specified for a workflow, it
defaulted to the default branch of the repo. This worked fine for
workflows that were triggered on push, but it prevented showing badges
for workflows that only run on tags, or on schedule - since they do not
run on a specific branch.

Thus, relax the conditions, and if no branch is specified, just return
the latest run of the given workflow. If one is specified, *then*
restrict it to said branch.

Fixes #3487.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit d6915f4d5f)
2024-05-20 10:47:25 +00:00
0ko 0b01434aa3 Fix error on renaming merged PRs (#3840)
Closes https://codeberg.org/forgejo/forgejo/issues/3743.

This is a simple fix for https://codeberg.org/forgejo/forgejo/issues/3743, based on changes in [gitea#30990](https://github.com/go-gitea/gitea/pull/30990), which was not included in https://codeberg.org/forgejo/forgejo/pulls/3838 due to large code differences.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3840
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
(cherry picked from commit 3351ce2bc5)
2024-05-19 18:20:50 +00:00
Otto 487b2129aa Merge pull request '[v7.0/forgejo] Suppress Monaco JavaScript errors in Safari' (#3833) from bp-v7.0/forgejo-e4c3c03 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3833
Reviewed-by: Otto <otto@codeberg.org>
2024-05-19 12:56:18 +00:00
David Davies-Payne b9674b3ee9 Suppress Monaco JavaScript errors in Safari (#3805)
Fix #3638

This is a manual Forgejo-specific version of the Gitea PR https://github.com/go-gitea/gitea/pull/30862. The weekly Forgejo PR #3772 could not cherry-pick this commit due to conflicts (eg subsequent CodeSpell changes).

Only occurs with Webkit in Safari over eg `http://192..`. (not localhost).
See https://webkit.org/blog/10855/async-clipboard-api/

---
**Before**
![Before.jpg](/attachments/c570d030-fcce-48ea-ac96-06b624541c7b)

**After**
![After.jpg](/attachments/1a9132ab-f7f3-43a5-b3ea-37b6f2b671c4)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3805
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: David Davies-Payne <d2p@me.com>
Co-committed-by: David Davies-Payne <d2p@me.com>
(cherry picked from commit e4c3c039be)
2024-05-18 21:20:48 +00:00
0ko a5776cc883 Merge pull request '[v7.0/forgejo] Fix overflowing titles in project columns' (#3827) from beowulf/bp-v7.0/forgejo-853f005 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3827
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-05-18 14:13:17 +00:00
Beowulf 972dd76eeb
fixed overflow of projects column title
This fixes that titles of project columns can overflow and push the
action menu out of the card, so that interaction is no longer possible.

Addition to the cherry pick:
In v7.0, `min-width: 0` is additionally applied to the title of the
project column, as this is missing for the .ui.label in contrast to v8.0.

Fixes #3717

(cherry picked from commit 853f005180)
2024-05-18 09:36:51 +02:00
Earl Warren af32e3c09a Merge pull request '[v7.0/forgejo] [I18N] Some English decap and other fixes' (#3825) from bp-v7.0/forgejo-1b12ca8 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3825
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-18 07:35:38 +00:00
0ko ceb9d543b3 [I18N] Some English decap and other fixes
(cherry picked from commit 1b12ca80ec)
2024-05-18 07:02:14 +00:00
Earl Warren 0d06f3c2dd Merge pull request '[v7.0/forgejo] Fix contrast for issue count in projects columns' (#3814) from bp-v7.0/forgejo-82e0066 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3814
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-17 11:10:21 +00:00
Beowulf b898370a04 Fixed contrast for issue count in projects column
Regression introduced by 9934931f1f

See #3772

(cherry picked from commit 82e0066ed4)
2024-05-17 10:36:05 +00:00
Earl Warren 7eb54dbfca Merge pull request '[v7.0/forgejo] Update dependency mermaid to v10.9.1' (#3802) from earl-warren/forgejo:wip-v7.0-mermaid into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3802
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-16 17:07:15 +00:00
Renovate Bot 055a403781
Update dependency mermaid to v10.9.1
(cherry picked from commit 03e2aed969)

Conflicts:
	package-lock.json
	package.json
	trivial context conflict
2024-05-16 18:12:23 +02:00
Earl Warren f7e9db75c4 Merge pull request '[v7.0/forgejo] Port: Fix some UI problems (install) (gitea#30854)' (#3799) from bp-v7.0/forgejo-c16ae1a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3799
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-05-16 15:39:08 +00:00
Earl Warren 4ecbb2ef1b Merge pull request '[gitea] week 2024-20-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#3772) from earl-warren/wcp/2024-20-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3772
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-05-16 15:36:08 +00:00
forgejo-backport-action 7a8b2d8eb8 [v7.0/forgejo] Improve base locale related to settings and accounts (#3742)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/3733

- general English improvements
- separated the header of Language part in user settings into a new string for better translatability
- made that header contain "Default", just like the theme one, because this is how this actually works: the bottom selector saves the language temporarily, the selector in the settings saves it permanently. Not many users know about this difference. This clarification will help some
- removed some of "Manage" from the headers where they aren't really needed. This improves the consistency with some other headers

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3742
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-05-16 14:15:33 +00:00
Earl Warren 6bf1bcab57 Merge pull request '[v7.0/forgejo] test: add more sha256 repositories tests' (#3798) from bp-v7.0/forgejo-67effd6-df8aaeb-348182f-e3e82d0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3798
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-16 13:54:37 +00:00
wxiaoguang 4feb183d91 Fix some UI problems (install) (#30854)
(cherry picked from commit ce8b11ae131bef6cd7df0849ed39da7984953a4b)
(cherry picked from commit c16ae1ab39)
2024-05-16 13:22:15 +00:00
Earl Warren 0f10d15dfa Merge pull request '[v7.0/forgejo] template: label fix correct input id' (#3796) from bp-v7.0/forgejo-208eed0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3796
Reviewed-by: Otto <otto@codeberg.org>
2024-05-16 13:15:23 +00:00
oliverpool d877f18092 test-sha256: APICreateFile
(cherry picked from commit 67effd6985)
2024-05-16 13:07:14 +00:00
oliverpool 32a0e1e2b4 test-sha256: APICreateBranch
(cherry picked from commit df8aaeb1d5)
2024-05-16 13:07:14 +00:00
oliverpool ab4570d0cb test-sha256: PushDeployKeyOnEmptyRepo
(cherry picked from commit 348182f4b3)
2024-05-16 13:07:14 +00:00