Jason Song
9808d084ba
fix: remove useless codes
2022-11-30 16:07:00 +08:00
Jason Song
26ac9ab57d
Merge branch 'go-gitea:main' into feature/bots
2022-11-30 16:05:24 +08:00
Jason Song
3682fc3883
Merge branch 'main' into feature/bots
2022-11-29 18:50:02 +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
8f2efdaf60
chore: add dbfs to migration
2022-11-29 17:19:26 +08:00
Jason Song
c1fce2cf7d
feat: remove bots resources after deleting repo
2022-11-29 16:25:58 +08:00
Jason Song
e33d4d7700
fix: rename table name string
2022-11-29 13:47:09 +08:00
Jason Song
04d72d3500
refactor: rename tables to bot_*
2022-11-29 12:34:23 +08:00
Jason Song
3ac6bf3db4
fix: avoid hash uuid
2022-11-29 11:42:03 +08:00
Jason Song
797c21de1f
Merge branch 'main' into feature/bots
2022-11-29 11:09:20 +08:00
Jason Song
f047ee0a40
Use random bytes to generate access token ( #21959 )
2022-11-28 23:37:42 +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
6f5c3feb2d
fix: register bots notifier when enabled only
2022-11-28 18:24:09 +08:00
Jason Song
e37b3911d8
fix: use ref in options
2022-11-28 18:21:49 +08:00
Jason Song
66b558017f
Merge branch 'main' into feature/bots
2022-11-28 17:23:53 +08:00
Jason Song
dccddd045e
test: init bot storage path
2022-11-28 17:19:15 +08:00
Jason Song
0c1d568e1d
chore: fix mods
2022-11-28 15:08:02 +08:00
Jason Song
e1c1d36234
fix: remove http2 support
2022-11-28 14:52:23 +08:00
Jason Song
ae018b6b48
fix: use PutVarint instead of AppendVarint
2022-11-26 22:41:03 +08:00
Jason Song
ef4b3673dd
chore: golang lint
2022-11-26 22:12:52 +08:00
Jason Song
bfe0fc1533
chore: replace spaces
2022-11-26 21:42:02 +08:00
Jason Song
dc48bf21c6
chore: add copyright
2022-11-26 21:33:05 +08:00
Jason Song
7854178da4
chore: fix duplicate to satisfy
2022-11-26 20:51:45 +08:00
Jason Song
0bd9553219
chore: golang lint
2022-11-26 20:14:03 +08:00
Jason Song
3b119f3d78
chore: npm install --package-lock-only
2022-11-25 22:27:34 +08:00
Jason Song
6af809d0bd
chore: lint front
2022-11-25 22:27:34 +08:00
Jason Song
02fac6b5f0
Merge branch 'main' into feature/bots
2022-11-25 18:20:31 +08: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
Jason Song
fdd3c0434e
feat: add IsForkPullRequest
2022-11-25 17:48:48 +08:00
Jason Song
6ad8bddabf
feat: GetRunningTaskByToken
2022-11-25 17:48:48 +08:00
Jason Song
e346581344
chore: update grpc router path
2022-11-25 17:48:48 +08:00
Jason Song
48f5c152b9
chore: mod tidy
2022-11-25 17:48:48 +08:00
Jason Song
96d9b729ee
chore: upgrade act
2022-11-25 17:48:48 +08:00
Jason Song
d17a0b13f1
chore: use bots-proto-go v0.1.0
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
Jason Song
736275f0b1
feat: support cancel button
2022-11-25 17:48:48 +08:00
Jason Song
f3a9a25682
fix: remove build view header
2022-11-25 17:48:47 +08:00
Jason Song
5230c7a364
fix: remove debug log
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
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
9b021500b0
feat: ignore bots events of repo with disabled builds
2022-11-25 17:48:47 +08:00
Jason Song
717344007a
chore: remove GetRunnerByToken
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
7b2f1f5a91
chore: fix token format
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
Jason Song
1a55d39adc
fix: ignore ErrAlreadyInQueue
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
Jason Song
e19f2c8c44
chore: add ids to task
2022-11-25 17:48:47 +08:00
Jason Song
381d06729b
fix: repository in context
2022-11-25 17:48:47 +08:00
Jason Song
706aed2ba6
fix: update color of rerun button
2022-11-25 17:48:47 +08:00
Jason Song
5e7adf2004
chore: add extra fields to Run and RunJob
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
0b62e1da74
feat: rerun jobs
2022-11-25 17:48:47 +08:00
Jason Song
8a8214113b
fix: use subtle compare
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
64eb15b73c
fix: show block icon
2022-11-25 17:48:47 +08:00
Jason Song
465c348922
fix: show blocked jobs
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
cf40dca0c4
feat: record job needs
2022-11-25 17:48:46 +08:00
Jason Song
234cdc67e1
fix: run's status should failure with canceled jobs
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
83bb244a2c
fix: update step status when stoping
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
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
Jason Song
30df383ca0
feat: fix Ln number
2022-11-25 17:48:46 +08:00
Jason Song
3c7fce0d37
fix: distribute log files to folders
2022-11-25 17:48:46 +08:00
Jason Song
e28c95ea5c
feat: load secrets in task response
2022-11-25 17:48:46 +08:00
Jason Song
964f67e189
chore: remove unique index of runner name
2022-11-25 17:48:46 +08:00
Jason Song
04634b9143
feat: pick jobs of the runner only
2022-11-25 17:48:46 +08:00
Jason Song
ec673c0e79
fix: avoid assigning job to multiple runners
2022-11-25 17:48:46 +08:00
Jason Song
9647989d99
fix: update nums when update runs
2022-11-25 17:48:46 +08:00
Jason Song
6531738b2e
fix: builds UI
2022-11-25 17:48:46 +08:00
Jason Song
dee4f2470b
feat: inner build view UI
2022-11-25 17:48:46 +08:00
Jason Song
d6e100f6be
fix: update run status
2022-11-25 17:48:46 +08:00
Jason Song
3d4d44dadf
fix: use index of run
2022-11-25 17:48:46 +08:00
Jason Song
9292e9ebdb
fix: add methods of status
2022-11-25 17:48:46 +08:00
Jason Song
dca2ca2f47
fix: remove usage of core
2022-11-25 17:48:46 +08:00
Jason Song
6cdbf3e986
fix: use new Status
2022-11-25 17:48:46 +08:00
Jason Song
c756f3081d
chore: remove /core
2022-11-25 17:48:45 +08:00
Jason Song
feab4b1601
feat: update task status
2022-11-25 17:48:45 +08:00
Jason Song
a8f74d4ec8
fix: make run index group by repo id only
2022-11-25 17:48:45 +08:00
Jason Song
7c40b1ee8d
fix: log index of last step
2022-11-25 17:48:45 +08:00
Jason Song
dcc552011e
fix: right log index out of steps
2022-11-25 17:48:45 +08:00
Jason Song
be1ced34be
fix: log time format
2022-11-25 17:48:45 +08:00
Jason Song
8dbe30dff9
feat: tranfer log to storage
2022-11-25 17:48:45 +08:00
Jason Song
d2f8d5ded1
fix: use file name for log
2022-11-25 17:48:45 +08:00
Jason Song
62798f67c8
fix: limit log line size
2022-11-25 17:48:45 +08:00
Jason Song
dd5b2c5dfd
feat: optimize log indexes
2022-11-25 17:48:45 +08:00
Jason Song
bb4963fd4a
fix: log file open flags
2022-11-25 17:48:45 +08:00