Feature: Support workflow event dispatch via API (#32059)

ref: https://github.com/go-gitea/gitea/issues/31765

---------

Signed-off-by: Bence Santha <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Christopher Homberger <[email protected]>
This commit is contained in:
Bence Sántha
2025-02-10 05:23:57 +08:00
committed by GitHub
co-authored by Lunny Xiao Christopher Homberger
parent 06088ec672
commit 523751dc82
10 changed files with 1685 additions and 137 deletions
+20
View File
@@ -0,0 +1,20 @@
// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package actions
import "code.gitea.io/gitea/services/context"
// WorkflowAPI for action workflow of a repository
type WorkflowAPI interface {
// ListRepositoryWorkflows list repository workflows
ListRepositoryWorkflows(*context.APIContext)
// GetWorkflow get a workflow
GetWorkflow(*context.APIContext)
// DisableWorkflow disable a workflow
DisableWorkflow(*context.APIContext)
// DispatchWorkflow create a workflow dispatch event
DispatchWorkflow(*context.APIContext)
// EnableWorkflow enable a workflow
EnableWorkflow(*context.APIContext)
}