mirror of
https://github.com/go-gitea/gitea
synced 2025-01-05 11:36:03 +01:00
23 lines
595 B
Go
23 lines
595 B
Go
|
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
package actions
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
actions_model "code.gitea.io/gitea/models/actions"
|
||
|
)
|
||
|
|
||
|
func CreateRequireAction(ctx context.Context, orgID int64, repoName, workflowName string) (*actions_model.RequireAction, error) {
|
||
|
v, err := actions_model.AddRequireAction(ctx, orgID, repoName, workflowName)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return v, nil
|
||
|
}
|
||
|
|
||
|
func DeleteRequireActionByID(ctx context.Context, requireActionID int64) error {
|
||
|
return actions_model.DeleteRequireAction(ctx, requireActionID)
|
||
|
}
|