freelyformd / github-todos

MVP: Analyse a repo's code for TODOs and FixMe comments & make github issues out of them
ISC License
3 stars 0 forks source link

Transform Todo issue objects into issue with comments #23

Closed epicallan closed 6 years ago

epicallan commented 6 years ago

transform a list of RepoIssues[] i.e

interface RepoIssues {
   commentText: string;
   lineNumber: number;
   keyWord: KeyWord;
   fileName: string;
}

Into an issue with title named: <keyword> issues from source code and with extracted code issues as comments. For keyword TODO, title would be; TODO issues from source code

The comment item could have text of the form:

<fileName> : <lineNumber> <commentText>

So your function will return a list of issue of the form:

type Comment = string;
type Title = string;
interface IssueWithComments { 
   title:  Title
   comments: Comment[]
};

Write this in lib/github/issue-presenter.ts