]> source.dussan.org Git - gitea.git/log
gitea.git
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>
19 months agoLoad reviewer for comments when dismissing a review (#24281) (#24288)
Giteabot [Sun, 23 Apr 2023 16:44:57 +0000 (12:44 -0400)]
Load reviewer for comments when dismissing a review (#24281) (#24288)

19 months agoOnly delete secrets belonging to its owner (#24284) (#24286)
Giteabot [Sun, 23 Apr 2023 14:36:20 +0000 (10:36 -0400)]
Only delete secrets belonging to its owner (#24284) (#24286)

Backport #24284 by @KN4CK3R

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
19 months agofix calReleaseNumCommitsBehind (#24148) (#24197)
oliverpool [Sat, 22 Apr 2023 16:30:24 +0000 (18:30 +0200)]
fix calReleaseNumCommitsBehind (#24148) (#24197)

Backport #24148

`repoCtx.CommitsCount` is not reliably the commit count of the default
branch (Repository.GetCommitsCount depends on what is currently
displayed).

_contributed in the context of @forgejo_

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
19 months agoFix footer display (#24251) (#24269)
wxiaoguang [Sat, 22 Apr 2023 08:21:56 +0000 (16:21 +0800)]
Fix footer display (#24251) (#24269)

Backport #24251

Fix #24249

Diff with ignoring spaces:
https://github.com/go-gitea/gitea/pull/24269/files?diff=split&w=1

Manually tested

![image](https://user-images.githubusercontent.com/2114189/233766806-18eb18ad-0c4d-44f7-b0fc-b40466c64445.png)

Co-authored-by: Lauris BH <lauris@nix.lv>
19 months agoFix owner team access mode value in team_unit table (#24224)
yp05327 [Sat, 22 Apr 2023 06:53:03 +0000 (15:53 +0900)]
Fix owner team access mode value in team_unit table (#24224)

Partly backport #23675

Co-authored-by: Giteabot <teabot@gitea.io>
19 months agoFix access token issue on some public endpoints (#24194) (#24259)
Giteabot [Fri, 21 Apr 2023 18:59:17 +0000 (14:59 -0400)]
Fix access token issue on some public endpoints (#24194) (#24259)

Backport #24194 by @harryzcy

- [x] Identify endpoints that should be public
- [x] Update integration tests

Fix #24159

Co-authored-by: harryzcy <harry@harryzheng.com>
19 months agoShow commit history for closed/merged PRs (#24238) (#24261)
Giteabot [Fri, 21 Apr 2023 18:15:00 +0000 (14:15 -0400)]
Show commit history for closed/merged PRs (#24238) (#24261)

Backport #24238 by @wxiaoguang

Close #24237

Before:

<details>

![image](https://user-images.githubusercontent.com/2114189/233424875-a69c6dad-df4a-483e-b796-36c6459af2d6.png)

</details>

After:

![image](https://user-images.githubusercontent.com/2114189/233424712-60a296de-017b-49a8-89b2-5925ff452646.png)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoFix label color, fix divider in dropdown (#24215) (#24244)
Giteabot [Fri, 21 Apr 2023 03:28:55 +0000 (23:28 -0400)]
Fix label color, fix divider in dropdown (#24215) (#24244)

Backport #24215 by @silverwind

Two small CSS fixes:

1. Fix basic primary label hover:

Before:
<img width="172" alt="Screenshot 2023-04-19 at 20 00 32"
src="https://user-images.githubusercontent.com/115237/233161903-eec2de54-1a58-44ac-a6ef-2d77157317f6.png">

After:
<img width="179" alt="Screenshot 2023-04-19 at 20 05 29"
src="https://user-images.githubusercontent.com/115237/233162028-995404ac-5852-4d03-821f-6eb4a918a9e3.png">

2. Fix border color of divider in dropdown and remove margin so it looks
better with hover effect, as discussed in
https://github.com/go-gitea/gitea/pull/24143:

<img width="205" alt="Screenshot 2023-04-19 at 20 03 24"
src="https://user-images.githubusercontent.com/115237/233162102-3f4a4142-9634-4c95-acf0-be57072ce7eb.png">
<img width="311" alt="Screenshot 2023-04-19 at 20 03 55"
src="https://user-images.githubusercontent.com/115237/233162109-faa616f6-02e4-43d3-95fa-66787a7f914c.png">

Co-authored-by: silverwind <me@silverwind.io>
19 months agoFix issue attachment handling (#24202) (#24221)
wxiaoguang [Thu, 20 Apr 2023 08:21:10 +0000 (16:21 +0800)]
Fix issue attachment handling (#24202) (#24221)

Backport #24202

Close #24195

Fix the bug:

1. The old code doesn't handle `removedfile` event correctly
2. The old code doesn't provide attachments for type=CommentTypeReview

---------

Co-authored-by: silverwind <me@silverwind.io>
19 months agoAdd run status in action view page (#24223)
yp05327 [Thu, 20 Apr 2023 07:24:50 +0000 (16:24 +0900)]
Add run status in action view page (#24223)

Backport #23212

19 months agoVertical widths of containers removed (#24184) (#24211)
Giteabot [Thu, 20 Apr 2023 01:02:38 +0000 (21:02 -0400)]
Vertical widths of containers removed (#24184) (#24211)

Backport #24184 by @krzysztofjeziorny

A vertical overflow appears in Firefox 112/MacOS 12.6 when the system
setting for scrollbars is to "Always" show them.

Here, the fixed 100vw container widths are removed, which removes the
overflow. It is, however, only simulated in Developer Tools in latest
Firefox and Chromium, so please test on a Gitea installation.

Co-authored-by: Krzysztof Jeziorny <872730+krzysztofjeziorny@users.noreply.github.com>
19 months agoDon't list root repository on compare page if pulls not allowed (#24183) (#24210)
Giteabot [Wed, 19 Apr 2023 23:07:47 +0000 (19:07 -0400)]
Don't list root repository on compare page if pulls not allowed (#24183) (#24210)

Backport #24183 by @lunny

Fix #24165

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoFix template error in pull request with deleted head repo (#24192) (#24216)
Giteabot [Wed, 19 Apr 2023 21:20:19 +0000 (17:20 -0400)]
Fix template error in pull request with deleted head repo (#24192) (#24216)

Backport #24192 by @brechtvl

Rendering of Allow Edits from Maintainers did not check if the head repo
exists, while other parts of the page handle it gracefully.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
19 months agoFix incorrect CORS default values (#24206) (#24217)
Giteabot [Wed, 19 Apr 2023 20:23:25 +0000 (16:23 -0400)]
Fix incorrect CORS default values (#24206) (#24217)

Backport #24206 by @wxiaoguang

Document:

```
;ALLOW_DOMAIN = *
;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
```

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoUse correct locale key for forks page (#24172) (#24175)
Giteabot [Mon, 17 Apr 2023 21:21:53 +0000 (17:21 -0400)]
Use correct locale key for forks page (#24172) (#24175)

Backport #24172 by @jolheiser

https://github.com/go-gitea/gitea/blob/4014200021a1997283c779a815fe9e5febf1fda1/options/locale/locale_en-US.ini#L873

https://github.com/go-gitea/gitea/blob/4014200021a1997283c779a815fe9e5febf1fda1/options/locale/locale_en-US.ini#L943

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
19 months agoFix Org edit page bugs: renaming detection, maxlength (#24161) (#24171)
Giteabot [Mon, 17 Apr 2023 16:20:47 +0000 (12:20 -0400)]
Fix Org edit page bugs: renaming detection, maxlength (#24161) (#24171)

Backport #24161 by @wxiaoguang

## Before

* The renaming detection is wrong (eg: pasting a new name into the input
doesn't trigger the detection)
* The renaming prompt layout is not good
* Some MaxSize/maxlength rules is missing

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoSupport converting varchar to nvarchar for mssql database (#24105) (#24168)
Giteabot [Mon, 17 Apr 2023 14:10:15 +0000 (10:10 -0400)]
Support converting varchar to nvarchar for mssql database (#24105) (#24168)

Backport #24105 by @lunny

In #12269, all string fields of struct will generate a NVARCHAR column
in database, but for those Gitea instances installed before that PR,
users have to convert columns themselves.

In this PR, we update the `./gitea admin convert` commands to support
both MySQL and MSSQL database converting. Previously, it only supported
converting `utf8 -> utf8mb4` for MySQL.
Now, it will check the database types.
If it's MSSQL, it will convert `VARCHAR -> NVARCHAR` as well.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoUse 1.18's aria role for dropdown menus (#24144) (#24155)
wxiaoguang [Mon, 17 Apr 2023 11:02:09 +0000 (19:02 +0800)]
Use 1.18's aria role for dropdown menus (#24144) (#24155)

Backport #24144

Co-authored-by: silverwind <me@silverwind.io>
19 months agoUpdate redis library to support redis v7 (#24114) (#24156)
Patrick Schratz [Mon, 17 Apr 2023 06:34:59 +0000 (08:34 +0200)]
Update redis library to support redis v7 (#24114) (#24156)

backports #24114

---------

Co-authored-by: techknowlogick <hello@techknowlogick.com>
19 months agoSort repo topic labels by name (#24123) (#24153)
wxiaoguang [Mon, 17 Apr 2023 01:00:19 +0000 (09:00 +0800)]
Sort repo topic labels by name (#24123) (#24153)

Backport #24123
Close #24077

Manually backported and tested.

<img width="330" alt="image"
src="https://user-images.githubusercontent.com/2114189/232283645-92cc85dd-ba16-44a9-a7ef-5712b9d285e9.png">

19 months agoSet EasyMDE heading font-size to the same size as the resulting markdown (#24151...
wxiaoguang [Sun, 16 Apr 2023 21:34:19 +0000 (05:34 +0800)]
Set EasyMDE heading font-size to the same size as the resulting markdown (#24151) (#24152)

Backport #24151

Fix #23816

<img width="519" alt="image"
src="https://user-images.githubusercontent.com/2114189/232283304-21f56e82-d80e-4199-9b14-74699d80cd20.png">

19 months agoFix 2-dot direct compare to use the right base commit (#24133) (#24150)
Giteabot [Sun, 16 Apr 2023 11:17:13 +0000 (07:17 -0400)]
Fix 2-dot direct compare to use the right base commit (#24133) (#24150)

Backport #24133 by @jtran

For 2-dot direct compare, we should use the base commit in the title and
templates, as is used elsewhere, not the common ancestor which is used
for 3-dot compare. I believe that this change should have been included
in #22949.

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
19 months agoHighlight selected file in the PR file tree (#23947) (#24126)
sillyguodong [Fri, 14 Apr 2023 09:54:22 +0000 (17:54 +0800)]
Highlight selected file in the PR file tree (#23947) (#24126)

backport #23947 by @yusifeng

before

![before](https://user-images.githubusercontent.com/36984894/230327904-6e712ca2-f777-4cad-99f3-53bc20008180.gif)

after

![after](https://user-images.githubusercontent.com/36984894/230327966-6e5dd971-f0df-427a-a80b-6a9b6db6065d.gif)

Co-authored-by: yusifeng <36984894+yusifeng@users.noreply.github.com>
19 months agoFix incorrect server error content in RunnersList (#24118) (#24121)
Giteabot [Fri, 14 Apr 2023 04:52:21 +0000 (00:52 -0400)]
Fix incorrect server error content in RunnersList (#24118) (#24121)

Backport #24118 by @yp05327

Co-authored-by: yp05327 <576951401@qq.com>
19 months agoFix mismatch between hook events and github event types (#24048) (#24091)
Zettat123 [Thu, 13 Apr 2023 07:19:41 +0000 (15:19 +0800)]
Fix mismatch between hook events and github event types (#24048) (#24091)

Backport https://github.com/go-gitea/gitea/pull/24048

Some workflow trigger events can have multiple activity types, such as
`issues` and `pull_request`, and user can specify which types can
trigger the workflow. See GitHub documentation:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows

Now some hook events cannot match the workflow trigger events correctly
because we don't check the activity types. For example,
`pull_request_label` is an individual hook event. But there isn't a
`pull_request_label` workflow trigger event, we can only use
`pull_request` event's `label` activity type. If we don't check the
activity types, the workflows without the `label` activity type may be
triggered by the `pull_request_label` event by mistake. We need to
improve the match logic.

- [x] [`issues`
](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues)
- [x]
[`issue_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment)
- [x]
[`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request)
- [x]
[`pull_request_review`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review)
- [x]
[`pull_request_review_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review_comment)
- [x]
[`release`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release)
- [x]
[`registry_package`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#registry_package)

19 months agoChangelog v1.19.1 (#24079) v1.19.1
6543 [Thu, 13 Apr 2023 01:38:06 +0000 (03:38 +0200)]
Changelog v1.19.1 (#24079)

19 months agoBackport locales to 1.19 (#24083)
wxiaoguang [Wed, 12 Apr 2023 21:07:43 +0000 (05:07 +0800)]
Backport locales to 1.19 (#24083)

Backport locales

Generated by `go run build/backport-locales.go release/v1.19`

19 months agoImprove LFS error logs (#24072) (#24082)
Giteabot [Wed, 12 Apr 2023 20:23:57 +0000 (16:23 -0400)]
Improve LFS error logs (#24072) (#24082)

Backport #24072 by @wxiaoguang

The error logs were not clear.

Help (but not fix) #24053

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoUpdate the value of the `diffEnd` when click `Show More` btn in the DiffFileTree...
Giteabot [Wed, 12 Apr 2023 19:27:53 +0000 (15:27 -0400)]
Update the value of the `diffEnd` when click `Show More` btn in the DiffFileTree (#24069) (#24078)

Backport #24069 by @sillyguodong

In the component `DiffFileTree`,if don't update the value of the
`diffEnd` in the callback of ajax request, click `Show More` btn will
always return the same response, duplicate files are appended to the
file list.

Before:

https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov

After:

https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>