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
4da0a65511
chore: migrations v236
2022-12-12 13:12:00 +08:00
86d6598a54
fix: use LONGBLOB
2022-12-12 13:08:49 +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
223782ca4c
refactor: rename to actions
2022-12-06 15:16:25 +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
8f2efdaf60
chore: add dbfs to migration
2022-11-29 17:19:26 +08:00
c1fce2cf7d
feat: remove bots resources after deleting repo
2022-11-29 16:25:58 +08:00
04d72d3500
refactor: rename tables to bot_*
2022-11-29 12:34:23 +08:00
797c21de1f
Merge branch 'main' into feature/bots
2022-11-29 11:09:20 +08:00
9607750b5e
Replace fmt.Sprintf with hex.EncodeToString ( #21960 )
...
`hex.EncodeToString` has better performance than `fmt.Sprintf("%x",
[]byte)`, we should use it as much as possible.
I'm not an extreme fan of performance, so I think there are some
exceptions:
- `fmt.Sprintf("%x", func(...)[N]byte())`
- We can't slice the function return value directly, and it's not worth
adding lines.
```diff
func A()[20]byte { ... }
- a := fmt.Sprintf("%x", A())
- a := hex.EncodeToString(A()[:]) // invalid
+ tmp := A()
+ a := hex.EncodeToString(tmp[:])
```
- `fmt.Sprintf("%X", []byte)`
- `strings.ToUpper(hex.EncodeToString(bytes))` has even worse
performance.
2022-11-28 11:19:18 +00:00
66b558017f
Merge branch 'main' into feature/bots
2022-11-28 17:23:53 +08:00
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2022-11-27 18:20:29 +00:00
ef4b3673dd
chore: golang lint
2022-11-26 22:12:52 +08:00
378e1f8d01
chore: fix problems caused by rebase
2022-11-25 17:58:34 +08:00
fdd3c0434e
feat: add IsForkPullRequest
2022-11-25 17:48:48 +08:00
6ad8bddabf
feat: GetRunningTaskByToken
2022-11-25 17:48:48 +08:00
0f5aab0c1a
chore: remove Result from task and step
2022-11-25 17:48:47 +08:00
7059cd7265
feat: update runner status
2022-11-25 17:48:47 +08:00
7b2f1f5a91
chore: fix token format
2022-11-25 17:48:47 +08:00
e19f2c8c44
chore: add ids to task
2022-11-25 17:48:47 +08:00
5e7adf2004
chore: add extra fields to Run and RunJob
2022-11-25 17:48:47 +08:00
cab3fc072a
fix: use updated to check abandoned jobs
2022-11-25 17:48:47 +08:00
cf40dca0c4
feat: record job needs
2022-11-25 17:48:46 +08:00
964f67e189
chore: remove unique index of runner name
2022-11-25 17:48:46 +08:00
b5520f098f
Some improvements
2022-11-25 17:48:46 +08:00
e7d5c99b42
Fix lint
2022-11-25 17:48:46 +08:00
e43e3f9518
improve UI
2022-11-25 17:48:46 +08:00
feab4b1601
feat: update task status
2022-11-25 17:48:45 +08:00
a8f74d4ec8
fix: make run index group by repo id only
2022-11-25 17:48:45 +08:00
8dbe30dff9
feat: tranfer log to storage
2022-11-25 17:48:45 +08:00
dd5b2c5dfd
feat: optimize log indexes
2022-11-25 17:48:45 +08:00
f75a4abc5d
build UI
2022-11-25 17:48:45 +08:00
482832da76
delete unused structs
2022-11-25 17:48:45 +08:00
5f0cb6b9e5
fix merge
2022-11-25 17:48:44 +08:00
a1bd3a8932
Fix build
2022-11-25 17:48:43 +08:00
2c4f6fd42f
add most tables
2022-11-25 17:48:43 +08:00
5a479bb034
Add builds UI
2022-11-25 17:48:43 +08:00
7732392a96
Add bots
2022-11-25 17:48:33 +08:00
702f4b521e
Add index for access_token ( #21908 )
...
The `token_last_eight` field has been used in `GetAccessTokenBySHA `:
2022-11-23 20:49:41 -06:00
4c00d8f916
Move migration test fixtures to the correct directories ( #21901 )
...
Unfortunately #21549 changed the name of Testcases without changing
their associated fixture directories.
Fix #21854
Signed-off-by: Andrew Thornton <art27@cantab.net >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-11-23 18:24:55 +08:00
32db62515f
Add package registry cleanup rules ( #21658 )
...
Fixes #20514
Fixes #20766
Fixes #20631
This PR adds Cleanup Rules for the package registry. This allows to
delete unneeded packages automatically. Cleanup rules can be set up from
the user or org settings.
Please have a look at the documentation because I'm not a native english
speaker.
Rule Form

Rule List

Rule Preview

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-11-20 16:08:38 +02:00
92525ddffd
Init git module before database migration ( #21764 )
...
Close #21761
Some database migrations depend on the git module.
2022-11-10 14:22:39 +00:00
91c7a3e66f
Fix tests on migrations ( #21705 )
2022-11-08 12:07:46 +08:00