Skip to content

Commit 1886bd6

Browse files
GiteaBotwolfogre
andauthored
Rename actions unit to repo.actions and add docs for it (#23733) (#23881)
Backport #23733 by @wolfogre I neglected that the `NameKey` of `Unit` is not only for translation, but also configuration. So it should be `repo.actions` to maintain consistency. ## ⚠️ BREAKING ⚠️ If users already use `actions.actions` in `DISABLED_REPO_UNITS` or `DEFAULT_REPO_UNITS`, it will be treated as an invalid unit key. Co-authored-by: Jason Song <[email protected]>
1 parent 7e07f5c commit 1886bd6

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

custom/conf/app.example.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -931,10 +931,10 @@ ROUTER = console
931931
;USE_COMPAT_SSH_URI = false
932932
;;
933933
;; Close issues as long as a commit on any branch marks it as fixed
934-
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages
934+
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages, repo.actions.
935935
;DISABLED_REPO_UNITS =
936936
;;
937-
;; Comma separated list of default new repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects, repo.packages.
937+
;; Comma separated list of default new repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects, repo.packages, repo.actions.
938938
;; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility.
939939
;; External wiki and issue tracker can't be enabled by default as it requires additional settings.
940940
;; Disabled repo units will not be added to new repositories regardless if it is in the default list.

docs/content/doc/administration/config-cheat-sheet.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build
103103
- `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed.
104104
- `ENABLE_PUSH_CREATE_USER`: **false**: Allow users to push local repositories to Gitea and have them automatically created for a user.
105105
- `ENABLE_PUSH_CREATE_ORG`: **false**: Allow users to push local repositories to Gitea and have them automatically created for an org.
106-
- `DISABLED_REPO_UNITS`: **_empty_**: Comma separated list of globally disabled repo units. Allowed values: \[repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects\]
107-
- `DEFAULT_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages**: Comma separated list of default new repo units. Allowed values: \[repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects\]. Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility. External wiki and issue tracker can't be enabled by default as it requires additional settings. Disabled repo units will not be added to new repositories regardless if it is in the default list.
106+
- `DISABLED_REPO_UNITS`: **_empty_**: Comma separated list of globally disabled repo units. Allowed values: \[repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages, repo.actions\]
107+
- `DEFAULT_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages**: Comma separated list of default new repo units. Allowed values: \[repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects, repo.packages, repo.actions\]. Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility. External wiki and issue tracker can't be enabled by default as it requires additional settings. Disabled repo units will not be added to new repositories regardless if it is in the default list.
108108
- `DEFAULT_FORK_REPO_UNITS`: **repo.code,repo.pulls**: Comma separated list of default forked repo units. The set of allowed values and rules is the same as `DEFAULT_REPO_UNITS`.
109109
- `PREFIX_ARCHIVE_FILES`: **true**: Prefix archive files by placing them in a directory named after the repository.
110110
- `DISABLE_MIGRATIONS`: **false**: Disable migrating feature.

models/unit/unit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ var (
312312

313313
UnitActions = Unit{
314314
TypeActions,
315-
"actions.actions",
315+
"repo.actions",
316316
"/actions",
317317
"actions.unit.desc",
318318
7,

options/locale/locale_en-US.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,7 @@ issues = Issues
10541054
pulls = Pull Requests
10551055
project_board = Projects
10561056
packages = Packages
1057+
actions = Actions
10571058
labels = Labels
10581059
org_labels_desc = Organization level labels that can be used with <strong>all repositories</strong> under this organization
10591060
org_labels_desc_manage = manage

0 commit comments

Comments
 (0)