MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetMetaList

Method GetMetaList

backend/plugin/webhook/webhook.go:113–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113func (c *Context) GetMetaList() []Meta {
114 m := []Meta{}
115
116 if c.Project != nil {
117 m = append(m, Meta{
118 Name: "Project Title",
119 Value: c.Project.Title,
120 },
121 Meta{
122 Name: "Project ID",
123 Value: c.Project.Name,
124 })
125 }
126
127 if c.Issue != nil {
128 m = append(m, Meta{
129 Name: "Issue",
130 Value: c.Issue.Name,
131 }, Meta{
132 Name: "Issue Creator",
133 Value: fmt.Sprintf("%s (%s)", c.Issue.Creator.Name, c.Issue.Creator.Email),
134 })
135 m = append(m, Meta{
136 Name: "Issue Description",
137 Value: common.TruncateStringWithDescription(c.Issue.Description),
138 })
139 } else if c.Rollout != nil {
140 if c.Rollout.Title != "" {
141 m = append(m, Meta{
142 Name: "Rollout",
143 Value: c.Rollout.Title,
144 })
145 }
146 if c.Environment != "" {
147 m = append(m, Meta{
148 Name: "Environment",
149 Value: c.Environment,
150 })
151 }
152 }
153
154 return m
155}
156
157func (c *Context) GetMetaListZh() []Meta {
158 m := []Meta{}

Callers 11

TestContext_getMetaListFunction · 0.95
PostMethod · 0.80
getMessageCardFunction · 0.80
getMessageCardFunction · 0.80
postMessageFunction · 0.80
getAdaptiveCardFunction · 0.80
getMessageCardFunction · 0.80

Calls 1