Commit graph

18176 commits

Author SHA1 Message Date
Earl Warren
98e7753ade Merge pull request '[FEAT]: Allow forking without a repo ID' (#2310) from algernon/forgejo:f/repo/fork-route into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2310
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-12 13:36:49 +00:00
Clemens
086c66b06a make tidy 2024-02-12 13:07:15 +01:00
Clemens
2e41fe0a46 fix import 2024-02-12 13:00:47 +01:00
Michael Jerger
d65cd5a17a ActorID gets source type from NodeInfo 2024-02-12 10:55:00 +01:00
Michael Jerger
181d743a8a update copyright 2024-02-12 10:14:29 +01:00
Michael Jerger
9662aee375 reflect hard fork 2024-02-12 10:14:16 +01:00
Earl Warren
ba5f9f7bb4 Merge pull request '[RELEASE] Gitea version is for interoperability only' (#2327) from earl-warren/forgejo:wip-version into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2327
Reviewed-by: Otto <otto@codeberg.org>
2024-02-11 21:44:31 +00:00
Alexandre Oliveira
29007c09bd Fix Alpine Registry packages with noarch not being found (#2285)
Fixes #2173
~~Still requires a bit of work to do, I'm not 100% happy with this solution.~~

The idea is to copy the noarch package to the architectures available in the package repository.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2285
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Alexandre Oliveira <me+codeberg@aoalmeida.com>
Co-committed-by: Alexandre Oliveira <me+codeberg@aoalmeida.com>
2024-02-11 18:02:56 +00:00
Earl Warren
db3b867b02
[RELEASE] Gitea version is for interoperability only
Forgejo now has its own lifecycle and its version is derived from the
tag. The Gitea tags are no longer found in the Forgejo codebase and
can no longer be used for that purpose.

When a Forgejo release is published, for interoperability with the
existing tools in the ecosystem, it advertises the supported Gitea
version via /api/v1/version. It is set in the Makefile manually and
cannot be automatically set.

https://codeberg.org/forgejo-contrib/delightful-forgejo#packaging

Existing Forgejo packages rely on the Makefile to build and the change
must be done in a way that tries to not break their assumptions. From
the point of view of a Forgejo package build, the following will
happen on the next major release:

- The package version will bump from v1.21.x to v7.0.0
- /api/v1/version will bump from v1.21.x to v1.22.0
- /api/forgejo/v1/version will bump from v6.x to v7.0.0

The Makefile uses the following variables:

GITEA_VERSION is returned by /api/v1/version
FORGEJO_VERSION is returned by /api/forgejo/v1/version
VERSION is used in the name the binary file and the source archive

Before:

GITEA_VERSION is the computed version
FORGEJO_VERSION is set manually
VERSION defaults to GITEA_VERSION

After:

FORGEJO_VERSION is the computed version
GITEA_VERSION is set manually
VERSION defaults to FORGEJO_VERSION

When the version is computed, it comes from:

- The content of the VERSION file if it exists. It is inserted in
  the source archive because it does not contain a git repository
- Otherwise the output of `git describe`
2024-02-11 15:36:58 +01:00
Earl Warren
7b4dba3aa0 [ACTIONS] skip superflous pull request synchronized event (#2314)
Skip a HookEventPullRequestSync event if it has the same CommitSHA as an existing HookEventPullRequest event in the ActionRun table. A HookEventPullRequestSync event must only create an ActionRun if the CommitSHA is different from what it was when the PR was open.

This guards against a race that can happen when the following is done in parallel:

* A commit C is pushed to a repo on branch B
* A pull request with head on branch B

it is then possible that the pull request is created first, successfully. The commit that was just pushed is not known yet but the PR only references the repository and the B branch so it is fine.

A HookEventPullRequest event is sent to the notification queue but not processed immediately.

The commit C is pushed and processed successfully. Since the PR already exists and has a head that matches the branch, the head of the PR is updated with the commit C and a HookEventPullRequestSync event is sent to the notification queue.

The HookEventPullRequest event is processed and since the head of the PR was updated to be commit C, an ActionRun with CommitSHA C is created.

The HookEventPullRequestSync event is then processed and also has a CommitSHA equal to C.

Refs: https://codeberg.org/forgejo/forgejo/issues/2009
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2314
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2024-02-11 13:06:54 +00:00
silverwind
9c4e0c26f9
[gitea] Remove obsolete border-radius on comment content (#29128)
This border-radius is obsolete since we changed the comment rendering a
few months ago and it caused incorrect display on blockquotes.

Before:
<img width="160" alt="Screenshot 2024-02-10 at 18 42 48"
src="https://github.com/go-gitea/gitea/assets/115237/ccbf4660-acf9-4268-aad9-1ad49d317a67">

After:
<img width="135" alt="Screenshot 2024-02-10 at 18 42 40"
src="https://github.com/go-gitea/gitea/assets/115237/6f588e02-3b2a-49ee-b459-81d8068b2f4e">

(cherry picked from commit 9063fa096386362f9ae602fdf8a39ae8c972b8e0)
2024-02-11 13:47:48 +01:00
Yarden Shoham
7c9387a242
[gitea] Make blockquote border size less aggressive (#29124)
It's too thick

I made it match GitHub's size

![image](https://github.com/go-gitea/gitea/assets/20454870/08c05004-acd9-485e-9219-110d93fe1226)

![image](https://github.com/go-gitea/gitea/assets/20454870/e2e32b6c-4ba8-488e-9405-95d33f80adf7)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 5f5b5ba6e3e50ba5385e6cbf5957d4b73805769b)
2024-02-11 13:47:46 +01:00
Gwyneth Morgan
9a1d5c549c
[gitea] Drop "@" from email sender to avoid spam filters (#29109)
Commit 360b3fd17c (Include username in email headers (#28981),
2024-02-03) adds usernames to the From field of notification emails in
the form of `Display Name (@username)`, to prevent spoofing. However,
some email filtering software flags "@" in the display name part of the
From field as potential spoofing, as you could set the display name part
to another email address than the one you are sending from (e.g.
`From: "apparent@email-address" <actual@email-address>`). To avoid
being flagged, instead send emails from `Display Name (username)`.

Closes: #29107

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 5b2fd0fc19a2a77414c8e2989b4794b6617221f5)
2024-02-11 13:47:44 +01:00
GiteaBot
22fd29d3b7
[gitea] [skip ci] Updated translations via Crowdin
(cherry picked from commit c1f7249056d4aa38927aebcbddc6459ee714c801)
2024-02-11 13:47:36 +01:00
Earl Warren
40b9f3996b Merge pull request '[FEAT]: New route to view latest run of specific workflows' (#2304) from algernon/forgejo:f/web/actions/workflow-latest-run-routes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2304
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-11 07:34:08 +00:00
Michael Jerger
6e6813a88b make operatorid unique 2024-02-10 15:23:04 +01:00
Michael Jerger
6d17f45986 fix misspell 2024-02-10 15:22:38 +01:00
Michael Jerger
eecb9b8040 fmt fix 2024-02-10 15:22:30 +01:00
Michael Jerger
664144930e result of lint-fix 2024-02-10 15:22:16 +01:00
Michael Jerger
5fa62287d6 undo rebase conflicts 2024-02-10 15:21:45 +01:00
Michael Jerger
3ef57385ec fix linting 2024-02-10 15:21:22 +01:00
Michael Jerger
3b244d673b small fixes 2024-02-10 15:21:17 +01:00
Michael Jerger
ac82486a95 This months blog 2024-02-10 15:21:13 +01:00
Michael Jerger
8917bfca0c add a arch federation overview 2024-02-10 15:21:08 +01:00
Michael Jerger
94937abc04 Source is no longer needed - see adr-federated-star 2024-02-10 15:20:59 +01:00
Michael Jerger
b2cc848e7d clean up aliases 2024-02-10 15:20:48 +01:00
Michael Jerger
e733809ef2 symetric handling for value/reference 2024-02-10 15:20:33 +01:00
Michael Jerger
d2d5e84977 federated user is not entity - so no need for ID 2024-02-10 15:20:26 +01:00
Michael Jerger
91f7541add refactor for semantic and cycle free deps 2024-02-10 15:20:17 +01:00
Michael Jerger
66bc7a9a0c Search federatedUser instead of loginName 2024-02-10 15:20:09 +01:00
Michael Jerger
e44be72251 Add tx around user creation 2024-02-10 15:20:01 +01:00
Michael Jerger
edf7f61b83 mv federated_user_creation to user package 2024-02-10 15:19:55 +01:00
Clemens
e180467760 added user creation from ap 2024-02-10 15:19:47 +01:00
Michael Jerger
a702da69cc added test for federated user 2024-02-10 15:19:40 +01:00
Clemens
67f3f66be4 Created FederatedUser 2024-02-10 15:19:36 +01:00
Clemens
e477181e23 fix typos 2024-02-10 15:19:26 +01:00
Michael Jerger
a1ca7e958a use local fqdn for generated user email 2024-02-10 15:19:09 +01:00
Michael Jerger
5a7f6f15a6 ensure federation info fqdn to lowercase 2024-02-10 15:19:08 +01:00
Michael Jerger
e05c810823 document usermapping chosen 2024-02-10 15:19:08 +01:00
Michael Jerger
e255f73731 make class diagram more accurate 2024-02-10 15:19:07 +01:00
Michael Jerger
7db83688db updated rebase process 2024-02-10 15:19:06 +01:00
Michael Jerger
ed99dfa993 new threats thx to gusted 2024-02-10 15:19:06 +01:00
Michael Jerger
56660e3a0b add aspect resulting from our discussion 2024-02-10 15:19:05 +01:00
Michael Jerger
b02b8a307c fix wording 2024-02-10 15:19:05 +01:00
Michael Jerger
c45e726383 fix wording 2024-02-10 15:19:04 +01:00
Michael Jerger
5ef823e3af adjust urls to changed username 2024-02-10 15:19:03 +01:00
Michael Jerger
a08e435a1e updated rebase instructions 2024-02-10 15:19:02 +01:00
Michael Jerger
6b14d1a562 updated rebase instructions 2024-02-10 15:19:02 +01:00
Michael Jerger
49b014f28f add reply attack to blog 2024-02-10 15:18:59 +01:00
Michael Jerger
c58a995fb2 refactor FederationInfo -> FederationHost 2024-02-10 15:18:56 +01:00