mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Feature: Support workflow event dispatch via API (#33545)
Fix: https://github.com/go-gitea/gitea/issues/31765 (Re-open #32059) --------- Co-authored-by: Bence Santha <git@santha.eu> Co-authored-by: Bence Sántha <7604637+bencurio@users.noreply.github.com> Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
@@ -22,6 +22,9 @@ import (
|
||||
)
|
||||
|
||||
// APIContext is a specific context for API service
|
||||
// ATTENTION: This struct should never be manually constructed in routes/services,
|
||||
// it has many internal details which should be carefully prepared by the framework.
|
||||
// If it is abused, it would cause strange bugs like panic/resource-leak.
|
||||
type APIContext struct {
|
||||
*Base
|
||||
|
||||
|
@@ -23,6 +23,10 @@ type BaseContextKeyType struct{}
|
||||
|
||||
var BaseContextKey BaseContextKeyType
|
||||
|
||||
// Base is the base context for all web handlers
|
||||
// ATTENTION: This struct should never be manually constructed in routes/services,
|
||||
// it has many internal details which should be carefully prepared by the framework.
|
||||
// If it is abused, it would cause strange bugs like panic/resource-leak.
|
||||
type Base struct {
|
||||
reqctx.RequestContext
|
||||
|
||||
|
@@ -34,7 +34,10 @@ type Render interface {
|
||||
HTML(w io.Writer, status int, name templates.TplName, data any, templateCtx context.Context) error
|
||||
}
|
||||
|
||||
// Context represents context of a request.
|
||||
// Context represents context of a web request.
|
||||
// ATTENTION: This struct should never be manually constructed in routes/services,
|
||||
// it has many internal details which should be carefully prepared by the framework.
|
||||
// If it is abused, it would cause strange bugs like panic/resource-leak.
|
||||
type Context struct {
|
||||
*Base
|
||||
|
||||
|
Reference in New Issue
Block a user