]> source.dussan.org Git - gitea.git/log
gitea.git
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>
19 months agoFix custom mailer template on Windows (#24081)
wxiaoguang [Wed, 12 Apr 2023 16:16:40 +0000 (00:16 +0800)]
Fix custom mailer template on Windows (#24081)

Fix #24075
Fix #23873

From the log:

```
2023/04/02 19:41:46 .../templates/mailer.go:68:1() [T] Adding mailer template for \issue\default from "C:\gitea\custom\templates\mail\issue\default.tmpl"
```

That `assetName ` on Windows is wrong. Gitea only uses slash `/`.

19 months agoMake label templates have consistent behavior and priority (#23749) (#24071)
wxiaoguang [Wed, 12 Apr 2023 14:05:10 +0000 (22:05 +0800)]
Make label templates have consistent behavior and priority (#23749) (#24071)

Backport #23749

Fix https://github.com/go-gitea/gitea/issues/23715

Backported manually and tested manually.

19 months agoAdd cardtype to org/user level project on creation, edit and view (#24043) (#24066)
Hester Gong [Wed, 12 Apr 2023 12:23:05 +0000 (20:23 +0800)]
Add cardtype to org/user level project on creation, edit and view (#24043) (#24066)

Backport #24043

Part of #23318

The way to fix the missing cardtype for user/org level projects in this
PR is to port the cardtype related part from #22112 to org/user level
projects' template and router functions.

Before:
<img width="1135" alt="截屏2023-04-11 13 55 49"
src="https://user-images.githubusercontent.com/17645053/231069068-ba897129-ae90-4aa0-9b0f-468bf5c65375.png">

<img width="1131" alt="截屏2023-04-11 13 55 59"
src="https://user-images.githubusercontent.com/17645053/231069084-279f6681-5a10-42da-b5a8-2b0ba47c7078.png">

After:
Create
<img width="835" alt="截屏2023-04-11 13 27 16"
src="https://user-images.githubusercontent.com/17645053/231064445-0d6e12bd-5725-48db-a102-80e7472757c2.png">

Edit
<img width="852" alt="截屏2023-04-11 13 27 05"
src="https://user-images.githubusercontent.com/17645053/231064503-c70525cd-1038-43ec-8d93-8b8d95d183d4.png">

View
<img width="1329" alt="截屏2023-04-11 13 26 56"
src="https://user-images.githubusercontent.com/17645053/231064529-26023c85-698b-4b2e-af02-45f9820c77ec.png">

---------

Co-authored-by: silverwind <me@silverwind.io>
19 months agoFix accidental overwriting of LDAP team memberships (#24050) (#24065)
Giteabot [Wed, 12 Apr 2023 11:22:02 +0000 (07:22 -0400)]
Fix accidental overwriting of LDAP team memberships (#24050) (#24065)

Backport #24050 by @sillyguodong

In the `for` loop, the value of `membershipsToAdd[org]` and
`membershipsToRemove[org]` is a slice that should be appended instead of
overwritten.
Due to the current overwrite, the LDAP group sync only matches the last
group at the moment.

## Example reproduction
- an LDAP user is both a member of
`cn=admin_staff,ou=people,dc=planetexpress,dc=com` and
`cn=ship_crew,ou=people,dc=planetexpress,dc=com`.
- configuration of `Map LDAP groups to Organization teams ` in
`Authentication Sources`:
```json
{
    "cn=admin_staff,ou=people,dc=planetexpress,dc=com":{
        "test_organization":[
            "admin_staff",
            "test_add"
        ]
    },
    "cn=ship_crew,ou=people,dc=planetexpress,dc=com":{
        "test_organization":[
            "ship_crew"
        ]
}
```
- start `Synchronize external user data` task in the `Dashboard`.
- the user was only added for the team `test_organization.ship_crew`

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
19 months ago Refactor commit status for Actions jobs (#23786) (#24060)
Denys Konovalov [Wed, 12 Apr 2023 02:37:34 +0000 (04:37 +0200)]
 Refactor commit status for Actions jobs (#23786)  (#24060)

Backport #23786

Refactor commit status for Actions jobs (#23786)

Highlights:
- Treat `StatusSkipped` as `CommitStatusSuccess` instead of
`CommitStatusFailure`, so it fixed #23599.
- Use the bot user `gitea-actions` instead of the trigger as the creator
of commit status.
- New format `<run_name> / <job_name> / (<event>)` for the context of
commit status to avoid conflicts.
- Add descriptions for commit status.
- Add the missing calls to `CreateCommitStatus`.
- Refactor `CreateCommitStatus` to make it easier to use.

Co-authored-by: Jason Song <i@wolfogre.com>
19 months agoFix branch protection priority (#24045) (#24061)
Giteabot [Tue, 11 Apr 2023 19:07:38 +0000 (15:07 -0400)]
Fix branch protection priority (#24045) (#24061)

Backport #24045 by @lunny

Fix #24044

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoUpdate documentation to explain which projects allow Gitea to host static pages ...
Giteabot [Tue, 11 Apr 2023 16:43:35 +0000 (12:43 -0400)]
Update documentation to explain which projects allow Gitea to host static pages (#23993) (#24058)

Backport #23993 by @6543

close  #23521

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoUse actions job link as commit status URL instead of run link (#24023) (#24032)
Jason Song [Mon, 10 Apr 2023 13:46:36 +0000 (21:46 +0800)]
Use actions job link as commit status URL instead of run link (#24023) (#24032)

Backport #24023.

A commit status is bound to a job, not a run.

19 months agoAdd actions support to package auth verification (#23729) (#24028)
Giteabot [Mon, 10 Apr 2023 08:36:21 +0000 (04:36 -0400)]
Add actions support to package auth verification (#23729) (#24028)

Backport #23729 by @yp05327

Partly fixes https://github.com/go-gitea/gitea/issues/23642

Error info:

![image](https://user-images.githubusercontent.com/18380374/227827027-4280a368-ec9e-49e0-bb93-6b496ada7cd9.png)
ActionsUser (userID -2) is used to login in to docker in action jobs.

Due to we have no permission policy settings of ActionsUser now,
ActionsUser can only access public registry by this quick fix.

Co-authored-by: yp05327 <576951401@qq.com>
19 months agoFix protected branch for API (#24013) (#24027)
Giteabot [Mon, 10 Apr 2023 06:48:02 +0000 (02:48 -0400)]
Fix protected branch for API (#24013) (#24027)

Backport #24013 by @lunny

Fix #23998

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoShow errors for KaTeX and mermaid on the preview tab (#24009) (#24019)
Giteabot [Sun, 9 Apr 2023 12:48:28 +0000 (08:48 -0400)]
Show errors for KaTeX and mermaid on the preview tab (#24009) (#24019)

Backport #24009 by @silverwind

There is a conflicting fomantic rule that hid the error messages inside
the markdown preview tab for things like mermaid or katex. Overruled it
to always show these errors.

<img width="774" alt="image"
src="https://user-images.githubusercontent.com/115237/230738528-322814c1-8994-495e-b901-bbb79b924ccb.png">

Co-authored-by: silverwind <me@silverwind.io>
19 months agoShow protected branch rule names again (#23907) (#24018)
Giteabot [Sun, 9 Apr 2023 12:06:16 +0000 (08:06 -0400)]
Show protected branch rule names again (#23907) (#24018)

Backport #23907 by @HesterG

`!important`s for one of the primary label selectors are removed by
#23774, so the repository branch protection settings ui will not have
the demanding css. This PR modifies `.ui.primary.label` to fix it.

Before:
<img width="1408" alt="飞书20230404-115410"
src="https://user-images.githubusercontent.com/17645053/229683221-ef9c7d5c-68a8-42b0-ba19-ef2d5dfce5f9.png">

After:
<img width="1419" alt="截屏2023-04-04 11 56 32"
src="https://user-images.githubusercontent.com/17645053/229683469-70cfc92d-d7ef-4323-a7f5-2247810fabce.png">

Co-authored-by: Hester Gong <hestergong@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agofix: do not escape space between PyPI repository url and package name… (#23981) ...
Giteabot [Sat, 8 Apr 2023 21:13:43 +0000 (17:13 -0400)]
fix: do not escape space between PyPI repository url and package name… (#23981) (#24008)

Backport #23981 by @Gunzinger

…; add trailing slash to PyPI repository URL (in accordance to PEP-503)

This should solve Issue #23980, by moving the space in front of the
package name and the package name out of the `gitea-origin-url` block.
It also adds a trailing slash to the PyPI repository URL in accordance
to [Python PEP-503](https://peps.python.org/pep-0503/).

Co-authored-by: Daniel Gunzinger <daniel.gunzinger@gmail.com>
19 months agoAdjust sticky pr header to cover background (#23956) (#23999)
Giteabot [Sat, 8 Apr 2023 16:36:11 +0000 (12:36 -0400)]
Adjust sticky pr header to cover background (#23956) (#23999)

Backport #23956 by @silverwind

Very minor CSS tweak: Adjust sticky PR header to cover the box-shadow of
selected files.

Before:
<img width="1250" alt="Screenshot 2023-04-06 at 22 54 59"
src="https://user-images.githubusercontent.com/115237/230492218-4d71da48-a362-4c52-a7f7-01daf4ffa458.png">

After:
<img width="1255" alt="Screenshot 2023-04-06 at 22 54 46"
src="https://user-images.githubusercontent.com/115237/230492227-c7142210-e535-4da8-b610-37d33dcbb549.png">

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoSet `ref` to fully-formed of the tag when trigger event is `release` (#23944) (#23989)
Giteabot [Sat, 8 Apr 2023 12:43:46 +0000 (08:43 -0400)]
Set `ref` to fully-formed of the tag when trigger event is `release` (#23944) (#23989)

Backport #23944 by @sillyguodong

Fix #23943
When trigger event is `release`, ref should be like
`refs/tags/<tag_name>` instead of `CommitID`

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
19 months agoFix redirect bug when creating issue from a project (#23971) (#23997)
Giteabot [Sat, 8 Apr 2023 10:38:56 +0000 (06:38 -0400)]
Fix redirect bug when creating issue from a project (#23971) (#23997)

Backport #23971 by @lunny

Fix #23966

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 months agoRemove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter...
Giteabot [Sat, 8 Apr 2023 08:16:21 +0000 (04:16 -0400)]
Remove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter (#23920) (#23969)

Backport #23920 by @ChristopherHX

Remove the misbehaving function and call
Repository.GetFilesChangedBetween instead.

Fixes #23919

---

~~_TODO_ test this~~ `Repository.getFilesChanged` seems to be only used
by Gitea Actions, but a similar function already exists

**Update** I tested this change and the issue is gone.

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
19 months agoDiscolor pull request tab labels (#23950) (#23987)
Giteabot [Sat, 8 Apr 2023 02:32:42 +0000 (22:32 -0400)]
Discolor pull request tab labels (#23950) (#23987)

Backport #23950 by @silverwind

https://github.com/go-gitea/gitea/pull/22687 has discolored the repo tab
labels. This does the same for PR tabs for consistency. Value `0` is
still rendered like before.

Before:
<img width="502" alt="Screenshot 2023-04-06 at 19 35 24"
src="https://user-images.githubusercontent.com/115237/230454329-db6244ff-7d7e-4a2f-9240-f618a1c57f8c.png">

After:
<img width="497" alt="Screenshot 2023-04-06 at 19 35 07"
src="https://user-images.githubusercontent.com/115237/230454321-a0be6551-8c31-45e4-a1fb-ffc0d85d87bf.png">
<img width="497" alt="Screenshot 2023-04-06 at 19 38 37"
src="https://user-images.githubusercontent.com/115237/230454570-2fe2aa67-dfa7-4b2e-8c04-8dd40e6e99fc.png">

Co-authored-by: silverwind <me@silverwind.io>
19 months agoTreat PRs with agit flow as fork PRs when triggering actions. (#23884) (#23967)
Jason Song [Fri, 7 Apr 2023 21:43:12 +0000 (05:43 +0800)]
Treat PRs with agit flow as fork PRs when triggering actions. (#23884) (#23967)

Backport #23884.

There is no fork concept in agit flow, anyone with read permission can
push `refs/for/<target-branch>/<topic-branch>` to the repo. So we should
treat it as a fork pull request because it may be from an untrusted
user.

19 months agoUse Get/Set instead of Rename when Regenerate session id (#23975) (#23983)
Giteabot [Fri, 7 Apr 2023 19:21:20 +0000 (15:21 -0400)]
Use Get/Set instead of Rename when Regenerate session id (#23975) (#23983)

Backport #23975 by @wxiaoguang

Do not use Rename here, because the old sid and new sid may be in
different redis cluster slot.

Fix #23869

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 months agoDo not crash when parsing an invalid workflow file (#23972) (#23976)
Giteabot [Fri, 7 Apr 2023 13:55:59 +0000 (09:55 -0400)]
Do not crash when parsing an invalid workflow file  (#23972) (#23976)

Backport #23972 by @wolfogre

Fix #23658.

Related to https://gitea.com/gitea/act/pulls/39

Co-authored-by: Jason Song <i@wolfogre.com>
19 months agoEnsure RSS icon is present on all repo tabs (#23904) (#23973)
Giteabot [Fri, 7 Apr 2023 12:55:30 +0000 (08:55 -0400)]
Ensure RSS icon is present on all repo tabs (#23904) (#23973)

Backport #23904 by @silverwind

Previously, not all repo tabs had shown the RSS icon in the repo header
because the context data was not being set. Added this context data in a
new function.

Before:

<img width="806" alt="image"
src="https://user-images.githubusercontent.com/115237/229639615-9cc00e75-3a26-4ff4-a6f2-316c1fccc596.png">

After:

<img width="815" alt="Screenshot 2023-04-04 at 00 16 17"
src="https://user-images.githubusercontent.com/115237/229639201-2e1c015b-1f13-46d4-aa14-e7a82fab3982.png">

Co-authored-by: silverwind <me@silverwind.io>
19 months agoHardcode path to docker images (#23955) (#23968)
Giteabot [Fri, 7 Apr 2023 12:54:28 +0000 (08:54 -0400)]
Hardcode path to docker images (#23955) (#23968)

Backport #23955 by @techknowlogick

Fix #23954

This allows for building on platforms that don't have docker hub as the
default container registry.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
19 months agoTitle can be empty when creating tag only (#23917) (#23961)
Giteabot [Fri, 7 Apr 2023 12:13:57 +0000 (08:13 -0400)]
Title can be empty when creating tag only (#23917) (#23961)

Backport #23917 by @Zettat123

Fixes #23809

Make the title not required. If the title is empty when creating release
(not tag), an error message will be displayed.

![image](https://user-images.githubusercontent.com/15528715/229761056-c52e338b-5f25-4d7d-bb44-2cb0304abcee.png)

Co-authored-by: Zettat123 <zettat123@gmail.com>
19 months agoSupport "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874...
6543 [Fri, 7 Apr 2023 10:10:17 +0000 (12:10 +0200)]
Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) (#23878)

Backport #23874