Commit Graph

14218 Commits

Author SHA1 Message Date
crystal 7fa34500c9
Fix line spacing for plaintext previews (#22699) (#22701)
Backport #22699

Adding `<br>` between each line is not necessary since the entire file
is rendered inside a `<pre>`

fixes https://codeberg.org/Codeberg/Community/issues/915
2023-02-02 07:59:13 +01:00
Yarden Shoham 2e424c8af2
Add missing close bracket in imagediff (#22710) (#22712)
Backport #22710

There was a missing `]` in imagediff.js:

```
const $range = $container.find("input[type='range'"); 
```

This PR simply adds this.

Fix #22702

Co-authored-by: zeripath <art27@cantab.net>
2023-02-02 07:59:03 +01:00
Yarden Shoham 3feb793831
Fix wrong hint when deleting a branch successfully from pull request UI (#22673) (#22698)
Backport #22673

Fix #18785

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-02 07:59:01 +01:00
crystal 6fa4e4c821
Fix README TOC links (#22577) (#22677)
Backport #22577 

Fixes anchored markup links by adding `user-content-` (which is
prepended to IDs)

Closes https://codeberg.org/Codeberg/Community/issues/894
2023-02-02 07:58:56 +01:00
Gusted 06c80605a3
Don't return duplicated users who can create org repo (#22560) (#22562)
- Backport of #22560
- Currently the function `GetUsersWhoCanCreateOrgRepo` uses a query that
is able to have duplicated users in the result, this is can happen under
the condition that a user is in team that either is the owner team or
has permission to create organization repositories.
- Add test code to simulate the above condition for user 3,
[`TestGetUsersWhoCanCreateOrgRepo`](a1fcb1cfb8/models/organization/org_test.go (L435))
is the test function that tests for this.
  - The fix is quite trivial, use a map as a set to get distinct orgs.
2023-02-02 07:58:52 +01:00
John Olheiser d760f30819
Fix missing message in git hook when pull requests disabled on fork (#22625) (#22658)
Backport #22625

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2023-02-02 07:58:45 +01:00
Yarden Shoham 0211c63d0b
Link issue and pull requests status change in UI notifications directly to their event in the timelined view. (#22627) (#22642)
Backport #22627

Adding the related comment to the issue and pull request status change
in the UI notifications allows to navigate directly to the specific
event in its dedicated view, easing the reading of last comments and to
the editor for additional comments if desired.

Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
2023-02-02 07:58:40 +01:00
Yarden Shoham 1c76491fb5
Use `--index-url` in PyPi description (#22620) (#22636) 2023-02-02 07:58:34 +01:00
Loïc Dachary 2daf6223b0
Merge branch 'v1.18/forgejo-privacy' into v1.18/forgejo 2023-01-28 11:56:30 +01:00
Loïc Dachary 9516b9bd19
Merge branch 'v1.18/forgejo-i18n' into v1.18/forgejo 2023-01-28 11:56:26 +01:00
Earl Warren 67f857809e
[BRANDING] define the forgejo webhook type
templates/swagger/v1_json.tmpl updated with `make generate-swagger`
2023-01-28 10:45:13 +01:00
Earl Warren a1631a958d
[BRANDING] add X-Forgejo-* headers 2023-01-28 10:17:36 +01:00
Earl Warren d316a03157
[BRANDING] gitea-vet does not work for forgejo
It forbids files that do not have Gitea copyright headers

Signed-off-by: Earl Warren <contact@earl-warren.org>
2023-01-28 10:14:46 +01:00
Earl Warren bad61f0182
[BRANDING] parse FORGEJO__* in the container environment
Add the FORGEJO__ prefix as equivalent to GITEA__ when interpreted by
environment-to-ini. It is used when running the Forgejo container like
so:

  docker run --name forgejo -e FORGEJO__security__INSTALL_LOCK=true \
             -d codeberg.org/forgejo/forgejo:1.18

Signed-off-by: Earl Warren <contact@earl-warren.org>
2023-01-28 10:14:46 +01:00
Gusted d317303147
[BRANDING] Replace branding in Swagger
- "Gitea" is automatically being determined in Swagger and cannot be
overridden, therefor we override it after `swagger generate spec` is run.
- Resolves https://codeberg.org/forgejo/forgejo/issues/226
2023-01-28 10:14:46 +01:00
TomZ 3d6571de1f
[BRANDING] Rename usage of Gitea in user-visible places
As the docs of codeberg refer to the strings printed by the Forgejo
ssh servers, this is user-facing and is nice to update to the new
product name.
2023-01-28 10:14:46 +01:00
Caesar Schinas bbdd937126
[BRANDING] Rebrand default meta tags 2023-01-28 10:14:46 +01:00
Caesar Schinas a56c72f7e9
[BRANDING] Add Forgejo light, dark, and auto themes 2023-01-28 10:14:46 +01:00
Loïc Dachary 2a79ab9737
[BRANDING] container images: set APP_NAME 2023-01-28 10:14:46 +01:00
Caesar Schinas 6ffe84c519
[BRANDING] Custom loading animation for Forgejo 2023-01-28 10:14:46 +01:00
Caesar Schinas 1da4a62af8
[BRANDING] Rebrand default config settings for new installs (#140)
Replaces `Gitea` with `Forgejo` in the default config settings for new installs.

This will not affect existing installs.

Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/140
Co-authored-by: Caesar Schinas <caesar@noreply.codeberg.org>
Co-committed-by: Caesar Schinas <caesar@noreply.codeberg.org>
2023-01-28 10:14:45 +01:00
Caesar Schinas 2b1898ca2b
[BRANDING] Add `forgejo` emoji 2023-01-28 10:14:45 +01:00
Caesar Schinas 23ba17ac09
[BRANDING] Rebrand footer "powered by" links 2023-01-28 10:14:45 +01:00
Gusted ac960e4e50
[BRANDING] Rebrand systemd service (#137)
- We can rebrand this quite safely, as only new installations would likely look into this file and configure the correct folders(to use forgejo instead of gitea).

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/137
2023-01-28 10:14:45 +01:00
Caesar Schinas 575bb12726
[BRANDING] add Forgejo logo 2023-01-28 10:14:45 +01:00
fnetx 4c6f01cb6e
[I18N] Move source locales to other folder 2023-01-28 09:59:06 +01:00
fnetx 3621b34947
[I18N] Makefile + gitignore 2023-01-28 09:59:06 +01:00
fnetx 93a566702a
[I18N] Add Locale merger script 2023-01-28 09:59:06 +01:00
fnetx a8390d109a
[I18N] Rename upstream files 2023-01-28 09:59:05 +01:00
Gusted c036075107
Disable `update_checker` cron tasks
- This is being disabled as it will weekly connect to a domain.
- This only affects existing installations, as new installations will
have a explicit value being written into app.ini due to https://github.com/go-gitea/gitea/pull/21655
2023-01-28 02:08:25 +01:00
Percy Ma 8e7eea2db7
[DOCS] LICENSE: add Forgejo Authors 2023-01-28 02:03:50 +01:00
Loïc Dachary 7793b2254a
[DOCS] RELEASE-NOTES.md 2023-01-28 02:03:50 +01:00
Loïc Dachary a5af4e710d
[WORKFLOW] issues & pr templates 2023-01-28 02:03:50 +01:00
Loïc Dachary 0ead248e02
[DOCS] README 2023-01-28 02:03:50 +01:00
Loïc Dachary 3954ed9416
[DOCS] CONTRIBUTING
Refs: https://codeberg.org/forgejo/forgejo/issues/8
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/153
Refs: https://codeberg.org/forgejo/forgejo/issues/123
2023-01-28 02:03:50 +01:00
Loïc Dachary 3a0d2384fe
delete Gitea specific files that need rewriting for Forgejo
Although it would be possible to modify these files, it would create
conflicts when rebasing. Instead, this commit removes them entirely
and another commit can start from scratch, borrowing content from the
original files.

The drawback of this approach is that some content updates from Gitea
that also need updating in Forgejo will have to be copy/pasted
instead of being merged.
2023-01-28 02:03:48 +01:00
Loïc Dachary a00f90bfe9
implementation: forgejo container images
Signed-off-by: Loïc Dachary <loic@dachary.org>
2023-01-28 02:00:49 +01:00
Loïc Dachary b1ffd1e9da
implementation: Woodpecker based CI
Refs: https://codeberg.org/forgejo/forgejo/issues/73
Refs: https://codeberg.org/forgejo/forgejo/issues/101
Refs: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/issues/51
Refs: https://codeberg.org/forgejo/forgejo/issues/117
Refs: https://codeberg.org/forgejo/forgejo/issues/25
Refs: https://codeberg.org/forgejo/forgejo/issues/154
Refs: https://codeberg.org/forgejo/forgejo/issues/180
Refs: https://codeberg.org/forgejo/forgejo/issues/230
2023-01-28 01:59:54 +01:00
Loïc Dachary deaa11b203
implementation: publish forgejo- binaries instead of gitea-
Signed-off-by: Loïc Dachary <loic@dachary.org>
2023-01-28 01:59:54 +01:00
Gary Moon 43cf0079b1
Skip GitHub migration tests if the API token is undefined (#21824)
GitHub migration tests will be skipped if the secret for the GitHub API
token hasn't been set.

This change should make all tests pass (or skip in the case of this one)
for anyone running the pipeline on their own infrastructure without
further action on their part.

Resolves https://github.com/go-gitea/gitea/issues/21739

Signed-off-by: Gary Moon <gary@garymoon.net>
2023-01-28 01:59:37 +01:00
Yarden Shoham f204ff4ef7
Prevent duplicate labels when importing more than 99 (#22591) (#22598)
Backport #22591

Importing labels (via `gitea restore-repo`) did not split them up into
batches properly. The first "batch" would create all labels, the second
"batch" would create all labels except those in the first "batch", etc.
This meant that when importing more than 99 labels (the batch size)
there would always be duplicate ones.

This is solved by actually passing `labels[:lbBatchSize]` to the
`CreateLabels()` function, instead of the entire list `labels`.

Co-authored-by: Sybren <122987084+drsybren@users.noreply.github.com>
2023-01-24 14:48:21 -06:00
John Olheiser f6cb7860a2
Changelog 1.18.3 (#22575)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-01-23 08:42:02 -06:00
Yarden Shoham 6068978c42
Prevent multiple `To` recipients (#22566) (#22569)
Backport #22566

Change the mailer interface to prevent the leaking of possible hidden
email addresses when sending to multiple recipients.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
2023-01-22 11:37:26 -06:00
Yarden Shoham c320caed97
Truncate commit summary on repo files table. (#22551) (#22552)
Backport #22551
There was an unintended regression in #21124 which assumed that
.commits-list .message-wrapper would only match the commit summaries on
/{owner}/{name}/commits/*. This assumption is incorrect as the
directory/file view also uses a .commits-list wrapper.

Rather than completely restructure this page this PR simply adjusts the
styling to again use display: inline-block; for #repo-files-table
.commit-list .message-wrapper

Fix #22360
2023-01-20 23:34:52 +08:00
silverwind f1c826ed29
Mute all links in issue timeline (#22534)
Backport of https://github.com/go-gitea/gitea/pull/22533.
https://github.com/go-gitea/gitea/pull/21799 introduced a regression
where some links in the issue timeline were not muted any more. Fix it
by replacing all `class="text grey"` with `class="text grey
muted-links"` in the file.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-01-20 00:18:58 -05:00
zeripath 3c531d3957
When updating by rebase we need to set the environment for head repo (#22535) (#22536)
Backport #22535

The update by rebase code reuses the merge code but shortcircuits and
pushes back up to the head. However, it doesn't set the correct pushing
environment - and just uses the same environment as the base repo. This
leads to the push update failing and thence the PR becomes out-of-sync
with the head.

This PR fixes this and adjusts the trace logging elsewhere to help make
this clearer.

Fix #18802

Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
2023-01-19 17:31:20 -05:00
John Olheiser 1ae2525922
chore: changelog 1.18.2 (#22530)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-01-19 20:23:25 +00:00
John Olheiser fd7ebaaa9c
Fix issue not auto-closing when it includes a reference to a branch (#22514) (#22521)
Backport #22514

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2023-01-19 11:17:44 -06:00
John Olheiser fa33271157
Fix invalid issue branch reference if not specified in template (#22513) (#22520)
Backport #22513

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2023-01-19 09:39:30 -06:00
techknowlogick 4b3e456afa
cgo cross-compile for freebsd (#22397) (#22519)
Provide pre-compiled cgo binaries for freebsd

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-01-18 22:06:17 -05:00