Commit graph

19531 commits

Author SHA1 Message Date
Gergely Nagy
4bccc96684
mailer: Put the username in X-Forgejo-Sender and -Recipient
Following gitea#28981, set `X-Forgejo-Sender` and `X-Forgejo-Recipient`
to the username of the respective users, rather than their display name.
The username is more appropriate for these headers, for filtering
purposes. The display name is already included in the From header.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-05-28 08:27:37 +02:00
Earl Warren
95ccbb5995 Merge pull request 'Update dependency updates to v16.1.1' (#3920) from renovate/updates-16.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3920
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-27 05:47:51 +00:00
Earl Warren
d17c8ad7fc Merge pull request 'Update dependency markdownlint-cli to v0.41.0' (#3919) from renovate/markdownlint-cli-0.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3919
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-27 05:46:18 +00:00
0ko
b6849b8e7d Merge pull request 'Port: Fix long branch name overflows (https://github.com/go-gitea/gitea/pull/30345)' (#3890) from 0ko/forgejo:fix-branch-overflow-2 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3890
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-05-27 04:24:41 +00:00
0ko
b2eba34506 Unify usercards margins (#3915)
These are some slight design changes to how usercards are presented.

- `margin`: removed one of the sides so the margins are the same in both axis
- `margin`: increased from 10px to 15px
Previously it was (Y, X) = (20, 10); now it's (15, 15)
 - `width`: slightly decreased so that the point, where too small screen width causes card relocation to another row, doesn't increase
- `padding`: this change does nothing visually. `padding-bottom` was useless because padding was already set for all sides by another rule `.ui.segment {padding: 1em};`. This change just ensures that padding stays the same for all sides even if `.ui.segment` changes, instead of causing inconsistency
- `margin-bottom`: added as an override to margin caused by `display: flex`. From my research, usually there's `25px` gap between the content and the pagination. It was `39px` here, now it's `25px` too

### Before

![image](/attachments/0ebf6f44-6b27-4d4d-8856-77568291518c)

### After

![image](/attachments/1e0a3d95-ac49-4d10-8e00-86cc041d4338)

I can't show the distance between the content and the pagination, but the change does work when applying via devtools on https://codeberg.org/forgejo/forgejo/stars.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3915
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-05-27 04:22:48 +00:00
Renovate Bot
23a991a0b4 Update dependency updates to v16.1.1 2024-05-27 00:04:27 +00:00
Renovate Bot
319acec27c Update dependency markdownlint-cli to v0.41.0 2024-05-27 00:04:18 +00:00
Earl Warren
4a9dd87496 Merge pull request 'fix(release): golang:1.22-alpine3.20 does not have all architectures' (#3918) from earl-warren/forgejo:wip-alpine into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3918
Reviewed-by: thefox <thefox@noreply.codeberg.org>
2024-05-26 20:24:52 +00:00
Earl Warren
d59ed64345
fix(release): golang:1.22-alpine3.20 does not have all architectures
It was premature to try to use them, try again later.

https://codeberg.org/forgejo-integration/forgejo/actions/runs/2147

github.com/docker/buildx v0.14.1 59582a88fca7858dbe1886fd1556b2a0d79e43a3
::endgroup::
[command]/usr/bin/docker buildx build --build-arg RELEASE_VERSION=8.0-test --file Dockerfile --iidfile /tmp/docker-actions-toolkit-UzuWxS/iidfile --platform linux/amd64,linux/arm64,linux/arm/v6 --tag codeberg.org/***/forgejo:8.0-test --metadata-file /tmp/docker-actions-toolkit-UzuWxS/metadata-file --push .
------
 > [linux/arm/v6 internal] load metadata for code.forgejo.org/oci/golang:1.22-alpine3.20:
------
Dockerfile:3
--------------------
   1 |     FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
   2 |
   3 | >>> FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
   4 |
   5 |     ARG GOPROXY
--------------------
Dockerfile:1
--------------------
   1 | >>> FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
   2 |
   3 |     FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
--------------------
Dockerfile:54
--------------------
  52 |     RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete
  53 |
  54 | >>> FROM code.forgejo.org/oci/golang:1.22-alpine3.20
  55 |     ARG RELEASE_VERSION
  56 |     LABEL maintainer="contact@forgejo.org" \
--------------------
ERROR: failed to solve: code.forgejo.org/oci/golang:1.22-alpine3.20: failed to resolve source metadata for code.forgejo.org/oci/golang:1.22-alpine3.20: no match for platform in manifest: not found
::error::buildx failed with: ERROR: failed to solve: code.forgejo.org/oci/golang:1.22-alpine3.20: failed to resolve source metadata for code.forgejo.org/oci/golang:1.22-alpine3.20: no match for platform in manifest: not found
2024-05-26 21:51:57 +02:00
Earl Warren
f2204d81f1 Merge pull request 'tests(web): verify compressed files are not re-compressed' (#3909) from earl-warren/forgejo:wip-skip-gzip into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3909
Reviewed-by: Victoria <efertone@noreply.codeberg.org>
2024-05-26 11:12:05 +00:00
0ko
c3ffa30e7a [I18N] Fixes and improvements to English locale (#3912)
Mostly cap fixes and a few improvements.

As for `activity.active_prs_count_`, it currently looks like this in the UI, I fixed it:
![image](/attachments/5d2dc089-519e-4655-8f8b-f78964ff179a)

Although I'm also the person who [introduced](4c1af0d9a6) the inconsistency.

`send_reset_mail` is a button, removed redundant word from it. It would be good to refactor such keys, but it will be an impossibly long process. Anyway, key refactors are done in separate PRs for easier merges.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3912
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-26 11:06:28 +00:00
Earl Warren
8790ce1890 Merge pull request 'Delete .changelog.yml' (#3913) from 0ko/forgejo:_.changelog.yml into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3913
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-26 10:50:36 +00:00
0ko
b4c7cf6099 Delete .changelog.yml 2024-05-26 09:49:38 +05:00
Earl Warren
a05eb66c99
tests(web): verify compressed files are not re-compressed
the test file used has a size below the default threshold and will
never be compressed because of that, regardless of its extension. Reduce
the threshold to 10 bytes otherwise the test is a false positive.
2024-05-25 23:54:28 +02:00
Codeberg Translate
0281af75f4 [I18N] Translations update from Weblate (#3851)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: Kaede Fujisaki <ledyba@users.noreply.translate.codeberg.org>
Co-authored-by: NameLessGO <NameLessGO@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3851
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-05-25 18:32:20 +00:00
Earl Warren
bd32dedb48 Merge pull request 'fix(services): set SendNotificationEmailOnNewUser' (#3904) from earl-warren/forgejo:wip-new-user-notify into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3904
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
2024-05-25 15:11:16 +00:00
Earl Warren
ff2a3f4e3a
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.
2024-05-25 16:27:44 +02:00
Earl Warren
b1e78f0354 Merge pull request 'Update redis Docker tag to v7.2.5' (#3896) from renovate/redis-7.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3896
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-25 08:40:32 +00:00
Earl Warren
3cf92e07df Merge pull request 'Update dependency codespell to v2.3.0' (#3898) from renovate/codespell-2.x-lockfile into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3898
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-25 08:23:55 +00:00
Earl Warren
b208b368d8 Merge pull request 'fix(cli): add missing quote in storage help' (#3893) from earl-warren/forgejo:wip-cli-typo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3893
Reviewed-by: Victoria <efertone@noreply.codeberg.org>
2024-05-25 07:46:22 +00:00
Earl Warren
8153dafc73 Merge pull request 'feat(release): fetch OCI alpine images from code.forgejo.org/oci' (#3892) from earl-warren/forgejo:wip-alpine into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3892
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-25 07:45:37 +00:00
Earl Warren
c7711dac6d
chore: fix typos identified by mispell 2024-05-25 09:43:50 +02:00
Earl Warren
041932ed01
feat(release): fetch OCI alpine images from code.forgejo.org/oci
Use code.forgejo.org/oci instead of docker.io
so that builds are not subject to rate-limiting when debugging.

The mirrored images are updated daily

https://code.forgejo.org/forgejo/oci-mirror/src/branch/main/.forgejo/workflows/mirror.yml
2024-05-25 08:55:31 +02:00
Earl Warren
8c3c68e613 Merge pull request 'Update code.forgejo.org/oci/alpine Docker tag to v3.20' (#3897) from renovate/code.forgejo.org-oci-alpine-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3897
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-25 06:34:06 +00:00
Earl Warren
98be7826a3
chore(dependency): pin redis to 7.2 for testing
There is no need to pin a specific patch version for testing. The
worst that can happen in this context is that the CI fails and it can
be addressed in this context. It will not impact releases.
2024-05-25 08:25:51 +02:00
Earl Warren
534f88dd9a Merge pull request 'Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.58.2' (#3895) from renovate/github.com-golangci-golangci-lint-cmd-golangci-lint-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3895
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-25 06:17:21 +00:00
Renovate Bot
5d5ac041cd Update dependency codespell to v2.3.0 2024-05-25 02:07:08 +00:00
Renovate Bot
3b0501e69f Update code.forgejo.org/oci/alpine Docker tag to v3.20 2024-05-25 02:05:40 +00:00
Renovate Bot
237362ddd3 Update redis Docker tag to v7.2.5 2024-05-25 00:05:17 +00:00
Renovate Bot
5f0380cefb Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.58.2 2024-05-25 00:05:01 +00:00
Earl Warren
84bc4662c2
fix(cli): add missing quote in storage help 2024-05-25 00:32:36 +02:00
0ko
b478bfb3cf Merge pull request 'Update dependency @github/text-expander-element to v2.7.0' (#3807) from renovate/github-text-expander-element-2.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3807
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-05-24 17:34:21 +00:00
0ko
da12320a0c Replace imgage diff png background pattern with gradient (#3870)
Made the checkerboard background be more flexible in terms of scale and coloring. Provides dark theme for image diff.

I suppose these colors should not be re-used for a color-picker for a example, because it's usually more convenient to always have it in the light mode.

## Test

* go to e6d3623c7e
* or migrate https://next.forgejo.org/image-test/image-diff to your local instance

## Before/after

![image](/attachments/3835a455-69e0-4aec-bc67-5b226d8016c1)

(Old any - New Forgejo dark - New Gitea dark - New Forgejo/Gitea light)

---

Gradient property is taken from [here](https://www.reddit.com/r/css/comments/u08pf3/how_to_make_a_checkerboard_using_background/).

[CSS compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/conic-gradient#browser_compatibility): about four years of browser versions.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3870
Reviewed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
2024-05-24 17:33:13 +00:00
silverwind
f6c1fd76f2 Fix long branch name overflows (https://github.com/go-gitea/gitea/pull/30345)
Fixes: https://github.com/go-gitea/gitea/issues/27971
Fixes: https://github.com/go-gitea/gitea/pull/28010

<img width="689" alt="Screenshot 2024-04-09 at 00 19 57"
src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d">

Also fixes a similar issue in issue list where CSS was there but not
active because of missing `display: block`.

<img width="372" alt="Screenshot 2024-04-09 at 00 18 25"
src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798">

---
Little conflict in branch_selector_field (repo.pulls.no_results is renamed in Gitea)
And some weird conflict on new CSS rules added.
2024-05-24 22:11:37 +05:00
Earl Warren
509a077ec0 Merge pull request 'mysql: faster user deletion (hook_task query) for mariadb 10' (#3865) from oliverpool/forgejo:join_delete_hook_task into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3865
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 12:44:03 +00:00
Earl Warren
5fa2d8f5ca Merge pull request 'Fix expand diff in pull requests being 404 (port of gitea#31013)' (#3885) from algernon/forgejo:gitea/port/31013 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3885
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 12:42:19 +00:00
oliverpool
4ffda656e8 mysql: use inner join for hook_task deletion
Attempt to fix #3678
2024-05-24 10:31:41 +02:00
oliverpool
bb165fadf6 test: check hook_task deletion
move test to integration to ensure Sqlite + MySQL testing
2024-05-24 10:31:41 +02:00
Gergely Nagy
fd9ee1901b
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>
2024-05-24 10:30:38 +02:00
wxiaoguang
a62a887649
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.
2024-05-24 10:08:24 +02:00
Earl Warren
7c5a755602 Merge pull request 'Update dependency postcss-nesting to v12.1.5' (#3882) from renovate/postcss-packages into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3882
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-24 08:01:37 +00:00
Renovate Bot
95ae3a3c7e Update dependency postcss-nesting to v12.1.5 2024-05-24 02:04:27 +00:00
Earl Warren
eea841d25d Merge pull request 'Update dependency @playwright/test to v1.44.1' (#3879) from renovate/playwright-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3879
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 00:43:31 +00:00
Michael Jerger
b01f3bb2a1 federated-star: finalize receive activity (#3871)
PR will finalize the ability to receive a federated star from a remote instance.

This is part of: https://codeberg.org/forgejo/forgejo/pulls/1680

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3871
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
2024-05-24 00:25:57 +00:00
Earl Warren
32222d7d0a Merge pull request '[BUG] Fix SourceHut Builds webhook with triggers field' (#3864) from oliverpool/forgejo:sourcehut_trigger into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3864
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-24 00:16:22 +00:00
Renovate Bot
2d245351e5 Update dependency @playwright/test to v1.44.1 2024-05-24 00:04:17 +00:00
Earl Warren
8cfe353061 Merge pull request 'Update module github.com/jhillyerd/enmime to v1.2.0' (#3791) from renovate/github.com-jhillyerd-enmime-1.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3791
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-23 10:21:31 +00:00
Earl Warren
3056a2ea2e Merge pull request 'Update ghcr.io/visualon/renovate Docker tag to v37.374.3' (#3775) from renovate/ghcr.io-visualon-renovate-37.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3775
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-05-23 09:50:14 +00:00
Earl Warren
ba6d5ae2af
chore(release-notes): enmime upgrade to v1.2.0
Refs: https://codeberg.org/forgejo/forgejo/pulls/3791
2024-05-23 11:44:26 +02:00
Earl Warren
adba05bac5 Merge pull request 'Update dependency swagger-ui-dist to v5.17.12' (#3806) from renovate/swagger-ui-dist-5.17.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3806
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-05-23 09:35:41 +00:00