ProjectIds returns a slice containing IDs of projects v1 that the issue or a PR has to be linked to.
()
| 214 | |
| 215 | // ProjectIds returns a slice containing IDs of projects v1 that the issue or a PR has to be linked to. |
| 216 | func (e Editable) ProjectIds() (*[]string, error) { |
| 217 | if !e.Projects.Edited { |
| 218 | return nil, nil |
| 219 | } |
| 220 | if len(e.Projects.Add) != 0 || len(e.Projects.Remove) != 0 { |
| 221 | s := set.NewStringSet() |
| 222 | s.AddValues(e.Projects.Default) |
| 223 | s.AddValues(e.Projects.Add) |
| 224 | s.RemoveValues(e.Projects.Remove) |
| 225 | e.Projects.Value = s.ToSlice() |
| 226 | } |
| 227 | p, _, err := e.Metadata.ProjectsTitlesToIDs(e.Projects.Value) |
| 228 | return &p, err |
| 229 | } |
| 230 | |
| 231 | // ProjectV2Ids returns a pair of slices. |
| 232 | // The first is the projects the item should be added to. |
no test coverage detected