GitHubLabels returns the label list for GitHub scale set API calls. The scale set name is always included as the first "System" label, matching actions-runner-controller behavior. Additional tag names are appended with deduplication.
()
| 687 | // matching actions-runner-controller behavior. Additional tag names |
| 688 | // are appended with deduplication. |
| 689 | func (p ScaleSet) GitHubLabels() []Label { |
| 690 | labels := []Label{{Name: p.Name, Type: "System"}} |
| 691 | seen := map[string]bool{p.Name: true} |
| 692 | for _, t := range p.Tags { |
| 693 | if seen[t.Name] { |
| 694 | continue |
| 695 | } |
| 696 | seen[t.Name] = true |
| 697 | labels = append(labels, Label{Name: t.Name}) |
| 698 | } |
| 699 | return labels |
| 700 | } |
| 701 | |
| 702 | func (p ScaleSet) BelongsTo(entity ForgeEntity) bool { |
| 703 | switch p.ScaleSetType() { |
no outgoing calls
no test coverage detected