1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-27 04:38:36 +00:00
Commit Graph

14688 Commits

Author SHA1 Message Date
zeripath
cdc43454a4 Correctly handle moved files in apply patch (#22118)
Moved files in a patch will result in git apply returning:

```
error: {filename}: No such file or directory
```

This wasn't handled by the git apply patch code. This PR adds handling
for this.

Fix #22083

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-14 21:45:33 +08:00
Lunny Xiao
1b32ed014a remove duplicated read file code (#22042)
Merge the duplicated read file code as one function in reading text file
and readme file.
2022-12-14 18:11:11 +08:00
KN4CK3R
07461e18d3 Fix condition for is_internal (#22095)
depends on #22094

Fixes https://codeberg.org/forgejo/forgejo/issues/77

The old logic did not consider `is_internal`.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-14 17:16:01 +08:00
zeripath
4fb2006ca1 Make gitea work using cmd.exe again (#22073)
Gitea will attempt to lookup its location using LookPath however, this
fails on cmd.exe if gitea is in the current working directory.

exec.LookPath will return an exec.ErrDot error which we can test for and
then simply using filepath.Abs(os.Args[0]) to absolute gitea against the
current working directory.

Fix #22063

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-14 01:15:11 -05:00
Yakov5776
5aa854693f Fix markdown typo of an extra backtick in docs (#22123)
Fixes a visual bug in docs which is caused by a typo of an extra backtick.
2022-12-13 18:20:36 -06:00
Chongyi Zheng
a95247b7df Fix autofilled text visibility in dark mode (#22088)
Fixes #22087
2022-12-13 19:06:23 +08:00
Jason Song
6c622137f1 Merge branch 'main' into feature/bots 2022-12-13 09:50:18 +08:00
Lunny Xiao
87c64f655a Fix permission check on issue/pull lock (#22110)
Fix #21826
2022-12-12 23:02:51 +08:00
Lunny Xiao
36a2d2f919 Add a simple test for external renderer (#20033)
Fix #16402
2022-12-12 20:45:21 +08:00
Jason Song
4f7597b74d chore: mod tidy 2022-12-12 19:01:40 +08:00
Jason Song
ef20a02af0 fix: use web.Bind 2022-12-12 18:55:23 +08:00
Jason Song
d73db88e77 fix: use right class 2022-12-12 18:52:52 +08:00
Jason Song
e69e829102 fix: remove ActionTask.GetRepo 2022-12-12 18:52:52 +08:00
Jason Song
1c9288f3dd fix: list runners 2022-12-12 18:52:52 +08:00
Jason Song
cc19ab5ced Merge branch 'main' into feature/bots 2022-12-12 17:29:51 +08:00
Jason Song
d4c47acff4 fix: remove useless grpc routers 2022-12-12 17:29:34 +08:00
Jason Song
cca23dd4af feat: rename bot user to gitea-actions 2022-12-12 17:29:34 +08:00
Jason Song
5cfc48c288 fix: template format 2022-12-12 17:29:34 +08:00
Jason Song
d41fb40fb5 docs: comment for V1AlphaRoute 2022-12-12 17:29:34 +08:00
Lunny Xiao
6398ca745a refactor bind functions based on generics (#22055) 2022-12-12 16:09:26 +08:00
Lunny Xiao
705fbb46d5 Fix permission check on http push 2022-12-12 14:52:00 +08:00
Jason Song
59c3707da2 Merge branch 'main' into feature/bots 2022-12-12 13:33:24 +08:00
Lunny Xiao
003b4e209c Allow disable code tab (#20805)
I know some users created a repository in an organization but just use
issues and projects to handle the whole organizations issues. So that
`Code` could be disabled per repository.

<img width="1148" alt="image"
src="https://user-images.githubusercontent.com/81045/184792075-346cb508-b620-4adb-bc9a-cba76fdcb294.png">

It could also become a wiki repository.

<img width="1173" alt="image"
src="https://user-images.githubusercontent.com/81045/184792324-e15c6f68-35c0-4105-ab77-83585ce53672.png">

Co-authored-by: delvh <dev.lh@web.de>
2022-12-12 13:29:27 +08:00
Jason Song
a6e39ca180 Merge branch 'main' into feature/bots 2022-12-12 13:12:58 +08:00
Jason Song
4da0a65511 chore: migrations v236 2022-12-12 13:12:00 +08:00
Jason Song
dbdfd2647c chore: rename to workflows.go 2022-12-12 13:09:17 +08:00
Jason Song
86d6598a54 fix: use LONGBLOB 2022-12-12 13:08:49 +08:00
Jason Song
7a34d37aad fix: use ctx 2022-12-12 11:05:22 +08:00
Lunny Xiao
3e8285b824 Use multi reader instead to concat strings (#22099)
extract from #20326
2022-12-12 11:03:54 +08:00
Jason Song
dbef504584 fix: truncated title 2022-12-12 10:54:28 +08:00
Jason Song
22203eeb38 Update modules/notification/actions/helper.go
Co-authored-by: a1012112796 <1012112796@qq.com>
2022-12-12 10:48:32 +08:00
Jason Song
dfa1b6168d Merge branch 'main' into feature/bots 2022-12-12 10:46:13 +08:00
aceArt-GmbH
352a50d65f Fix sorting admin user list by last login (#22081)
Admin User Account list sort

`updated_unix` is not the same as "Last Sign-In"
2022-12-11 18:00:17 -06:00
Lunny Xiao
c9ef03af65 Fix wrong default value for update checker on app.example.ini (#22084) 2022-12-11 16:08:01 -06:00
Restray
112e425f90 fix(config): remove context on config template (#22096)
👋 Hey
I'm new around here, so I may have done some mistakes, sorry! 

---

## Context
On a fresh Gitea install, when I go to the [config admin
page](http://localhost:3000/admin/config) I had a 500 error page.
The logs:
```
2022/12/10 20:08:47 ...s/context/context.go:232:HTML() [E] [6394d93f] Render failed: template: admin/config:180:22: executing "admin/config" at <.Service.DefaultAllowOnlyContributorsToTrackTime>: DefaultAllowOnlyContributorsToTrackTime has arguments but cannot be invoked as function
2022/12/10 20:08:47 [6394d93f] router: completed GET /admin/config for [::1]:43800, 500 Internal Server Error in 5.1ms @ admin/config.go:99(admin.Config)
```

## The fix

I removed the `$.Context` on the
`.Service.DefaultAllowOnlyContributorsToTrackTime` to fix the 500 error
page happening. It could be a mistake, and I don't fully understand what
I've done!

Signed-off-by: Restray <contact@restray.org>
2022-12-11 12:06:12 +08:00
KN4CK3R
601d126627 [skip ci] Updated licenses and gitignores 2022-12-11 00:19:34 +00:00
KN4CK3R
0e2d04601a Update xorm (#22094) 2022-12-10 18:53:32 -05:00
Yarden Shoham
9745c33e9e Remove unnecessary whitespace in snapcraft.yaml (#22090)
Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
2022-12-10 08:31:16 -06:00
Lunny Xiao
68704532c2 Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00
Felipe Leopoldo Sologuren Gutiérrez
097d4e30b1 Change ID pattern of raw content container for issue (#21966)
Implement differentiation to html id for issue raw content container.

Fixes #21965
2022-12-10 00:25:32 +08:00
Jason Song
2779d47ad3 Optimize html templates (#22080)
Replace `active{{end}} item` with `active{{end}} item`.
2022-12-09 21:34:51 +08:00
Jason Song
d378a78c79 Merge branch 'main' into feature/bots 2022-12-09 16:20:28 +08:00
Jason Song
901914e34b feat: move summary to header 2022-12-09 16:14:45 +08:00
Jason Song
9b6b848311 fix: layout 2022-12-09 15:47:58 +08:00
Jason Song
10ebbeca2f chore: rename to action 2022-12-09 15:29:26 +08:00
KN4CK3R
3c59d31bc6 Add API management for issue/pull and comment attachments (#21783)
Close #14601
Fix #3690

Revive of #14601.
Updated to current code, cleanup and added more read/write checks.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andre Bruch <ab@andrebruch.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-12-09 14:35:56 +08:00
Jason Song
8fb1e53ca2 Rename actions to operations on UI (#22067)
Use "operations" to indicate "some something can be done", to prevent
users from confusing it with CICD.

Releated to: #13539.

Snapshots:

<img width="389" alt="image"
src="https://user-images.githubusercontent.com/9418365/206409797-a99bac25-2d38-4066-b9ab-27a4f6fe67e7.png">
<img width="398" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410099-bbd258a9-54d9-4664-8d95-31d29cb35209.png">
<img width="442" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410218-009a3103-a9b9-4d0c-86b6-540dda5bce89.png">

I'm not a native English speaker, but I think "operations" may be good
enough, and Gitea already uses this word:

<img width="1440" alt="image"
src="https://user-images.githubusercontent.com/9418365/206410671-4a718b14-0603-40cb-bdcb-f6f84d1f5e24.png">
2022-12-08 21:14:09 +08:00
Jason Song
266a122ba2 Merge branch 'main' into feature/bots 2022-12-08 18:11:18 +08:00
Jason Song
49143952fa fix: remove timestamp 2022-12-08 18:08:17 +08:00
Jason Song
3dc7ffc925 fix: add settings.actions_desc 2022-12-08 17:41:25 +08:00