You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add template support for auto-configured repository CR names
This commit introduces the ability to customize Repository custom resource
names when auto-configuring new GitHub repositories using configurable
templates with placeholder variables.
Changes:
• Add `auto-configure-repo-repository-template` configuration setting
• Support `{{repo_owner}}` and `{{repo_name}}` template variables
• Implement template processing in repository auto-configuration flow
• Add comprehensive documentation with examples
Configuration:
The new `auto-configure-repo-repository-template` setting allows users to
define custom naming patterns for automatically created Repository CRs.
Supported template variables:
- `{{repo_owner}}`: GitHub repository owner/organization name
- `{{repo_name}}`: GitHub repository name
Examples:
- Template: `{{repo_owner}}-{{repo_name}}-repo-cr`
- Repository: `https://github.com/acme/webapp`
- Generated CR name: `acme-webapp-repo-cr`
Backward compatibility:
If no template is specified, the system falls back to the existing default
format: `{{repo_name}}-repo-cr`
This enhancement provides organizations with flexible naming conventions
that can align with their existing Kubernetes resource management practices
while maintaining the convenience of automatic repository setup.
Signed-off-by: Zaki Shaikh <[email protected]>
Copy file name to clipboardExpand all lines: docs/content/docs/install/settings.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,19 @@ There is a few things you can configure through the config map
124
124
125
125
`https://github.com/owner/repo`will be `owner-repo-ci`
126
126
127
+
* `auto-configure-repo-repository-template`
128
+
129
+
If `auto-configure-new-github-repo` is enabled then you can provide a template
130
+
for generating the name for your new repository custom resource. By default, the repository custom resource name will be generated using this format `{{repo_name}}-repo-cr`.
131
+
132
+
You can override the default using the following variables
133
+
134
+
* `{{repo_owner}}`: The repository owner.
135
+
* `{{repo_name}}`: The repository name.
136
+
For example, if the template is defined as `{{repo_owner}}-{{repo_name}}-repo-cr`,
137
+
then the Repository CR name generated for the repository
138
+
`https://github.com/owner/test`will be `owner-test-repo-cr`
139
+
127
140
* `remember-ok-to-test`
128
141
129
142
If `remember-ok-to-test` is true then if `ok-to-test` is done on pull request then in
0 commit comments