Skip to content

Commit 0a745a4

Browse files
feat: 模板添加 default 字段支持
- 在 template-example.yaml 中添加 default 字段,使用 username 作为默认值 - 更新 README 说明 default 字段的作用:指定默认组,新项目将使用此用户名作为命名空间
1 parent ed7c691 commit 0a745a4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ toolchains:
248248
{{- end }}
249249
{{- if .Groups }}
250250
groups:
251+
default: {{ .Username }}
251252
{{- range .Groups }}
252253
- name: {{ .Name }}
253254
group_id: {{ .GroupID }}
@@ -256,6 +257,9 @@ toolchains:
256257
{{- end }}
257258
```
258259

260+
**模板说明:**
261+
- `default: {{ .Username }}` - 指定默认组,新创建的项目将默认使用此用户名作为命名空间
262+
259263
使用模板:
260264

261265
```bash

template-example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ toolchains:
2929
{{- if .Groups }}
3030
# Groups and Projects
3131
TestGroups:
32+
default: {{ .Username }}
3233
{{- range .Groups }}
3334
- name: {{ .Name }}
3435
path: {{ .Path }}

0 commit comments

Comments
 (0)