[MM-52271] Add recommended tag to Work Template integrations (#23016)

Этот коммит содержится в:
Julien Tant
2023-04-24 09:59:01 -07:00
коммит произвёл GitHub
родитель bf4555a223
Коммит 94cb2867a7
8 изменённых файлов: 55 добавлений и 18 удалений

Просмотреть файл

@@ -93,6 +93,7 @@ var wt{{.MD5}} = &WorkTemplate{
Illustration: "{{.Playbook.Illustration}}",
},{{end}}{{if .Integration}}Integration: &Integration{
ID: "{{.Integration.ID}}",
Recommended: {{.Integration.Recommended}},
},{{end}}
},
{{end}}

Просмотреть файл

@@ -45,8 +45,10 @@ content:
illustration: "/static/worktemplates/playbooks/product_release.png"
- integration:
id: jira
recommended: true
- integration:
id: github
recommended: true
---
id: 'product_teams/goals_and_okrs:v1'
category: product_teams
@@ -86,7 +88,7 @@ content:
channel: channel-1674845108569
- integration:
id: zoom
recommended: true
---
id: 'product_teams/bug_bash:v1'
category: product_teams
@@ -120,6 +122,7 @@ content:
playbook: playbook-1674844017943
- integration:
id: jira
recommended: true
---
id: 'product_teams/sprint_planning:v1'
category: product_teams
@@ -153,6 +156,7 @@ content:
channel: channel-1674850783500
- integration:
id: zoom
recommended: true
---
id: 'product_teams/product_roadmap:v1'
category: product_teams
@@ -282,6 +286,7 @@ content:
channel: channel-1674845108569
- integration:
id: zoom
recommended: true
---
id: 'companywide/create_project:v1'
category: companywide
@@ -316,10 +321,13 @@ content:
channel: channel-1674851940114
- integration:
id: jira
recommended: true
- integration:
id: github
recommended: true
- integration:
id: zoom
recommended: true
---
######################
# Leadership
@@ -356,4 +364,4 @@ content:
channel: channel-1674845108569
- integration:
id: zoom
recommended: true

Просмотреть файл

@@ -108,7 +108,8 @@ func (wt WorkTemplate) ToModelWorkTemplate(t i18n.TranslateFunc) *model.WorkTemp
if content.Integration != nil {
mwt.Content = append(mwt.Content, model.WorkTemplateContent{
Integration: &model.WorkTemplateIntegration{
ID: content.Integration.ID,
ID: content.Integration.ID,
Recommended: content.Integration.Recommended,
},
})
}
@@ -320,7 +321,8 @@ func (p *Playbook) Validate() error {
}
type Integration struct {
ID string `yaml:"id"`
ID string `yaml:"id"`
Recommended bool `yaml:"recommended"`
}
func (i *Integration) Validate() error {

Просмотреть файл

@@ -148,12 +148,14 @@ var wt00a1b44a5831c0a3acb14787b3fdd352 = &WorkTemplate{
},
{
Integration: &Integration{
ID: "jira",
ID: "jira",
Recommended: true,
},
},
{
Integration: &Integration{
ID: "github",
ID: "github",
Recommended: true,
},
},
},
@@ -214,7 +216,8 @@ var wt5baa68055bf9ea423273662e01ccc575 = &WorkTemplate{
},
{
Integration: &Integration{
ID: "zoom",
ID: "zoom",
Recommended: true,
},
},
},
@@ -265,7 +268,8 @@ var wtfeb56bc6a8f277c47b503bd1c92d830e = &WorkTemplate{
},
{
Integration: &Integration{
ID: "jira",
ID: "jira",
Recommended: true,
},
},
},
@@ -317,7 +321,8 @@ var wt8d2ef53deac5517eb349dc5de6150196 = &WorkTemplate{
},
{
Integration: &Integration{
ID: "zoom",
ID: "zoom",
Recommended: true,
},
},
},
@@ -518,7 +523,8 @@ var wtf7b846d35810f8272eeb9a1a562025b5 = &WorkTemplate{
},
{
Integration: &Integration{
ID: "zoom",
ID: "zoom",
Recommended: true,
},
},
},
@@ -570,17 +576,20 @@ var wtb9ab412890c2410c7b49eec8f12e7edc = &WorkTemplate{
},
{
Integration: &Integration{
ID: "jira",
ID: "jira",
Recommended: true,
},
},
{
Integration: &Integration{
ID: "github",
ID: "github",
Recommended: true,
},
},
{
Integration: &Integration{
ID: "zoom",
ID: "zoom",
Recommended: true,
},
},
},
@@ -632,7 +641,8 @@ var wt32ab773bfe021e3d4913931041552559 = &WorkTemplate{
},
{
Integration: &Integration{
ID: "zoom",
ID: "zoom",
Recommended: true,
},
},
},

Просмотреть файл

@@ -69,7 +69,8 @@ type WorkTemplatePlaybook struct {
}
type WorkTemplateIntegration struct {
ID string `json:"id"`
ID string `json:"id"`
Recommended bool `json:"recommended"`
}
type WorkTemplateContent struct {