From 19872063a3c14256a1d89b2a104d63e7538a3a28 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Mon, 14 Aug 2023 23:14:30 +0800 Subject: add disable workflow feature (#26413) As title, that's simmilar with github. ![image](https://github.com/go-gitea/gitea/assets/25342410/9e8b2444-63e0-4e87-80da-730c1e4d09d6) ![image](https://github.com/go-gitea/gitea/assets/25342410/6c3a3345-3ba7-48c9-9acd-3e621632491b) --------- Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: silverwind Co-authored-by: Jason Song --- models/repo/repo.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'models/repo/repo.go') diff --git a/models/repo/repo.go b/models/repo/repo.go index 3d1f2dcfa8..b37948fea7 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -391,7 +391,13 @@ func (repo *Repository) MustGetUnit(ctx context.Context, tp unit.Type) *RepoUnit Type: tp, Config: new(IssuesConfig), } + } else if tp == unit.TypeActions { + return &RepoUnit{ + Type: tp, + Config: new(ActionsConfig), + } } + return &RepoUnit{ Type: tp, Config: new(UnitConfig), -- cgit v1.2.3