in src/main/java/org/apache/maven/plugins/github/GitHubDownloader.java [128:180]
protected Issue createIssue( org.eclipse.egit.github.core.Issue githubIssue )
{
Issue issue = new Issue();
issue.setKey( String.valueOf( githubIssue.getNumber() ) );
issue.setId( String.valueOf( githubIssue.getNumber() ) );
issue.setLink( this.githubIssueURL + githubIssue.getNumber() );
issue.setCreated( githubIssue.getCreatedAt() );
issue.setUpdated( githubIssue.getUpdatedAt() );
if ( githubIssue.getAssignee() != null )
{
if ( githubIssue.getAssignee().getName() != null )
{
issue.setAssignee( githubIssue.getAssignee().getName() );
}
else
{
issue.setAssignee( githubIssue.getAssignee().getLogin() );
}
}
issue.setTitle( githubIssue.getTitle() );
issue.setSummary( githubIssue.getTitle() );
if ( githubIssue.getMilestone() != null )
{
issue.addFixVersion( githubIssue.getMilestone().getTitle() );
}
issue.setReporter( githubIssue.getUser().getLogin() );
if ( githubIssue.getClosedAt() != null )
{
issue.setStatus( "closed" );
}
else
{
issue.setStatus( "open" );
}
List<Label> labels = githubIssue.getLabels();
if ( labels != null && !labels.isEmpty() )
{
issue.setType( labels.get( 0 ).getName() );
}
return issue;
}