3462760632
Merge branch 'main' into feature/bots
2022-12-23 20:56:52 +08:00
71ca3067bc
Check primary keys for all tables and drop ForeignReference ( #21721 )
...
Some dbs require that all tables have primary keys, see
- #16802
- #21086
We can add a test to keep it from being broken again.
Edit:
~Added missing primary key for `ForeignReference`~ Dropped the
`ForeignReference` table to satisfy the check, so it closes #21086 .
More context can be found in comments.
Signed-off-by: Andrew Thornton <art27@cantab.net >
Co-authored-by: zeripath <art27@cantab.net >
2022-12-23 19:35:43 +08:00
255d778737
fix: last eight token
2022-12-23 13:18:49 +08:00
4782792604
Merge branch 'main' into feature/bots
2022-12-23 10:34:48 +08:00
a2779def36
Test views of LFS files ( #22196 )
2022-12-23 07:41:56 +08:00
9eafbada53
chore: reorganize locale of actions
2022-12-22 17:29:41 +08:00
aee01d139c
chore: remove FindObjects
2022-12-22 15:16:10 +08:00
34be6b5092
fix: remove old secret model
2022-12-22 15:07:04 +08:00
058675f7e5
fix: use new secrets
2022-12-22 14:44:22 +08:00
d183b32aa8
Merge branch 'main' into feature/bots
2022-12-22 12:00:41 +08:00
659055138b
Secrets storage with SecretKey encrypted ( #22142 )
...
Fork of #14483 , but [gave up
MasterKey](https://github.com/go-gitea/gitea/pull/14483#issuecomment-1350728557 ),
and fixed some problems.
Close #12065 .
Needed by #13539 .
Featrues:
- Secrets for repo and org, not user yet.
- Use SecretKey to encrypte/encrypt secrets.
- Trim spaces of secret value.
- Add a new locale ini block, to make it easy to support secrets for
user.
Snapshots:
Repo level secrets:

Rrg level secrets

Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2022-12-20 17:07:13 +08:00
b03f6e5b65
fix: remove meanless code
2022-12-19 18:32:38 +08:00
215d80f6b2
Update models/actions/run.go
...
Co-authored-by: a1012112796 <1012112796@qq.com >
2022-12-19 18:30:16 +08:00
ab98c3ff43
Merge branch 'main' into feature/bots
2022-12-19 18:26:28 +08:00
651fe4bb7d
Add doctor command for full GC of LFS ( #21978 )
...
The recent PR adding orphaned checks to the LFS storage is not
sufficient to completely GC LFS, as it is possible for LFSMetaObjects to
remain associated with repos but still need to be garbage collected.
Imagine a situation where a branch is uploaded containing LFS files but
that branch is later completely deleted. The LFSMetaObjects will remain
associated with the Repository but the Repository will no longer contain
any pointers to the object.
This PR adds a second doctor command to perform a full GC.
Signed-off-by: Andrew Thornton <art27@cantab.net >
2022-12-15 20:44:16 +00:00
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
6c622137f1
Merge branch 'main' into feature/bots
2022-12-13 09:50:18 +08:00
36a2d2f919
Add a simple test for external renderer ( #20033 )
...
Fix #16402
2022-12-12 20:45:21 +08:00
e69e829102
fix: remove ActionTask.GetRepo
2022-12-12 18:52:52 +08:00
1c9288f3dd
fix: list runners
2022-12-12 18:52:52 +08:00
cca23dd4af
feat: rename bot user to gitea-actions
2022-12-12 17:29:34 +08:00
4da0a65511
chore: migrations v236
2022-12-12 13:12:00 +08:00
86d6598a54
fix: use LONGBLOB
2022-12-12 13:08:49 +08:00
dfa1b6168d
Merge branch 'main' into feature/bots
2022-12-12 10:46:13 +08:00
0e2d04601a
Update xorm ( #22094 )
2022-12-10 18:53:32 -05:00
68704532c2
Rename almost all Ctx functions ( #22071 )
2022-12-10 10:46:31 +08:00
d378a78c79
Merge branch 'main' into feature/bots
2022-12-09 16:20:28 +08:00
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
266a122ba2
Merge branch 'main' into feature/bots
2022-12-08 18:11:18 +08:00
0585ac3ac6
Update go dev dependencies ( #22064 )
...
`golangci-lint`
[deprecated](https://github.com/golangci/golangci-lint/issues/1841 ) a
bunch of linters, removed them.
2022-12-08 16:21:37 +08:00
cf27403e18
Round language stats percentage using largest remainder ( #22026 )
...
Fix #22023
I've changed how the percentages for the language statistics are rounded
because they did not always add up to 100%
Now it's done with the largest remainder method, which makes sure that
total is 100%
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-12-08 10:47:47 +08:00
eaf266a635
chore: fix lint
2022-12-06 16:58:49 +08:00
ab0a60e56a
Merge branch 'main' into feature/bots
2022-12-06 16:39:06 +08:00
74874d065f
Fix issue/PR numbers ( #22037 )
...
When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.
Releated to #21557 .
Alse fixed two harmless problems:
- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.
2022-12-06 15:53:09 +08:00
223782ca4c
refactor: rename to actions
2022-12-06 15:16:25 +08:00
56368f3963
refactor: use ctx in models
2022-12-06 14:15:48 +08:00
c07d0c1768
refactor: rename model
2022-12-06 13:48:09 +08:00
f2c7bbb0bc
refactor: rename to actions-proto-go
2022-12-06 13:44:23 +08:00
704f72017d
refactor: rename packages
2022-12-05 15:45:38 +08:00
fdd3444c52
fix: add missing ctx
2022-12-05 14:46:34 +08:00
bd1af5b7f8
Merge branch 'main' into feature/bots
2022-12-05 14:31:00 +08:00
ea86c2b56a
Use GhostUser if needed for TrackedTimes ( #22021 )
...
When getting tracked times out of the db and loading their attributes
handle not exist errors in a nicer way. (Also prevent an NPE.)
Fix #22006
Signed-off-by: Andrew Thornton <art27@cantab.net >
2022-12-04 17:48:18 +00:00
0a7d3ff786
refactor some functions to support ctx as first parameter ( #21878 )
...
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-12-03 10:48:26 +08:00
b0d6c7b86e
chore: use SPDX-License-Identifier
2022-12-02 22:25:31 +08:00
76869e4b76
Merge branch 'main' into feature/bots
2022-12-02 22:17:49 +08:00
f59a74852b
Update gitea-vet to check FSFE REUSE ( #22004 )
...
Related to:
- #21840
- https://gitea.com/gitea/gitea-vet/pulls/21
What it looks like when it's working:
https://drone.gitea.io/go-gitea/gitea/64040/1/5
All available SPDX license identifiers: [SPDX License
List](https://spdx.org/licenses/ ).
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-12-02 22:14:57 +08:00
b9ab9b21c6
Merge branch 'go-gitea:main' into feature/bots
2022-12-02 13:28:14 +08:00
f7ade6de7c
Fix generate index failure possibility on postgres ( #21998 )
...
@wxiaoguang Please review
Co-authored-by: silverwind <me@silverwind.io >
2022-12-02 11:15:36 +08:00
c5c9b4ae57
Merge branch 'main' into feature/bots
2022-12-01 13:39:47 +08:00
b2c4870481
Fix parallel creating commit status bug with tests ( #21911 )
...
This PR is a follow up of #21469
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-12-01 00:41:49 +08:00