Commit graph

15008 commits

Author SHA1 Message Date
Giteabot
459d708d27
Adding remaining enum for migration repo model type. (#26021) (#26033)
Backport #26021 by @puni9869

Fixes: https://github.com/go-gitea/gitea/issues/26010

Adding remaining enum for migration repo model type.

Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
(cherry picked from commit 81f5d5b7229847cd4f07930733a55e9d45946c7d)
2023-07-26 14:23:49 +02:00
Giteabot
e188775591
Correctly refer to dev tags as nightly in the docker docs (#26004) (#26017)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
(cherry picked from commit 2184a06c1ae0365e496752ec2bc815b3870d3ded)
2023-07-26 14:23:49 +02:00
John Olheiser
a2a06d50b9
Fix awesome-gitea link in 1.19 (#26006)
As title, we still pull the docs for `1.19`.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
(cherry picked from commit c4798b08b1b7c24e53c98d23500a0b67c3695aa8)
2023-07-26 14:23:49 +02:00
Giteabot
968ab550e5
Fix the error message when the token is incorrect (#25701) (#25834)
Backport #25701 by @CaiCandong

we refactored `userIDFromToken` for the token parsing part into a new
function `parseToken`. `parseToken` returns the string `token` from
request, and a boolean `ok` representing whether the token exists or
not. So we can distinguish between token non-existence and token
inconsistency in the `verfity` function, thus solving the problem of no
proper error message when the token is inconsistent.
close #24439
related #22119

Co-authored-by: caicandong <50507092+CaiCandong@users.noreply.github.com>
Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit ee87b4e18ce7e9f62853ed8c470e679174ea813b)
2023-07-17 10:15:44 +02:00
Zettat123
2e6d978065
Fix activity type match in matchPullRequestEvent (#25746) (#25797)
Backport #25746

Fix #25736
Caused by #24048

Right now we only check the activity type for `pull_request` event when
`types` is specified or there are no `types` and filter. If a workflow
only specifies filters but no `types` like this:
```
on:
  pull_request:
    branches: [main]
```
the workflow will be triggered even if the activity type is not one of
`[opened, reopened, sync]`. We need to check the activity type in this
case.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit bd1946e3724c91dd794b2b43ad5fbf484e72476a)
2023-07-10 18:49:52 +02:00
Giteabot
28ab56b2f3
Test if container blob is accessible before mounting (#22759) (#25783)
Backport #22759 by @KN4CK3R

related #16865

This PR adds an accessibility check before mounting container blobs.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 5bfe469821ff42b490a7a08a7eec4b05226e7b29)
2023-07-10 18:49:52 +02:00
Jason Song
d64417a6fa
Check ctx.Written() for GetActionIssue (#25698) (#25714)
Backport #25698.

Fix #25697.

Just avoid panic, maybe there's another bug to trigger this case.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 53276d3e4954cb0ea853d6441f08f96b11c0487c)
2023-07-10 18:49:52 +02:00
Giteabot
493a45615d
Correct permissions for .ssh and authorized_keys (#25721) (#25731)
Backport #25721 by @wolfogre

Set the correct permissions on the .ssh directory and authorized_keys
file, or sshd will refuse to use them and lead to clone/push/pull
failures.

It could happen when users have copied their data to a new volume and
changed the file permission by accident, and it would be very hard to
troubleshoot unless users know how to check the logs of sshd which is
started by s6.

Co-authored-by: Jason Song <i@wolfogre.com>
(cherry picked from commit e6801df99c6bdfdbe4cc7be56d373566d12745b5)
2023-07-10 18:49:52 +02:00
wxiaoguang
b01fb88728
Fix branch selector on release page in 1.19 (#25706)
Fix #25705

Regression of #24369

There is no problem in 1.20 because there is #24459

(cherry picked from commit 67d16c653fbed71a91a288a8e08e21e8c681a003)
2023-07-10 18:49:52 +02:00
Loïc Dachary
daf0fa06af
[SEMVER] bump to 4.2.2+0-gitea-1.19.4 2023-07-05 08:19:39 +02:00
6543
12cbbc52aa
Changelog for v1.19.4 (#25667)
(cherry picked from commit d4243578ddab98d77878a9f0402f1f49f7251d76)
2023-07-05 08:18:41 +02:00
6543
effb3dea8a
Remove testing-e2e (#25681)
as we only backport fixes ... it's not important to fix upcoming browser
changes that will result in slightly different web-UI behavior

(cherry picked from commit 6ac353b693c777c6895176308c348a5b7b7b1eb1)
2023-07-05 08:18:41 +02:00
6543
63661b246c
Dont publish latest for v1.19.x anymore (#25666)
(cherry picked from commit 3be10ddc8835cf64bf7253592da3c2686d3f928a)
2023-07-05 08:18:41 +02:00
Giteabot
27796464cf
Fix bug when change user name (#25637) (#25645)
Backport #25637 by @lunny

Fix #25621

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 37bf5e761ace3df980566c0be2146e21f24b9fe3)
2023-07-05 08:18:41 +02:00
Earl Warren
3d7e1ce24c Merge pull request 'Fix incorrect webhook time and use relative-time to display it (#24477)' (#946) from earl-warren/forgejo:wip-v1.19-webhook into v1.19/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/946
2023-07-03 12:24:53 +00:00
John Olheiser
404506c7c1
Remove -v from vulncheck (#23953)
We should think about locking this dep, but for now this should get
builds going again.

(cherry picked from commit 797babbfcb)
2023-07-03 13:24:24 +02:00
yp05327
701d98adbf
Fix incorrect webhook time and use relative-time to display it (#24477)
Fixes #24414
After click replay this webhook, it will display `now`

![image](https://user-images.githubusercontent.com/18380374/235559399-05a23927-13f5-442d-8f10-2c7cd24022a0.png)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit dbb3736785)
(cherry picked from commit 198a8f6539b29bb39946e6528eaaa47e36d52432)
2023-07-03 13:01:10 +02:00
Loïc Dachary
8ddb5ba954 Merge pull request '[GITEA] do not display secrets when actions is disabled on a repo' (#941) from earl-warren/forgejo:wip-v1.19-secrets-navbar into v1.19/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/941
2023-06-28 16:01:47 +00:00
Earl Warren
5883db45c1
[GITEA] do not display secrets when actions is disabled on a repo
Fixes: https://codeberg.org/forgejo/forgejo/issues/938
2023-06-28 15:15:30 +02:00
Giteabot
5ef34a2cde
Add link to support page for commercial support (#25293) (#25299)
Backport #25293 by @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit b4bfaf7d4d67e97de610938f0d5f1f8c4df17b04)
2023-06-18 22:49:04 +02:00
Jonathan Tran
c34b605314
Fix task list checkbox toggle to work with YAML front matter (#25184) (#25236)
Backport https://github.com/go-gitea/gitea/pull/25184 by @jtran
Closes #25225.

Fixes https://github.com/go-gitea/gitea/issues/25160.

`data-source-position` of checkboxes in a task list was incorrect
whenever there was YAML front matter. This would result in issue content
or PR descriptions getting corrupted with random `x` or space characters
when a user checked or unchecked a task.

(cherry picked from commit 1650a26eb58ac71492d21f2d817d28990c100cb5)
2023-06-18 22:49:04 +02:00
Giteabot
38e5589bd6
Hide limited users if viewed by anonymous ghost (#25214) (#25224)
Backport #25214 by @KN4CK3R

The ghost user leads to inclusion of limited users/orgs in
`BuildCanSeeUserCondition`.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit a9ebf911faefb286d25c3731668740e0b2ed1904)
2023-06-18 22:49:04 +02:00
Giteabot
a87c620d99
Add WithPullRequest for actionsNotifier (#25144) (#25196)
Backport #25144 by @Zettat123

Fix #25093

If
[`WithPullRequest`](679b1f7949/services/actions/notifier_helper.go (L90-L96))
is not called, the `Ref` in
[`notifyInput`](679b1f7949/services/actions/notifier_helper.go (L55-L65))
will be empty, so the workflows in the head branch will not be found and
triggered.

Co-authored-by: Zettat123 <zettat123@gmail.com>
(cherry picked from commit de6ac4bf2a445a7854bbd9a603accf3d8118a719)
2023-06-12 23:23:43 +02:00
Lauris BH
a259a928ad
Fix open redirect check for more cases (#25143) (#25155)
Backport https://github.com/go-gitea/gitea/pull/25143

If redirect_to parameter has set value starting with \\example.com
redirect will be created with header Location: /\\example.com that will
redirect to example.com domain.

(cherry picked from commit a9030052a7b92bdfa1a6be0cdb540050a16ba31e)
2023-06-12 23:23:43 +02:00
HesterG
719dddd7b4
Fix broken links in documents v1.19 (#25142)
Partially port #24630

(cherry picked from commit ed78711e469865c378a295d00156e92b62f33105)
2023-06-12 23:23:43 +02:00
sillyguodong
5cc5a2000e
add zh-cn for Upgrade from old Gitea in v1.19 (#25022)
as title

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit e3cdb050fa24fdd9f5fd211260d087c05356a521)
2023-06-12 23:23:38 +02:00
techknowlogick
05cb2f2ddb
update labels link to correct location in 1.19 docs (#25105)
(cherry picked from commit 8df6713a6e3c83b7b86f355346f39190d6c4de32)
2023-06-12 23:23:38 +02:00
Giteabot
4cd188e9c6
Fix parallelly generating index failure with Mysql (#24567) (#25081)
Backport #24567 by @lunny

- Fix possible parallel creating commit status index problem and
creating issues/pull request index problem work with Mysql5/Mysql8
- Add parallel tests
- Reenable TestRepoCommitsStatusParallel on CI

Fix #22109

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 3ef97932d5b8d34decba3c7592b868f05773faf3)
2023-06-12 23:23:37 +02:00
Earl Warren
5dea2e272a
[BRANDING] How to start a runner: URL to Actions admin documentation
(cherry picked from commit da91799e6f06ac3c91c1cfc763f4ec0b5cc3cf21)
2023-06-11 10:30:44 +02:00
Giteabot
101cb5f4a4
improve permission documentation (#23942) (#25078)
(cherry picked from commit 15adec19e77d85fcd9cb798765d8b25373cdc28f)
2023-06-05 15:44:19 +02:00
Giteabot
700e5603be
GitLab migration: Sanitize response for reaction list (#25054) (#25059)
Backport #25054 by @6543

Co-authored-by: 6543 <6543@obermui.de>
(cherry picked from commit 8e94b715cc27fcdf28bc3c5d1420ceba74e7ddfd)
2023-06-05 15:44:19 +02:00
HesterG
c1ea975369
Add oauth Chinese document for v1.19 (#25020)
(cherry picked from commit b2ec116c605286b8eef2321d76d4c9006327aede)
2023-06-05 15:44:19 +02:00
HesterG
80c87c390d
Port Chinese document for localization to v1.19 (#25021)
(cherry picked from commit edfa2c5b78729797c5ee74ae63126c716fe23302)
2023-06-05 15:44:19 +02:00
Giteabot
05a3e8572c
Fix users cannot visit issue attachment bug (#25019) (#25027)
Backport #25019 by @lunny

Caused by #24362

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
(cherry picked from commit 73ae6b21d1b993e9936224b79b0bc743dbf382fc)
2023-06-05 15:44:19 +02:00
silverwind
c5245fabe4
Run markdownlint on drone, fix lint issue (#25040)
It currently does not run on 1.19 branch, resulting in lint error having
landed in https://github.com/go-gitea/gitea/pull/25016.

(cherry picked from commit b83e4f295d91b4d480d925b411a93e9e151790d1)
2023-06-05 15:44:19 +02:00
sillyguodong
e030d90f07
Add chinese documentations for Packages (#24914) (#25016)
backport: #24914
(cherry picked from commit 95bf09fca0361ce25517c41c396b447c7f544e14)
2023-06-05 15:44:19 +02:00
sillyguodong
ba2c902092
Add chinese documentations for installation (#24904) (#25015)
backport #24904

(cherry picked from commit 3b5cc02345cd64f9179b8c4d47effa2dc4948867)
2023-06-05 15:44:19 +02:00
HesterG
3f4a67eef8
Add Chinese docs for help, contribution and development (#24925) (#25011)
Backport #24925, partially backport #24934
(`docs/content/doc/help/faq.zh-cn.md` file)

Part of backport has already done by #24942

Also backport #24881 to avoid "deadlock"

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
(cherry picked from commit 37b73b333707d0e002c2074d59c0c60cc02658a3)
2023-06-05 15:44:19 +02:00
HesterG
35c503f1ca
Unify doc links to use paths relative to doc folder (#24979) (#25000)
Backport #24979

Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.

(cherry picked from commit d2c9fb02dd209079a660734f1b920bc1045362ff)
2023-06-05 15:44:19 +02:00
HesterG
442a13b98a
Remove unnecessary content on docs (#24976) (#25001)
Backport #24976

(cherry picked from commit cdeb55f6e53ac9bb8dcfc2d2aa6a84e4391ec6c5)
2023-06-05 15:44:19 +02:00
Giteabot
18b1ae2e72
Update from-binary.en-us.md (#24975) (#24999)
Backport #24975 by @team-epk

Fixed link to the creating a systemd service in Ubuntu document.

(cherry picked from commit 0ef7b6601835ff91902393d53e8fb7511f9c91fa)
2023-06-05 15:44:19 +02:00
sillyguodong
58bdcae613
Fix missing reference prefix of commits when sync mirror repository (#24994)
replace #24868
just a patch to fix #24824 in v1.19.4
The reference name of commits when synchronizing should also has prefix
like refs/heads/<branch-name>.

(cherry picked from commit 826b7b979c5e514f056836aebf6fd5422fbcd843)
2023-05-30 08:11:45 +02:00
Amos (LFlare) Ng
8d4d6f9b22
Match unqualified references when syncing pulls as well (#23070)
It seems that `opts.RefFullName` may occassionally be set
to just the branch name, without the `refs/heads/` prefixing.

(cherry picked from commit 7dc46ffbaa307d28db2ca7a0431d76ef900565bc)
2023-05-30 08:11:45 +02:00
Giteabot
7f3cc1446a
zh-cn translation for usage docs (#24897) (#24977)
Backport #24897 by @Zettat123

- [x] agit-support
- [x] clone-filter
- [x] incoming-email
- [x] labels
- [x] linked-references
- [x] merge-message-templates
- [x] permissions
- [x] profile-readme
- [x] protected-tags
- [x] push
- [x] repo-mirror
- [x] secrets
- [x] template-repositories
- [x] webhooks

Co-authored-by: Zettat123 <zettat123@gmail.com>
(cherry picked from commit 3a7e0953c1c44931e47b1bf2f5f1909c58011095)
2023-05-30 08:11:45 +02:00
Giteabot
9cabf76a09
simple docs fixes: 'pull request' page (en-us & zh-tw) link path to 'issue-pull-request-templates' (#24961) (#24970)
Backport #24961 by @jonkeim

Co-authored-by: Jon Keim <jon@windless.org>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 9da84a36ebded41aa77943c3e4e3ce9ab50b2423)
2023-05-30 08:11:45 +02:00
Giteabot
6f76c659ea
Remove reference to caddy v1 in docs (#24962) (#24964)
Backport #24962 by @techknowlogick

caddy v1 is loong eol. v2 should be used.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit 8a6a1143a4a03b587164cac93049a34c7b2dd47c)
2023-05-30 08:11:45 +02:00
HesterG
7f45886f05
Fix doc for 1.19 backend guideline (#24942)
Port the file change in
https://github.com/go-gitea/gitea/pull/24925/files from `main` to
`v1.19` to fix docs

(cherry picked from commit b4cd1028d90ba600c7da0ce4e13e83de94b10e80)
2023-05-30 08:11:45 +02:00
Giteabot
788ffdb328
Merge two translation contributing documents (#23939) (#24933)
Backport #23939 by @lunny

This PR also adjusts the weights.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit d1af0a3e4c111a819fee0718fc7e0d755335fe14)
2023-05-30 08:11:45 +02:00
wxiaoguang
6d3b3af57d
Merge different languages for language stats (#24900) (#24921)
Backport #24900

Fix #24896

If users set different languages by `linguist-language`, the `stats` map
could be: `java: 100, Java: 200`.

Language stats are stored as case-insensitive in database and there is a
unique key.

So, the different language names should be merged to one unique name:
`Java: 300`

(cherry picked from commit a83d597989bbfa6d7c10a1737bc40faa83224342)
2023-05-30 08:11:45 +02:00
Paweł Bogusławski
5fdac0d46a
Hiding Secrets options when Actions feature is disabled (#24792)
`Secrets` options should be hidden if `Actions` feature is disabled.

This fixes in release/v1.19. In main probably fixed in
63a401ac40 (didn't check).

Fixes: 659055138b
Author-Change-Id: IB#1134011

Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
(cherry picked from commit c5dee8823c55bd691994844868ffbb70e4b6a019)
2023-05-30 08:11:45 +02:00