gitea/services/actions/require_action.go
Alex Lau(AvengerMoJo) ed7fa95528 Combined all RequestActions implementation and merge upstream and remove WIP
Signed-off-by: Alex Lau(AvengerMoJo) <avengermojo@gmail.com>
2024-12-11 11:23:46 +08:00

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)
}