d5e6d959eb
refactor: rename Number to Index
2023-01-04 18:52:22 +08:00
2c686e8826
fix: add restraints for models
2023-01-04 18:52:22 +08:00
53afbcecad
Merge branch 'main' into feature/bots
2023-01-03 09:43:23 +08:00
0f4e1b9ac6
Restructure webhook
module ( #22256 )
...
Previously, there was an `import services/webhooks` inside
`modules/notification/webhook`.
This import was removed (after fighting against many import cycles).
Additionally, `modules/notification/webhook` was moved to
`modules/webhook`,
and a few structs/constants were extracted from `models/webhooks` to
`modules/webhook`.
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2023-01-01 23:23:15 +08:00
a67e14d0ed
chore: fmt code
2022-12-23 21:09:58 +08:00
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
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
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