]> source.dussan.org Git - gitea.git/log
gitea.git
16 months agoAdding remaining enum for migration repo model type. (#26021) (#26033)
Giteabot [Fri, 21 Jul 2023 09:25:23 +0000 (05:25 -0400)]
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>
16 months agoCorrectly refer to dev tags as nightly in the docker docs (#26004) (#26017)
Giteabot [Thu, 20 Jul 2023 15:50:33 +0000 (11:50 -0400)]
Correctly refer to dev tags as nightly in the docker docs (#26004) (#26017)

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
16 months agoFix awesome-gitea link in 1.19 (#26006)
John Olheiser [Thu, 20 Jul 2023 06:30:11 +0000 (01:30 -0500)]
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>
16 months agoFix the error message when the token is incorrect (#25701) (#25834)
Giteabot [Wed, 12 Jul 2023 09:29:30 +0000 (05:29 -0400)]
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>
16 months agoFix activity type match in `matchPullRequestEvent` (#25746) (#25797)
Zettat123 [Mon, 10 Jul 2023 13:30:46 +0000 (21:30 +0800)]
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>
16 months agoTest if container blob is accessible before mounting (#22759) (#25783)
Giteabot [Sun, 9 Jul 2023 13:00:59 +0000 (09:00 -0400)]
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>
16 months agoCheck `ctx.Written()` for `GetActionIssue` (#25698) (#25714)
Jason Song [Fri, 7 Jul 2023 07:59:16 +0000 (15:59 +0800)]
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>
16 months agoCorrect permissions for `.ssh` and `authorized_keys` (#25721) (#25731)
Giteabot [Thu, 6 Jul 2023 16:14:50 +0000 (12:14 -0400)]
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>
16 months agoFix branch selector on release page in 1.19 (#25706)
wxiaoguang [Wed, 5 Jul 2023 16:56:10 +0000 (00:56 +0800)]
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

16 months agoChangelog for v1.19.4 (#25667) v1.19.4
6543 [Tue, 4 Jul 2023 13:31:58 +0000 (15:31 +0200)]
Changelog for v1.19.4 (#25667)

16 months agoRemove testing-e2e (#25681)
6543 [Tue, 4 Jul 2023 12:40:15 +0000 (14:40 +0200)]
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

16 months agoDont publish latest for v1.19.x anymore (#25666)
6543 [Tue, 4 Jul 2023 11:04:00 +0000 (13:04 +0200)]
Dont publish latest for v1.19.x anymore (#25666)

16 months agoFix bug when change user name (#25637) (#25645)
Giteabot [Mon, 3 Jul 2023 21:00:44 +0000 (17:00 -0400)]
Fix bug when change user name (#25637) (#25645)

Backport #25637 by @lunny

Fix #25621

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
16 months agoRemove -v from vulncheck (#23953) (#25654)
silverwind [Mon, 3 Jul 2023 20:16:23 +0000 (22:16 +0200)]
Remove -v from vulncheck (#23953) (#25654)

Backport https://github.com/go-gitea/gitea/pull/23953 to 1.19 to fix the
branch build:

https://drone.gitea.io/go-gitea/gitea/75155/1/9

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
17 months agoAdd link to support page for commercial support (#25293) (#25299)
Giteabot [Fri, 16 Jun 2023 06:19:26 +0000 (02:19 -0400)]
Add link to support page for commercial support (#25293) (#25299)

Backport #25293 by @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
17 months agoFix task list checkbox toggle to work with YAML front matter (#25184) (#25236)
Jonathan Tran [Tue, 13 Jun 2023 18:22:59 +0000 (14:22 -0400)]
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.

17 months agoHide limited users if viewed by anonymous ghost (#25214) (#25224)
Giteabot [Tue, 13 Jun 2023 07:26:47 +0000 (03:26 -0400)]
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>
17 months agoAdd `WithPullRequest` for `actionsNotifier` (#25144) (#25196)
Giteabot [Sun, 11 Jun 2023 09:29:25 +0000 (05:29 -0400)]
Add `WithPullRequest` for `actionsNotifier` (#25144) (#25196)

Backport #25144 by @Zettat123

Fix #25093

If
[`WithPullRequest`](https://github.com/go-gitea/gitea/blob/679b1f7949aa40d4f962ef27f91b0b384b9c56a5/services/actions/notifier_helper.go#L90-L96)
is not called, the `Ref` in
[`notifyInput`](https://github.com/go-gitea/gitea/blob/679b1f7949aa40d4f962ef27f91b0b384b9c56a5/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>
17 months agoFix open redirect check for more cases (#25143) (#25155)
Lauris BH [Thu, 8 Jun 2023 17:03:15 +0000 (20:03 +0300)]
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.

17 months agoFix broken links in documents v1.19 (#25142)
HesterG [Thu, 8 Jun 2023 08:45:29 +0000 (16:45 +0800)]
Fix broken links in documents v1.19 (#25142)

Partially port #24630

17 months agoChange branch name from master to main in some documents' links (#25126) (#25139)
HesterG [Thu, 8 Jun 2023 08:31:55 +0000 (16:31 +0800)]
Change branch name from master to main in some documents' links (#25126) (#25139)

Backport #25126

As title. And needs to backport to 1.19

17 months agoadd zh-cn for `Upgrade from old Gitea` in v1.19 (#25022)
sillyguodong [Tue, 6 Jun 2023 15:39:53 +0000 (23:39 +0800)]
add zh-cn for `Upgrade from old Gitea` in v1.19 (#25022)

as title

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
17 months agoupdate labels link to correct location in 1.19 docs (#25105)
techknowlogick [Tue, 6 Jun 2023 15:29:16 +0000 (11:29 -0400)]
update labels link to correct location in 1.19 docs (#25105)

17 months agoFix parallelly generating index failure with Mysql (#24567) (#25081)
Giteabot [Mon, 5 Jun 2023 15:05:52 +0000 (11:05 -0400)]
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>
17 months agoimprove permission documentation (#23942) (#25078)
Giteabot [Mon, 5 Jun 2023 10:04:59 +0000 (06:04 -0400)]
improve permission documentation (#23942) (#25078)

17 months agoGitLab migration: Sanitize response for reaction list (#25054) (#25059)
Giteabot [Fri, 2 Jun 2023 21:13:33 +0000 (17:13 -0400)]
GitLab migration: Sanitize response for reaction list (#25054) (#25059)

Backport #25054 by @6543

Co-authored-by: 6543 <6543@obermui.de>
17 months agoAdd oauth Chinese document for v1.19 (#25020)
HesterG [Fri, 2 Jun 2023 14:52:53 +0000 (22:52 +0800)]
Add oauth Chinese document for v1.19 (#25020)

17 months agoPort Chinese document for localization to v1.19 (#25021)
HesterG [Fri, 2 Jun 2023 14:49:33 +0000 (22:49 +0800)]
Port Chinese document for localization to v1.19 (#25021)

17 months agoFix users cannot visit issue attachment bug (#25019) (#25027)
Giteabot [Thu, 1 Jun 2023 17:22:26 +0000 (13:22 -0400)]
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>
17 months agoRun markdownlint on drone, fix lint issue (#25040)
silverwind [Thu, 1 Jun 2023 15:34:40 +0000 (17:34 +0200)]
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.

17 months agoAdd chinese documentations for Packages (#24914) (#25016)
sillyguodong [Wed, 31 May 2023 07:55:01 +0000 (15:55 +0800)]
Add chinese documentations for Packages (#24914) (#25016)

backport: #24914

17 months agoAdd chinese documentations for installation (#24904) (#25015)
sillyguodong [Wed, 31 May 2023 06:17:19 +0000 (14:17 +0800)]
Add chinese documentations for installation (#24904) (#25015)

backport #24904

17 months agoAdd Chinese docs for help, contribution and development (#24925) (#25011)
HesterG [Wed, 31 May 2023 06:12:37 +0000 (14:12 +0800)]
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>
17 months agoUnify doc links to use paths relative to doc folder (#24979) (#25000)
HesterG [Tue, 30 May 2023 10:08:32 +0000 (18:08 +0800)]
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.

17 months agoRemove unnecessary content on docs (#24976) (#25001)
HesterG [Tue, 30 May 2023 09:21:03 +0000 (17:21 +0800)]
Remove unnecessary content on docs (#24976) (#25001)

Backport #24976

17 months agoUpdate from-binary.en-us.md (#24975) (#24999)
Giteabot [Tue, 30 May 2023 06:01:06 +0000 (02:01 -0400)]
Update from-binary.en-us.md (#24975) (#24999)

Backport #24975 by @team-epk

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

17 months agoFix missing reference prefix of commits when sync mirror repository (#24994)
sillyguodong [Tue, 30 May 2023 05:12:21 +0000 (13:12 +0800)]
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>.

17 months agoMatch unqualified references when syncing pulls as well (#23070)
Amos (LFlare) Ng [Mon, 29 May 2023 09:32:32 +0000 (17:32 +0800)]
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.

17 months ago`zh-cn` translation for usage docs (#24897) (#24977)
Giteabot [Mon, 29 May 2023 03:53:11 +0000 (23:53 -0400)]
`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>
17 months agosimple docs fixes: 'pull request' page (en-us & zh-tw) link path to 'issue-pull-reque...
Giteabot [Mon, 29 May 2023 01:51:53 +0000 (21:51 -0400)]
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>
17 months agoRemove reference to caddy v1 in docs (#24962) (#24964)
Giteabot [Sun, 28 May 2023 09:34:50 +0000 (05:34 -0400)]
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>
17 months agoFix doc for 1.19 backend guideline (#24942)
HesterG [Fri, 26 May 2023 09:22:38 +0000 (17:22 +0800)]
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

18 months agoMerge two translation contributing documents (#23939) (#24933)
Giteabot [Thu, 25 May 2023 16:07:25 +0000 (12:07 -0400)]
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>
18 months agoMerge different languages for language stats (#24900) (#24921)
wxiaoguang [Thu, 25 May 2023 05:12:21 +0000 (13:12 +0800)]
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`

18 months agoHiding Secrets options when Actions feature is disabled (#24792)
Paweł Bogusławski [Wed, 24 May 2023 10:01:11 +0000 (12:01 +0200)]
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
63a401ac40ce2cc19c7d0341d11d434b568653fc (didn't check).

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

Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
18 months agoOnly validate changed columns when update user (#24867) (#24903)
Giteabot [Wed, 24 May 2023 08:24:02 +0000 (04:24 -0400)]
Only validate changed columns when update user (#24867) (#24903)

Backport #24867 by @lunny

Fix #23211
Replace #23496

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoMake DeleteIssue use correct context (#24885)
wxiaoguang [Tue, 23 May 2023 17:11:19 +0000 (01:11 +0800)]
Make DeleteIssue use correct context (#24885)

Fix #24884 , the `ctx.Repo.GitRepo` might be nil.

18 months agoRemove unnecessary prefix usage (#24888)
Lunny Xiao [Tue, 23 May 2023 16:34:31 +0000 (00:34 +0800)]
Remove unnecessary prefix usage (#24888)

Since now all articles have a class, the `Usage:` is unnecessary. This
PR will remove them.

18 months agoSet `--font-weight-bold` to 600 (#24840)
silverwind [Mon, 22 May 2023 02:56:41 +0000 (04:56 +0200)]
Set `--font-weight-bold` to 600 (#24840)

Backport of https://github.com/go-gitea/gitea/pull/24827 to 1.19, just
the font weight reduction.

18 months agoReturn `404` in the API if the requested webhooks were not found (#24823) (#24830)
Giteabot [Sun, 21 May 2023 18:05:58 +0000 (14:05 -0400)]
Return `404` in the API if the requested webhooks were not found (#24823) (#24830)

Backport #24823 by @sonjek

Should resolve first point of the issue
https://github.com/go-gitea/gitea/issues/24574

Co-authored-by: Yevhen Pavlov <yevhen.pavlov.ua@gmail.com>
18 months agoFix topics deleted via API not being deleted in org page (#24825) (#24829)
Giteabot [Sun, 21 May 2023 12:48:54 +0000 (08:48 -0400)]
Fix topics deleted via API not being deleted in org page (#24825) (#24829)

Backport #24825 by @yardenshoham

The topics are saved in the repo_topic table with a repoID key. They are
also saved directly in the repository table.

Before this PR, only `AddTopic` and `SaveTopics` made sure the `topics`
field in the repository field was synced with the repo_topic table.

This PR makes sure `GenerateTopics` and `DeleteTopic` also sync the
`topics` in the repository table.

`RemoveTopicsFromRepo` doesn't need to sync the data as it is only used
to delete a repository.

- Fixes #24820

18 months agoFix Actions being enabled accidentally (#24802) (#24810)
Giteabot [Fri, 19 May 2023 13:17:48 +0000 (09:17 -0400)]
Fix Actions being enabled accidentally (#24802) (#24810)

Backport #24802 by @wolfogre

Regression of #24536. If the user doesn't explicitly disable Actions, it
will be enabled.

1. Gitea will call `loadRepositoryFrom` before `loadActionsFrom`.

https://github.com/go-gitea/gitea/blob/25d4f95df25dae5226e96e813dde87b071d9155e/modules/setting/setting.go#L234-L237
2. In `loadRepositoryFrom`,
`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` will set
`actions.ENABLED` with `true`.

https://github.com/go-gitea/gitea/blob/25d4f95df25dae5226e96e813dde87b071d9155e/modules/setting/repository.go#L313-L315
3. In `loadActionsFrom`, `rootCfg.Section("actions")` will get a section
with Actions enabled.

https://github.com/go-gitea/gitea/blob/25d4f95df25dae5226e96e813dde87b071d9155e/modules/setting/actions.go#L23-L26

Although the cause of the problem was using `true` by copy-paste
mistake, it also surprised me that
**`rootCfg.Section("actions").Key("ENABLED").MustBool(true)` doesn't
only read, but also write.**

Co-authored-by: Jason Song <i@wolfogre.com>
18 months agoFix safari cookie session bug (#24772)
wxiaoguang [Thu, 18 May 2023 01:10:23 +0000 (09:10 +0800)]
Fix safari cookie session bug (#24772)

Partically backport #24330

Related: #24176

Maybe fix #24770

18 months agoFix missed table name on iterate lfs meta objects (#24768) (#24774)
Giteabot [Wed, 17 May 2023 18:35:20 +0000 (14:35 -0400)]
Fix missed table name on iterate lfs meta objects (#24768) (#24774)

Backport #24768 by @lunny

Fix #24763

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoMake mailer SMTP check have timed context (#24751) (#24759)
Giteabot [Wed, 17 May 2023 10:08:39 +0000 (06:08 -0400)]
Make mailer SMTP check have timed context (#24751) (#24759)

Backport #24751 by @wxiaoguang

Make mailer SMTP check have timed context

Otherwise Gitea may block for long time if the DNS request blocks.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
18 months agoRespect original content when creating secrets (#24745) (#24746)
Giteabot [Tue, 16 May 2023 07:33:47 +0000 (03:33 -0400)]
Respect original content when creating secrets (#24745) (#24746)

Backport #24745 by @wolfogre

Fix #24721.

Follow what GitHub does:
- Don't trim spaces for secrets.
- Newline should be `\n` instead of `\r\n`.

Did some tests with:

```yaml
name: secrets
on: push
jobs:
  show_secrets:
    runs-on: ubuntu-latest
    steps:
      - name: Dump secrets context
        run: echo '${{ toJSON(secrets) }}' | base64
```

`AAAAAA`:
```text
   AAAAAA
AAAAAA

```
`BBBBBB`:
```text

BBBBBB
BBBBBB
```

On GitHub:

<img width="675" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8">

On Gitea (before):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2">

On Gitea (after):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a">

Co-authored-by: Jason Song <i@wolfogre.com>
18 months agoFix Pull Mirror out-of-sync bugs (#24732) (#24733)
wxiaoguang [Mon, 15 May 2023 18:30:21 +0000 (02:30 +0800)]
Fix Pull Mirror out-of-sync bugs (#24732) (#24733)

Backport #24732

Bug-fix only

18 months agoFix run list broken when trigger user deleted (#24706) (#24709)
Giteabot [Sun, 14 May 2023 08:55:58 +0000 (04:55 -0400)]
Fix run list broken when trigger user deleted (#24706) (#24709)

Backport #24706 by @lunny

Fix #24682

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoAdd test for api team organization (#24699) (#24702)
Giteabot [Sat, 13 May 2023 22:08:53 +0000 (18:08 -0400)]
Add test for api team organization (#24699) (#24702)

Backport #24699 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoFix `organization` field being `null` in `GET /api/v1/teams/{id}` (#24694) (#24696)
Giteabot [Sat, 13 May 2023 19:01:54 +0000 (15:01 -0400)]
Fix `organization` field being `null` in `GET /api/v1/teams/{id}` (#24694) (#24696)

Backport #24694 by @yardenshoham

Enabled the organization loading flag.

- Fixes #20399

# Before
```json
{
  ...
  "description": "",
  "organization": null,
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

# After
```json
{
  ...
  "description": "",
  "organization": {
    "id": 2,
    "name": "bigorg",
    "full_name": "",
    "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9",
    "description": "",
    "website": "",
    "location": "",
    "visibility": "public",
    "repo_admin_change_team_access": true,
    "username": "bigorg"
  },
  "includes_all_repositories": true,
  "permission": "owner",
  ...
}
```

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
18 months agoFix docs documenting invalid `@every` for `OLDER_THAN` cron settings (#24695) (#24698)
Giteabot [Sat, 13 May 2023 15:47:56 +0000 (11:47 -0400)]
Fix docs documenting invalid `@every` for `OLDER_THAN` cron settings (#24695) (#24698)

Backport #24695 by @yardenshoham

Looks like a copy-paste leftover

- Fixes #20868

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
18 months agoFix issues list page multiple selection update milestones (#24660) (#24663)
Giteabot [Fri, 12 May 2023 18:58:46 +0000 (14:58 -0400)]
Fix issues list page multiple selection update milestones (#24660) (#24663)

Backport #24660 by @lunny

Fix #24651

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agofix: release page for empty or non-existing target (#24659)
oliverpool [Fri, 12 May 2023 18:14:41 +0000 (20:14 +0200)]
fix: release page for empty or non-existing target (#24659)

Backport #24470

Fixes #24145

---

To solve the bug, I added a "computed" `TargetBehind` field to the
`Release` model, which indicates the target branch of a release. This is
particularly useful if the target branch was deleted in the meantime (or
is empty).

I also did a micro-optimization in `calReleaseNumCommitsBehind`. Instead
of checking that a branch exists and then call `GetBranchCommit`, I
immediately call `GetBranchCommit` and handle the `git.ErrNotExist`
error.

This optimization is covered by the added unit test.

_contributed in the context of @forgejo_

18 months agoDo not select line numbers when selecting text from the action run logs (#24594)...
Giteabot [Mon, 8 May 2023 19:56:53 +0000 (15:56 -0400)]
Do not select line numbers when selecting text from the action run logs (#24594) (#24596)

Backport #24594 by @yardenshoham

- Fixes #24578

# Before

![image](https://user-images.githubusercontent.com/20454870/236873942-26e97f28-6595-4be9-88fa-158870eda253.png)

# After

![image](https://user-images.githubusercontent.com/20454870/236874171-8f0182a5-e953-4740-b875-f3542dee8325.png)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
18 months agoFix close org projects (#24588) (#24591)
Giteabot [Mon, 8 May 2023 18:50:27 +0000 (14:50 -0400)]
Fix close org projects (#24588) (#24591)

Backport #24588 by @yp05327

A part of #22865
We can not close org projects now. This PR will fix it.

Co-authored-by: yp05327 <576951401@qq.com>
18 months agoRefresh the refernce of the closed PR when reopening (#24231) (#24587)
Giteabot [Mon, 8 May 2023 10:48:06 +0000 (06:48 -0400)]
Refresh the refernce of the closed PR when reopening (#24231) (#24587)

Backport #24231 by @sillyguodong

Close #24213
Replace #23830

#### Cause

- Before, in order to making PR can get latest commit after reopening,
the `ref`(${REPO_PATH}/refs/pull/${PR_INDEX}/head) of evrey closed PR
will be updated when pushing commits to the `head branch` of the closed
PR.

#### Changes

- For closed PR , won't perform these behavior: insert`comment`, push
`notification` (UI and email), exectue
[pushToBaseRepo](https://github.com/go-gitea/gitea/blob/74225033413dc0f2b308bbe069f6d185b551e364/services/pull/pull.go#L409)
function and trigger `action` any more when pushing to the `head branch`
of the closed PR.
- Refresh the reference of the PR when reopening the closed PR (**even
if the head branch has been deleted before**). Make the reference of PR
consistent with the `head branch`.

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
18 months agoImprove decryption failure message (#24573) (#24575)
wxiaoguang [Sun, 7 May 2023 14:12:32 +0000 (22:12 +0800)]
Improve decryption failure message (#24573) (#24575)

Backport #24573

Help some users like #16832 #1851

There are many users reporting similar problem: if the SECRET_KEY
mismatches, some operations (like 2FA login) only reports unclear 500
error and unclear "base64 decode error" log (some maintainers ever spent
a lot of time on debugging such problem)

The SECRET_KEY was not well-designed and it is also a kind of technical
debt. Since it couldn't be fixed easily, it's good to add clearer error
messages, then at least users could know what the real problem is.

18 months agoMakefile: Use portable !, not GNUish -not, with find(1). (#24565) (#24572)
Giteabot [Sun, 7 May 2023 11:30:13 +0000 (07:30 -0400)]
Makefile: Use portable !, not GNUish -not, with find(1). (#24565) (#24572)

Backport #24565 by @riastradh

fix https://github.com/go-gitea/gitea/issues/24564

Co-authored-by: Taylor R Campbell <campbell+gitea@mumble.net>
18 months agoFix the permission of team's `Actions` unit issue (#24536) (#24545)
Giteabot [Fri, 5 May 2023 13:07:02 +0000 (09:07 -0400)]
Fix the permission of team's `Actions` unit issue (#24536) (#24545)

Backport #24536 by @sillyguodong

close #24449

The unit of `Actions` should be contorlled not only by
`repository.DISABLED_REPO_UNITS` but also by `actions.ENABLED`
in the `app.ini`.
Previously, the permission of the team's `Actions` unit was not
controlled by `actions.Enabled`. So, even if the user sets
`actions.Enabled` to false, he can still select the permission of the
`Actions` unit for the team.

This PR makes the permissions of the team's `Actions` unit also
controlled by `actions.Enabled`. Just append`TypeActions` into
`DisabledRepoUnits` slice when initializing if `actions.Enabled` is
false.

### Changes:

If `Actions` is set disbaled in `app.ini`, like below:
```yaml
[actions]
ENABLED = false
```

1. If user try to create/edit a team, will prompt user that `Actions` is
disbaled.

![image](https://user-images.githubusercontent.com/33891828/236370415-961082b2-82d2-4d9e-8025-83872ad08cbb.png)

2. `actions` is not displayed in the sidebar on the team details page

![image](https://user-images.githubusercontent.com/33891828/236371817-f39f9bc9-5926-4b88-b5e6-d93617fcfb07.png)

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
18 months agoFix new wiki page mirror (#24518)
Lunny Xiao [Thu, 4 May 2023 20:30:47 +0000 (04:30 +0800)]
Fix new wiki page mirror (#24518)

backport #24395

---------

Co-authored-by: Giteabot <teabot@gitea.io>
18 months agoBump go.etcd.io/bbolt and blevesearch deps (#23062) (#24519)
Lunny Xiao [Thu, 4 May 2023 10:41:36 +0000 (18:41 +0800)]
Bump go.etcd.io/bbolt and blevesearch deps (#23062) (#24519)

Backport #23062
Backport #24515
Fix #23617

This notably brings support for GOARCH=loong64, among other fixes.
This PR also fix bleve search architecture problem.

---------

Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
Co-authored-by: WÁNG Xuěruì <1175567+xen0n@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
18 months agoChangelog for 1.19.3 (#24495) v1.19.3
techknowlogick [Wed, 3 May 2023 15:14:50 +0000 (11:14 -0400)]
Changelog for 1.19.3 (#24495)

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
18 months agoFix api error message if fork exists (#24487) (#24493)
Giteabot [Wed, 3 May 2023 12:15:56 +0000 (08:15 -0400)]
Fix api error message if fork exists (#24487) (#24493)

Backport #24487 by @fnetX

On the @Forgejo instance of Codeberg, we discovered that forking a repo
which is already forked now returns a 500 Internal Server Error, which
is unexpected. This is an attempt at fixing this.

The error message in the log:
~~~
2023/05/02 08:36:30 .../api/v1/repo/fork.go:147:CreateFork() [E]
[6450cb8e-113] ForkRepository: repository is already forked by user
[uname: ...., repo path: .../..., fork path: .../...]
~~~

The service that is used for forking returns a custom error message
which is not checked against.

About the order of options:
The case that the fork already exists should be more common, followed by
the case that a repo with the same name already exists for other
reasons. The case that the global repo limit is hit is probably not the
likeliest.

---------

Co-authored-by: Otto Richter (fnetX) <git@fralix.ovh>
18 months agoEnable whitespace rendering on selection in Monaco (#24444) (#24485)
Giteabot [Tue, 2 May 2023 20:58:11 +0000 (16:58 -0400)]
Enable whitespace rendering on selection in Monaco (#24444) (#24485)

Backport #24444 by @silverwind

Remove the
[renderWhitespace](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#renderWhitespace)
override, so the default value of `selection` takes over and makes
whitespace visible on selection.

<img width="128" alt="Screenshot 2023-04-30 at 19 09 41"
src="https://user-images.githubusercontent.com/115237/235366707-d598268d-03cc-4839-a195-c460bddae99b.png">

Co-authored-by: silverwind <me@silverwind.io>
18 months agonightly tag
techknowlogick [Mon, 1 May 2023 18:17:52 +0000 (14:17 -0400)]
nightly tag

18 months agoRemove less/_repository.less (#24467)
wxiaoguang [Mon, 1 May 2023 14:37:49 +0000 (22:37 +0800)]
Remove less/_repository.less  (#24467)

18 months agoSkip known flaky `queue` tests on CI environment (#24443)
silverwind [Sun, 30 Apr 2023 19:25:42 +0000 (21:25 +0200)]
Skip known flaky `queue` tests on CI environment (#24443)

Backport of https://github.com/go-gitea/gitea/pull/24419 to 1.19.

18 months agonightly tag for docker images
techknowlogick [Sun, 30 Apr 2023 17:42:37 +0000 (13:42 -0400)]
nightly tag for docker images

18 months agoImprove milestone filter on issues page (#22423) (#24440)
Giteabot [Sun, 30 Apr 2023 17:01:12 +0000 (13:01 -0400)]
Improve milestone filter on issues page (#22423) (#24440)

Backport #22423 by @lunny

Now we have `All milestones`, `No milestones`, `Open milestones` and
`Closed milestones`.
Fix #11924
Fix #22411

<img width="1166" alt="image"
src="https://user-images.githubusercontent.com/81045/212243375-95eea035-a972-44b8-8088-53db614cb07e.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoFix incorrect CurrentUser check for docker rootless (#24435)
wxiaoguang [Sun, 30 Apr 2023 03:47:04 +0000 (11:47 +0800)]
Fix incorrect CurrentUser check for docker rootless (#24435)

Many users report that 1.19 has a regression bug: the rootless image
can't start if the UID is not 1000.

https://github.com/go-gitea/gitea/issues/23632#issuecomment-1524589213

https://discourse.gitea.io/t/gitea-doesnt-start-after-update-to-1-19/6920/9

The problem is that the IsRunUserMatchCurrentUser logic is fragile, the
"SSH" config is not ready when it executes.

This PR is just a quick fix for 1.19. For 1.20, we need a clear and
stable solution.

18 months agoFix user-cards format (#24428) (#24431)
Giteabot [Sun, 30 Apr 2023 02:05:34 +0000 (22:05 -0400)]
Fix user-cards format (#24428) (#24431)

Backport #24428 by @KN4CK3R

Fixes #24418

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
18 months agogetting the tag list does not require being signed in (#24413) (#24416)
Giteabot [Sat, 29 Apr 2023 07:43:37 +0000 (03:43 -0400)]
getting the tag list does not require being signed in (#24413) (#24416)

Backport #24413 by @earl-warren

Fixes: https://codeberg.org/forgejo/forgejo/issues/681
Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
18 months agoChangelog 1.19.2 (#24365) v1.19.2
John Olheiser [Thu, 27 Apr 2023 23:39:52 +0000 (18:39 -0500)]
Changelog 1.19.2 (#24365)

Add changelog for 1.19.2

Signed-off-by: jolheiser <john.olheiser@gmail.com>
18 months agoFix auth check bug (#24382) (#24387)
Giteabot [Thu, 27 Apr 2023 22:49:50 +0000 (18:49 -0400)]
Fix auth check bug (#24382) (#24387)

Backport #24382 by @lunny

Fix https://github.com/go-gitea/gitea/pull/24362/files#r1179095324

`getAuthenticatedMeta` has checked them, these code are duplicated one.
And the first invokation has a wrong permission check. `DownloadHandle`
should require read permission but not write.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoAdd tags list for repos whose release setting is disabled (#23465) (#24369)
Zettat123 [Thu, 27 Apr 2023 04:40:36 +0000 (12:40 +0800)]
Add tags list for repos whose release setting is disabled (#23465)  (#24369)

Backport #23465

Close #23427

Co-Author: @wxiaoguang

If a repo's release setting is enabled, the logic has't changed.
Clicking the "Tags" button will jump to `/{user}/{repo}/tags` and
`templates/repo/release/list.tmpl` template will be used.

<img
src="https://user-images.githubusercontent.com/15528715/224939362-bd8974fd-08b0-4f79-a114-3389d15847ca.png"
width="600px" />

If the release setting is disabled, clicking the "Tags" button will
still jump to `/{user}/{repo}/tags` but a new template
`templates/repo/tag/list.tmpl` will be used.

<img
src="https://user-images.githubusercontent.com/15528715/233834564-74741e49-f4e9-47c8-ac12-e306642798dc.png"
width="600px" />

Since both templates above need to render the tags list, I moved the
tags list to a shared template located in
`templates/repo/tag/table.tmpl`.

18 months agoRequire repo scope for PATs for private repos and basic authentication (#24362) ...
Giteabot [Thu, 27 Apr 2023 00:57:51 +0000 (20:57 -0400)]
Require repo scope for PATs for private repos and basic authentication (#24362) (#24364)

Backport #24362 by @jolheiser

> The scoped token PR just checked all API routes but in fact, some web
routes like `LFS`, git `HTTP`, container, and attachments supports basic
auth. This PR added scoped token check for them.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
18 months agoFix no edit/close/delete button in org repo project view page (#24349)
yp05327 [Wed, 26 Apr 2023 11:38:41 +0000 (20:38 +0900)]
Fix no edit/close/delete button in org repo project view page (#24349)

Backport #24301

18 months agoFix Monaco IOS keyboard button (#24341) (#24347)
Giteabot [Wed, 26 Apr 2023 09:42:00 +0000 (05:42 -0400)]
Fix Monaco IOS keyboard button (#24341) (#24347)

Backport #24341 by @silverwind

Fix https://github.com/go-gitea/gitea/issues/16188. Turns out the
element was completely misaligned by fomantic styles. Add most of the
original styles in `!important` form to fix.

Tapping the button doesn't do anything useful in Simulator.app, but I
guess it's still better to not outright hide it in case it has a
possiblity to work.

<img width="121" alt="image"
src="https://user-images.githubusercontent.com/115237/234379685-4e67f8cd-7e91-4bcc-8e17-9d5b2ebed6cd.png">

Co-authored-by: silverwind <me@silverwind.io>
18 months agoFix wrong error info in RepoRefForAPI (#24344) (#24351)
Giteabot [Wed, 26 Apr 2023 09:07:51 +0000 (05:07 -0400)]
Fix wrong error info in RepoRefForAPI (#24344) (#24351)

Backport #24344 by @yp05327

Co-authored-by: yp05327 <576951401@qq.com>
18 months agoFix broken clone script on an empty archived repo (#24339) (#24348)
Giteabot [Wed, 26 Apr 2023 08:13:16 +0000 (04:13 -0400)]
Fix broken clone script on an empty archived repo (#24339) (#24348)

Backport #24339 by @yardenshoham

I made it render the script even if the repo is archived

- Fixes #24324

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
18 months agoDon't set meta `theme-color` by default (#24340) (#24346)
Giteabot [Wed, 26 Apr 2023 05:33:15 +0000 (01:33 -0400)]
Don't set meta `theme-color` by default (#24340) (#24346)

Backport #24340 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/24321. By not setting
this meta tag, Safari will use body color for chrome and out-of-viewport
areas, which looks much better then static mismatching green.

As per
[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color)
it's really only Apple browsers who still support this tag, most others
have dropped support.

Before:
<img width="347" alt="Screenshot 2023-04-25 at 19 59 13"
src="https://user-images.githubusercontent.com/115237/234363180-0fe667ef-5469-4f5f-b31a-c9d73aff10ac.png">

After:
<img width="361" alt="Screenshot 2023-04-25 at 20 00 00"
src="https://user-images.githubusercontent.com/115237/234363185-e2d2b62f-0133-4316-944d-b614ffb84eb0.png">

Co-authored-by: silverwind <me@silverwind.io>
18 months agoAdd --font-weight-bold and set previous bold to 601 (#24307) (#24331)
wxiaoguang [Tue, 25 Apr 2023 23:51:54 +0000 (07:51 +0800)]
Add --font-weight-bold and set previous bold to 601 (#24307) (#24331)

Backport #24307

Fix #24305

According to MDN, "bold" starts from 700, some fonts do not provide
"bolding" for weight 600

Manually backport, no CSS conflict.

18 months agoRespect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035) (...
Giteabot [Tue, 25 Apr 2023 19:25:08 +0000 (15:25 -0400)]
Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035) (#24333)

Backport #24035 by @garymoon

This change prevents Gitea from bypassing the manual approval process
for newly registered users when OIDC is used.

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

Signed-off-by: Gary Moon <gary@garymoon.net>
Co-authored-by: Gary Moon <garymoon@users.noreply.github.com>
18 months agoWrap too long push mirror addresses (#21120) (#24334)
Giteabot [Tue, 25 Apr 2023 16:47:26 +0000 (12:47 -0400)]
Wrap too long push mirror addresses (#21120) (#24334)

Backport #21120 by @JakobDev

I noticed that it is possible to break the push mirror list by entering
a too long URL. This should fix it.

| Before         | After     |
|--------------|-----------|

|![Before](https://user-images.githubusercontent.com/15185051/189294585-333965d1-0f0f-48e2-96d5-e04b84b55ae3.png)|![After](https://user-images.githubusercontent.com/15185051/189294619-301e271c-b89b-4bc0-9c11-9536bd0302be.png)|

Co-authored-by: JakobDev <jakobdev@gmx.de>
18 months agoFix typo in API route (#24310) (#24332)
Giteabot [Tue, 25 Apr 2023 14:57:33 +0000 (10:57 -0400)]
Fix typo in API route (#24310) (#24332)

Backport #24310 by @silverwind

Continuation of https://github.com/go-gitea/gitea/pull/23995

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bilogic <946010+bilogic@users.noreply.github.com>
19 months agoRemove org users who belong to no teams (#24247) (#24313)
Giteabot [Tue, 25 Apr 2023 02:50:32 +0000 (22:50 -0400)]
Remove org users who belong to no teams (#24247) (#24313)

Backport #24247 by @yp05327

Fix #24128

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
19 months agoUnify nightly naming across binaries and docker images (#24116) (#24308)
Giteabot [Mon, 24 Apr 2023 16:23:01 +0000 (12:23 -0400)]
Unify nightly naming across binaries and docker images (#24116) (#24308)

Backport #24116 by @techknowlogick

Proposal found here: https://github.com/go-gitea/gitea/issues/23654

TODO: make non-breaking (can we publish docker image using dev and
nightly prefix? at same time). if anyone has advice please comment :)

If this PR is merged, then I can add redirects to the downloads site.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
19 months agoUpgrade act (#24298) (#24300)
Giteabot [Mon, 24 Apr 2023 08:18:47 +0000 (04:18 -0400)]
Upgrade act  (#24298) (#24300)

Backport #24298 by @Zettat123

Upgrade act to version `v0.243.4`

- Support `configuration variables`
([#43](https://gitea.com/gitea/act/pulls/43))
- Support specifying command for `services` containers
([#50](https://gitea.com/gitea/act/pulls/50))

Co-authored-by: Zettat123 <zettat123@gmail.com>
19 months agoFix bug when deleting wiki with no code write permission (#24274) (#24295)
Giteabot [Mon, 24 Apr 2023 00:20:45 +0000 (20:20 -0400)]
Fix bug when deleting wiki with no code write permission (#24274) (#24295)

Backport #24274 by @lunny

Fix #24125

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
19 months agoHandle canceled workflow as a warning instead of a fail (#24282) (#24292)
Giteabot [Sun, 23 Apr 2023 19:44:45 +0000 (15:44 -0400)]
Handle canceled workflow as a warning instead of a fail (#24282) (#24292)

Backport #24282 by @wolfogre

Follow what Drone CI does:

![image](https://user-images.githubusercontent.com/9418365/233829853-d1c30a30-10cc-4b97-a134-793a79d46d85.png)

Co-authored-by: Jason Song <i@wolfogre.com>