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
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
e1c1d36234
fix: remove http2 support
2022-11-28 14:52:23 +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
KN4CK3R
4b5a6e5ef0
Fix typos ( #21947 )
...
Two typos
The `recieve` typo is also present in a translation.
5f38acd9a0/options/locale/locale_sv-SE.ini (L1760)
Someone with a Crowdin account should fix that.
... and in a license file but I don't think we can change that because
that's the official text.
5f38acd9a0/options/license/xinetd (L21)
2022-11-27 00:21:54 +08:00
Jason Song
ef4b3673dd
chore: golang lint
2022-11-26 22:12:52 +08:00
Jason Song
0bd9553219
chore: golang lint
2022-11-26 20:14:03 +08:00
Jason Song
1886156329
chore: remove outdated todos
2022-11-25 17:48:48 +08:00
Jason Song
fdd3c0434e
feat: add IsForkPullRequest
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
88b0ab89d0
Gitea bot will not fire the events otherwise it may causes a forever loop
2022-11-25 17:48:48 +08:00
Jason Song
dd417a3270
chore: move job emitter to service
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
9b021500b0
feat: ignore bots events of repo with disabled builds
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
1a55d39adc
fix: ignore ErrAlreadyInQueue
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
5e7adf2004
chore: add extra fields to Run and RunJob
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
3c7fce0d37
fix: distribute log files to folders
2022-11-25 17:48:46 +08:00
Lunny Xiao
82c6fc2217
Add commit status for push event
2022-11-25 17:48:46 +08:00
Lunny Xiao
0bc995889f
Finish bots events notifications
2022-11-25 17:48:46 +08:00
Lunny Xiao
34a1bb2c20
encrypt master key
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
Lauris BH
d4e84c0433
Add simple master key provider for secret encryption
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
feab4b1601
feat: update task status
2022-11-25 17:48:45 +08:00
Lunny Xiao
3518c098b9
Improve ui for builds
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
bb4963fd4a
fix: log file open flags
2022-11-25 17:48:45 +08:00
Jason Song
d7b99e0028
feat: use dbfs to store log
2022-11-25 17:48:45 +08:00
Lunny Xiao
f75a4abc5d
build UI
2022-11-25 17:48:45 +08:00
Lunny Xiao
482832da76
delete unused structs
2022-11-25 17:48:45 +08:00
Jason Song
f355188e12
feat: parse workflows
2022-11-25 17:48:44 +08:00
Jason Song
5093d6b48e
chore: fix mods
2022-11-25 17:48:44 +08:00