1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 13:28:25 +00:00
Commit Graph

3745 Commits

Author SHA1 Message Date
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
Jason Song
ef4b3673dd chore: golang lint 2022-11-26 22:12:52 +08:00
Jason Song
dc48bf21c6 chore: add copyright 2022-11-26 21:33:05 +08:00
Jason Song
0bd9553219 chore: golang lint 2022-11-26 20:14:03 +08:00
zeripath
d7f12af805 Prevent NPE if trying to restore an already restored deleted branch (#21940)
If a deleted-branch has already been restored, a request to restore it
again will cause a NPE. This PR adds detection for this case, but also
disables buttons when they're clicked in order to help prevent
accidental repeat requests.

Fix #21930

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-11-25 20:58:20 +00:00
Jason Song
378e1f8d01 chore: fix problems caused by rebase 2022-11-25 17:58:34 +08:00
Jason Song
295a7f68c8 feat: update job info 2022-11-25 17:48:48 +08:00
Jason Song
1886156329 chore: remove outdated todos 2022-11-25 17:48:48 +08:00
Jason Song
4814a6ad1b fix: fill more contexts 2022-11-25 17:48:48 +08:00
Lunny Xiao
324d6711da permission check 2022-11-25 17:48:48 +08:00
Jason Song
e346581344 chore: update grpc router path 2022-11-25 17:48:48 +08:00
Lunny Xiao
3e8de17db3 permission 2022-11-25 17:48:48 +08:00
Jason Song
ea1bc1b662 chore: replace with code.gitea.io/bots-proto-go 2022-11-25 17:48:48 +08:00
Lunny Xiao
2ecb59c092 rename builds -> bots 2022-11-25 17:48:48 +08:00
Lunny Xiao
c61ac24c1c Fix bug 2022-11-25 17:48:48 +08:00
Bo-Yi.Wu
5d849cea33 chore(runner): remove update runner status
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:48 +08:00
Jason Song
736275f0b1 feat: support cancel button 2022-11-25 17:48:48 +08:00
Bo-Yi Wu
797cdfbdb8 chore(runner): return task state. 2022-11-25 17:48:47 +08:00
Jason Song
0f5aab0c1a chore: remove Result from task and step 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
110072a8d4 Fix log 2022-11-25 17:48:47 +08:00
Lunny Xiao
9a45572ce2 Support bot site 2022-11-25 17:48:47 +08:00
Jason Song
7059cd7265 feat: update runner status 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
0682f0fcc5 chore: reduse log noise 2022-11-25 17:48:47 +08:00
Jason Song
140d57aecb feat: use runner token hash 2022-11-25 17:48:47 +08:00
Jason Song
94241daaaa feat: check runner token 2022-11-25 17:48:47 +08:00
Jason Song
9c6476754d chore: shouldn't import act_runner 2022-11-25 17:48:47 +08:00
Lunny Xiao
fc2c70033a Add default bot url 2022-11-25 17:48:47 +08:00
Jason Song
5d83ffa658 chore: log updating task 2022-11-25 17:48:47 +08:00
Jason Song
ce39e45cc2 chore: reduce log noise 2022-11-25 17:48:47 +08:00
Jason Song
a1ddfb8200 feat: use new FullSteps 2022-11-25 17:48:47 +08:00
Lunny Xiao
aa09eb63e1 Support bot user 2022-11-25 17:48:47 +08:00
Lunny Xiao
1ddf3b2d12 Support push via gitea bot 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
381d06729b fix: repository in context 2022-11-25 17:48:47 +08:00
fuxiaohei
e218b6f1d2 feat(runner-view): add pagination for jobs in runner details page 2022-11-25 17:48:47 +08:00
fuxiaohei
0c3f283a84 fix(runner-view): missing runner delete modal and routing 2022-11-25 17:48:47 +08:00
Jason Song
0b62e1da74 feat: rerun jobs 2022-11-25 17:48:47 +08:00
Bo-Yi.Wu
a20b8aa909 chore(runner): return cancel evnet after upload the log
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:47 +08:00
fuxiaohei
8c3ed11ed9 feat(runner-view): add task list in runnder details page, in admin 2022-11-25 17:48:47 +08:00
Jason Song
64eb15b73c fix: show block icon 2022-11-25 17:48:47 +08:00
Jason Song
dc7e64041a feat: use job emitter 2022-11-25 17:48:47 +08:00
Jason Song
b1da53286d feat: show step duration 2022-11-25 17:48:46 +08:00
Jason Song
b4b22e78ad feat: generate token for task 2022-11-25 17:48:46 +08:00