feat: support disable bots completely

This commit is contained in:
Jason Song
2022-12-01 15:27:28 +08:00
parent ab69fdc6fe
commit b2745bff43
8 changed files with 33 additions and 23 deletions

View File

@@ -183,7 +183,7 @@
</a>
{{end}}
{{if and (not .UnitBotsGlobalDisabled) (.Permission.CanRead $.UnitTypeBots)}}
{{if and .EnableBots (not .UnitBotsGlobalDisabled) (.Permission.CanRead $.UnitTypeBots)}}
<a class="{{if .PageIsBots}}active{{end}} item" href="{{.RepoLink}}/bots">
{{svg "octicon-play"}} {{.locale.Tr "repo.bots"}}
{{if .Repository.NumOpenRuns}}