Commit Graph

3702 Commits

Author SHA1 Message Date
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
Bo-Yi.Wu fb738c4192 chore(runner): support fetch detail stage data
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu 8255915350 chore: move core package to top folder.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi.Wu 1148903d79 refactor: move build status to core package 2022-11-25 17:48:44 +08:00
Bo-Yi.Wu eac6425b2f chore(gRPC): support update stage and step method.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
Bo-Yi Wu 0e79fc556a chore(router): Add grpc and grep-web api
Using connect-go package

https://github.com/bufbuild/connect-go

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-11-25 17:48:44 +08:00
wxiaoguang 92d15afd18 database-filesystem, demo log tailing in term 2022-11-25 17:48:43 +08:00
Lunny Xiao 2c4f6fd42f add most tables 2022-11-25 17:48:43 +08:00
Lunny Xiao 5a479bb034 Add builds UI 2022-11-25 17:48:43 +08:00
Lunny Xiao 7732392a96 Add bots 2022-11-25 17:48:33 +08:00
KN4CK3R a1ae83f36e
Workaround for container registry push/pull errors (#21862)
This PR addresses #19586

I added a mutex to the upload version creation which will prevent the
push errors when two requests try to create these database entries. I'm
not sure if this should be the final solution for this problem.

I added a workaround to allow a reupload of missing blobs. Normally a
reupload is skipped because the database knows the blob is already
present. The workaround checks if the blob exists on the file system.
This should not be needed anymore with the above fix so I marked this
code to be removed with Gitea v1.20.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-25 13:47:46 +08:00
KN4CK3R fc7a2d5a95
Add support for HEAD requests in Maven registry (#21834)
Related #18543

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-24 16:25:13 +02:00
Xinyu Zhou e483ec3a00
Fix vertical align of committer avatar rendered by email address (#21884)
Committer avatar rendered by `func AvatarByEmail` are not vertical align
as `func Avatar` does.

- Replace literals `ui avatar` and `ui avatar vm` with the constant
`DefaultAvatarClass`
2022-11-23 15:57:37 -06:00
zeripath 4d42cbbcc2
Handle empty author names (#21902)
Although git does expect that author names should be of the form: `NAME
<EMAIL>` some users have been able to create commits with: `<EMAIL>`

Fix #21900

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-23 08:52:57 +08:00
Xinyu Zhou 68e934ab5d
Add option to enable CAPTCHA validation for login (#21638)
Enable this to require captcha validation for user login. You also must
enable `ENABLE_CAPTCHA`.

Summary:
- Consolidate CAPTCHA template
- add CAPTCHA handle and context
- add `REQUIRE_CAPTCHA_FOR_LOGIN` config and docs
- Consolidate CAPTCHA set-up and verification code 

Partially resolved #6049 

Signed-off-by: Xinyu Zhou <i@sourcehut.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2022-11-22 21:13:18 +00:00