MCPcopy Create free account
hub / github.com/driangle/taskmd / issueToExternalTask

Function issueToExternalTask

apps/cli/internal/sync/github/github.go:252–276  ·  view source on GitHub ↗
(issue ghIssue)

Source from the content-addressed store, hash-verified

250}
251
252func issueToExternalTask(issue ghIssue) sync.ExternalTask {
253 task := sync.ExternalTask{
254 ExternalID: strconv.Itoa(issue.Number),
255 Title: issue.Title,
256 Description: issue.Body,
257 Status: issue.State,
258 URL: issue.HTMLURL,
259 CreatedAt: issue.CreatedAt,
260 UpdatedAt: issue.UpdatedAt,
261 }
262
263 for _, l := range issue.Labels {
264 task.Labels = append(task.Labels, l.Name)
265 }
266
267 if issue.Assignee != nil {
268 task.Assignee = issue.Assignee.Login
269 }
270
271 if issue.Milestone != nil {
272 task.Priority = issue.Milestone.Title
273 }
274
275 return task
276}

Callers 1

FetchTasksMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected