chore: rename to Init

This commit is contained in:
Jason Song
2022-11-16 10:09:44 +08:00
parent 9b021500b0
commit 745be45e1b
4 changed files with 11 additions and 8 deletions

View File

@ -11,11 +11,18 @@ import (
"code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/queue"
"github.com/nektos/act/pkg/model"
)
func Init() {
jobEmitterQueue = queue.CreateUniqueQueue("bots_ready_job", jobEmitterQueueHandle, new(jobUpdate))
go graceful.GetManager().RunWithShutdownFns(jobEmitterQueue.Run)
}
func ListWorkflows(commit *git.Commit) (git.Entries, error) {
tree, err := commit.SubTree(".gitea/workflows")
if _, ok := err.(git.ErrNotExist); ok {