aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-11-21 17:27:33 +0900
committerGitHub <noreply@github.com>2023-11-21 08:27:33 +0000
commita6a674e26a2c88d470f38fb09c4065c473bc7e20 (patch)
tree2ace3607a806349170378338e7131b7cefafb317 /modules
parent976a9926d721b8594f4d73bacdb6b603906c1e56 (diff)
downloadgitea-a6a674e26a2c88d470f38fb09c4065c473bc7e20.tar.gz
gitea-a6a674e26a2c88d470f38fb09c4065c473bc7e20.zip
Add guide page to actions when there's no workflows (#28145)
Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/599d40c1-9b8d-4189-9286-c9c36fb780dd) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/848a73d1-aaec-478f-93a7-adcc7ee18907)
Diffstat (limited to 'modules')
-rw-r--r--modules/context/repo.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 41683a6938..f91dd6aa9a 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -563,6 +563,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(unit_model.TypeCode)
ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(unit_model.TypeIssues)
ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(unit_model.TypePullRequests)
+ ctx.Data["CanWriteActions"] = ctx.Repo.CanWrite(unit_model.TypeActions)
canSignedUserFork, err := repo_module.CanUserForkRepo(ctx, ctx.Doer, ctx.Repo.Repository)
if err != nil {