Jason Song
223782ca4c
refactor: rename to actions
2022-12-06 15:16:25 +08:00
Jason Song
c07d0c1768
refactor: rename model
2022-12-06 13:48:09 +08:00
Jason Song
67c5c8868b
refactor: rename import alias
2022-12-05 15:57:45 +08:00
Jason Song
5f74b35377
refactor: rename files
2022-12-05 15:52:32 +08:00
Jason Song
704f72017d
refactor: rename packages
2022-12-05 15:45:38 +08:00
Jason Song
fdd3444c52
fix: add missing ctx
2022-12-05 14:46:34 +08:00
Jason Song
bd1af5b7f8
Merge branch 'main' into feature/bots
2022-12-05 14:31:00 +08:00
Lunny Xiao
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
Jason Song
b0d6c7b86e
chore: use SPDX-License-Identifier
2022-12-02 22:25:31 +08:00
Jason Song
76869e4b76
Merge branch 'main' into feature/bots
2022-12-02 22:17:49 +08:00
Jason Song
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
Jason Song
d2a4c10bc7
chore: code lint
2022-12-01 15:39:28 +08:00
Jason Song
3793d55eca
fix: commit status
2022-11-29 18:48:00 +08:00
Jason Song
564937a657
feat: bots_service.CreateCommitStatus
2022-11-29 18:21:27 +08:00
Jason Song
c1fce2cf7d
feat: remove bots resources after deleting repo
2022-11-29 16:25:58 +08:00
Jason Song
04d72d3500
refactor: rename tables to bot_*
2022-11-29 12:34:23 +08:00
Jason Song
797c21de1f
Merge branch 'main' into feature/bots
2022-11-29 11:09:20 +08:00
Jason Song
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
Jason Song
66b558017f
Merge branch 'main' into feature/bots
2022-11-28 17:23:53 +08:00
flynnnnnnnnnn
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
zeripath
f6fd501841
Correct the fallbacks for mailer configuration ( #21945 )
...
Unfortunately the fallback configuration code for [mailer] that were
added in #18982 are incorrect. When you read a value from an ini section
that key is added. This leads to a failure of the fallback mechanism.
Further there is also a spelling mistake in the startTLS configuration.
This PR restructures the mailer code to first map the deprecated
settings on to the new ones - and then use ini.MapTo to map those on to
the struct with additional validation as necessary.
Ref #21744
Signed-off-by: Andrew Thornton <art27@cantab.net >
2022-11-27 10:08:40 +00:00
Jason Song
dc48bf21c6
chore: add copyright
2022-11-26 21:33:05 +08:00
Jason Song
6ad8bddabf
feat: GetRunningTaskByToken
2022-11-25 17:48:48 +08:00
Lunny Xiao
45afa0ee9f
Support most github's sdk
2022-11-25 17:48:48 +08:00
Lunny Xiao
2ecb59c092
rename builds -> bots
2022-11-25 17:48:48 +08:00
Jason Song
736275f0b1
feat: support cancel button
2022-11-25 17:48:48 +08:00
Jason Song
5230c7a364
fix: remove debug log
2022-11-25 17:48:47 +08:00
Jason Song
dd417a3270
chore: move job emitter to service
2022-11-25 17:48:47 +08:00
Lunny Xiao
f57e6999a2
Remove unused file
2022-11-25 17:48:47 +08:00
Lunny Xiao
f4bbd534b9
Allow gitea bot as trigger user
2022-11-25 17:48:47 +08:00
Lunny Xiao
9a45572ce2
Support bot site
2022-11-25 17:48:47 +08:00
Jason Song
745be45e1b
chore: rename to Init
2022-11-25 17:48:47 +08:00
Jason Song
717344007a
chore: remove GetRunnerByToken
2022-11-25 17:48:47 +08:00
Lunny Xiao
aa09eb63e1
Support bot user
2022-11-25 17:48:47 +08:00
Lunny Xiao
f55253e81d
Support clone private repository in runner
2022-11-25 17:48:47 +08:00
Jason Song
cab3fc072a
fix: use updated to check abandoned jobs
2022-11-25 17:48:47 +08:00
Jason Song
0e74431229
feat: get task by token
2022-11-25 17:48:47 +08:00
Jason Song
cf40dca0c4
feat: record job needs
2022-11-25 17:48:46 +08:00
Jason Song
9da6b9f92d
feat: cancel abandoned jobs
2022-11-25 17:48:46 +08:00
Jason Song
705aaf3eb2
feat: stop zombie and endless tasks
2022-11-25 17:48:46 +08:00
Lunny Xiao
339ddf4c5f
Virtual user gitea-bots
2022-11-25 17:48:46 +08:00
Lunny Xiao
b8c7ea782c
Fix bug
2022-11-25 17:48:46 +08:00
Lunny Xiao
b5520f098f
Some improvements
2022-11-25 17:48:46 +08:00
Lunny Xiao
e7d5c99b42
Fix lint
2022-11-25 17:48:46 +08:00
Lunny Xiao
da981db596
finish adding and deleting secret for repository settting
2022-11-25 17:48:46 +08:00
Lunny Xiao
ab4f539453
add models and services
2022-11-25 17:48:46 +08:00
Lauris BH
4af45f7bc9
Add AES GCM encryption provider
2022-11-25 17:48:46 +08:00
Lauris BH
d4e84c0433
Add simple master key provider for secret encryption
2022-11-25 17:48:46 +08:00
fuxiaohei
25fe4f6d9e
feat(runner): make admin runner template as common template, use for org runners setting
2022-11-25 17:48:46 +08:00
Lunny Xiao
a5a112425b
Support clone private repository from runner
2022-11-25 17:48:45 +08:00