NewSpecialAssigneeReplacer creates a replacer that expands @me and (when actorAssignees is true) Copilot actor names in assignee slices. copilotUseLogin controls whether Copilot actors are replaced with their login (true) or display name (false, used for web mode).
(client *api.Client, host string, actorAssignees bool, copilotUseLogin bool)
| 194 | // copilotUseLogin controls whether Copilot actors are replaced with their |
| 195 | // login (true) or display name (false, used for web mode). |
| 196 | func NewSpecialAssigneeReplacer(client *api.Client, host string, actorAssignees bool, copilotUseLogin bool) *SpecialAssigneeReplacer { |
| 197 | return &SpecialAssigneeReplacer{ |
| 198 | meReplacer: NewMeReplacer(client, host), |
| 199 | copilotReplacer: NewCopilotReplacer(copilotUseLogin), |
| 200 | actorAssignees: actorAssignees, |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | func (r *SpecialAssigneeReplacer) ReplaceSlice(logins []string) ([]string, error) { |
| 205 | replaced, err := r.meReplacer.ReplaceSlice(logins) |
no test coverage detected