Commit graph

19897 commits

Author SHA1 Message Date
Earl Warren
2c94bbf751 Merge pull request 'Add missing options & values to app.example.ini' (#3983) from Mai-Lapyst/forgejo:cleanup-app-example-ini into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3983
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-06-02 06:39:42 +00:00
Mai-Lapyst
56a6d3f77d
Adding release note for #3337 2024-06-02 06:04:53 +02:00
Mai-Lapyst
c3d60ed9f7
Cleanup & add missing options to app.example.ini 2024-06-02 03:32:36 +02:00
Earl Warren
05f0007437
fix(hook): instance admins wrongly restricted by permissions checks
This exception existed for both instance admins and repo admins
before ApplyToAdmins was introduced in
79b7089360.

It should have been kept for instance admins only because they are not
subject to permission checks.
2024-06-01 23:50:57 +02:00
Earl Warren
793421bf59
tests(integration): add TestPullMergeBranchProtect
Verify variations of branch protection that are in play when merging a
pull request as:

* instance admin
* repository admin / owner
* user with write permissions on the repository

In all cases the result is expected to be the same when merging
the pull request via:

* API
* web

Although the implementations are different.
2024-06-01 23:50:57 +02:00
Earl Warren
e0eba21ab7
test(integration): add protected file to doBranchProtect
A protected file pushed to a protected branch branch is not allowed.
2024-06-01 23:50:57 +02:00
Earl Warren
0d8478b82e
test(integration): refactor doBranchProtectPRMerge
* group test cases to clarify their purpose
* remove pull request branch protection tests, they are redundant
  with TestPullMergeBranchProtect
2024-06-01 23:50:57 +02:00
Earl Warren
20591d966e
test(integration): refactor testPullMerge
* split into testPullMergeForm which can be called directly if
  the caller wants to specify extra parameters.
* testPullMergeForm can expect something different than StatusOK
2024-06-01 23:50:57 +02:00
Earl Warren
49aea9879b
test(integration): refactor doAPIMergePullRequest
* http.StatusMethodNotAllowed can be expected: only retry if the
  error message is "Please try again later"
* split into doAPIMergePullRequestForm which can be called directly if
  the caller wants to specify extra parameters.
2024-06-01 23:50:57 +02:00
Earl Warren
70aa294cc1
test(integration): refactor doProtectBranch
explicitly specify the parameters instead of providing them as
arguments so the caller has a more fine grain control over them.
2024-06-01 23:50:57 +02:00
Earl Warren
4c2ed3c35d
test(integration): add t.Helper() to reduce stack polution
Without the a testify stack is likely to not show the relevant test.
2024-06-01 23:50:57 +02:00
0ko
1084362f7c CSS improvements around commit status icons (#3948)
- make sure margins are all consistent and good, elements are not too close or too apart
- this also applies to "Show commit body" button
- remove unused code. The class `commit-status-link` doesn't exist in templates, nor I could find it on any related pages in case it's generated in runtime

## Preview

![](/attachments/9cf6d73a-8132-4f30-8094-5687d7dd98e9)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3948
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-06-01 15:20:40 +00:00
Earl Warren
6d712590f1
chore(lint): make golangci-lint to v1.59.0 happy 2024-06-01 16:17:07 +02:00
Renovate Bot
288075c724 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.59.0 2024-06-01 02:07:47 +00:00
Earl Warren
f887972348 Merge pull request 'forgejo-federated-star: UI to define following repos' (#3886) from meissa/forgejo:forgejo-federated-pr5 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3886
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-31 15:57:17 +00:00
Earl Warren
5e71e0fd4a Merge pull request 'chore(renovate): use sqlite package cache' (#3958) from viceice/renovate-sqlite into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3958
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-31 15:32:02 +00:00
Michael Jerger
8aade372cb add a release note 2024-05-31 16:28:26 +02:00
Earl Warren
3a469d72a0 Merge pull request 'Update module github.com/go-testfixtures/testfixtures/v3 to v3.11.0' (#3955) from renovate/github.com-go-testfixtures-testfixtures-v3-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3955
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-31 13:51:08 +00:00
Earl Warren
dd4a1aa0d4
chore(dependency): automerge go-testfixtures/testfixtures
Refs: https://codeberg.org/forgejo/forgejo/pulls/3955
2024-05-31 15:10:49 +02:00
Michael Kriese
629554f8a8
chore(renovate): use sqlite package cache 2024-05-31 13:54:12 +02:00
Earl Warren
a1ef8eaf29 Merge pull request 'Disable self-registration by default on the install page' (#3934) from algernon/forgejo:abandon-all-registration-all-ye-who-enter-here into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3934
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-05-31 11:49:20 +00:00
Earl Warren
05c55e53a8 Merge pull request 'Update linters' (#3921) from renovate/linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3921
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-31 10:39:01 +00:00
forgejo-renovate-action
494ef1a78a Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.382.4' (#3957) from renovate/ghcr.io-visualon-renovate-37.x into forgejo 2024-05-31 10:33:50 +00:00
Renovate Bot
1a6fb16166 Update ghcr.io/visualon/renovate Docker tag to v37.382.4 2024-05-31 09:09:22 +00:00
Renovate Bot
430183fa14 Update linters 2024-05-31 08:55:12 +00:00
Earl Warren
dcc842dfeb Merge pull request 'chore(renovate): disallow eslint-plugin-no-use-extend-native v0.6.0+, requires eslint v9' (#3951) from viceice/forgejo:chore/renovate/update-config into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3951
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-31 08:36:38 +00:00
Michael Kriese
99789e2b9a
chore(renovate): disallow eslint-plugin-no-use-extend-native v0.6.0+, requires eslint v9 2024-05-31 09:00:52 +02:00
Gergely Nagy
6b24a7919d
Add a release note about the previous changes
Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-31 08:21:55 +02:00
Earl Warren
e48b23c2be Merge pull request 'Update dependency happy-dom to v14.12.0' (#3954) from renovate/happy-dom-14.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3954
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-31 05:56:24 +00:00
Earl Warren
3a8a8fb467 Merge pull request 'Update module github.com/alecthomas/chroma/v2 to v2.14.0 (take 2)' (#3952) from earl-warren/forgejo:wip-chroma into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3952
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-05-31 05:25:06 +00:00
forgejo-renovate-action
d1c4586d6b Merge pull request 'Update dependency swagger-ui-dist to v5.17.13' (#3929) from renovate/swagger-ui-dist-5.17.x into forgejo 2024-05-31 04:34:46 +00:00
Renovate Bot
652c2840f9 Update dependency happy-dom to v14.12.0 2024-05-31 04:07:17 +00:00
Renovate Bot
7ad366d253 Update dependency swagger-ui-dist to v5.17.14 2024-05-31 04:06:55 +00:00
0ko
503953fb9b Unify vertical and horizontal paddings in markup file view (#3944)
Use the same padding horizontally and vertically, so the views like readme look a bit nicer. Just slightly adjusted two values, nothing really test-able here.

## Motivation

I came to the conclusion that they should be the same myself, later I checked GitHub and it turned out to also use the same paddings. I would like to notice that the padding here (2em = 32px) is the same as GitHub uses too.
I find this as a logical UI change because the paddings are usually same on both axis across the UI (like on PR sidebar).

Also updated paddings for when the files are shown in profile, but copied the `1.5em` that GitHub uses. This, once again, makes sense, because the overview markdown isn't the primary content, or as primary as the readme on the repo is, taking the full usable width.

## Preview

https://codeberg.org/attachments/55f6685c-1978-410a-a17b-9fac91f0642e
---
https://codeberg.org/attachments/d9016a1c-13cf-4ea6-a8e4-2619d93f3560

## Note

`.non-diff-file-content .plain-text` is left untouched with `1em 2em`, because the plaintext seems to add it's own margins, so it would make it look worse.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3944
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-05-31 03:38:45 +00:00
Renovate Bot
5e33f2d50f Update module github.com/go-testfixtures/testfixtures/v3 to v3.11.0 2024-05-31 00:05:11 +00:00
Earl Warren
e417e424fa
Update module github.com/alecthomas/chroma/v2 to v2.14.0 (take 2)
Because the branch of the other PR was deleted by mistake.

Refs: https://codeberg.org/forgejo/forgejo/pulls/3922
2024-05-30 22:52:26 +02:00
0ko
68c9e9c2b9 Remove unused CSS rules (#3937)
Remove CSS code that was made unused by some changes in Gitea. I was working on a layout change here but was bothered a bit by these. I dug a bit into the git history to find out how they were made unused but it's relatively uneasy.

- remove rule that was setting `width: 100%;`: the exactly same selector setting this exact value is duplicated below
- remove rules with `followers` in selectors: we don't use this class in templates (would be nice if someone double-checks)
- my editor forced EoF fix

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3937
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-05-30 11:41:45 +00:00
Earl Warren
b1e04a89be Merge pull request 'Fix localization of release/tag counters on releases page' (#3938) from 0ko/forgejo:i18n-release-page into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3938
2024-05-29 22:06:22 +00:00
0ko
83e6b0c0c6 Fix localization of release/tag counters on releases page 2024-05-29 22:46:36 +05:00
Michael Jerger
2f7f1aab8a fix review 2024-05-29 18:31:06 +02:00
Michael Jerger
5620dd76fa Merge branch 'forgejo' into forgejo-federated-pr5 2024-05-29 18:26:16 +02:00
Renovate Bot
4f4eedc175 Update dependency @github/text-expander-element to v2.7.1 2024-05-29 00:10:32 +00:00
Earl Warren
73f6e8809a Merge pull request 'Update dependency happy-dom to v14.11.2' (#3928) from renovate/happy-dom-14.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3928
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-28 17:52:41 +00:00
Earl Warren
8cca0d74dc Merge pull request 'mailer: Switch X-Mailer to "Forgejo"' (#3931) from algernon/forgejo:mailer-detox into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3931
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-28 17:51:04 +00:00
Earl Warren
f770ae3eb6 Merge pull request 'mailer: Put the username in X-Forgejo-Sender and -Recipient' (#3932) from algernon/forgejo:of-display-and-user-names into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3932
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-28 17:50:01 +00:00
Earl Warren
ae99aa0bbe Merge pull request 'migrations: Map non-existant external users to Ghost' (#3935) from algernon/forgejo:who-let-the-nils-out into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3935
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-28 16:42:31 +00:00
Renovate Bot
59a1336b8d Update dependency happy-dom to v14.11.2 2024-05-28 14:04:44 +00:00
Earl Warren
7af3a981b5 Merge pull request '[gitea] week 2024-22 cherry pick (gitea/main -> forgejo)' (#3917) from earl-warren/wcp/2024-22 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3917
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-05-28 10:50:48 +00:00
Gergely Nagy
ade7304eea
migrations: Map non-existant external users to Ghost
When performing migrations, and need to remap external users to local
ones, when no local mapping is possible, map the external user to Ghost,
rather than the user who initiated the migration.

Mapping the external user to the migration initiator has the potential
of breaking assumptions elsewhere, like only having one review per pull
request per user. Mapping these migrated, locally unavailable users to
Ghost makes sure these - often hidden - assumptions do not break.

Fixes #3860.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-28 12:40:11 +02:00
Gergely Nagy
9fc61cae48
install: Force DisableRegistration on during install
When installing Forgejo via the on-line installer, force
DisableRegistration to true, to discourage creating instances with open
registration. Because open registration requires constant vigil to fight
off spammers of all kinds, it is not a great default. It should be a
conscious decision. This change is made in an effort to make the choice
of running an instance with open registration a conscious choice, rather
than simply the default.

Partially addresses #3925.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-28 08:57:30 +02:00