Skip to content

Commit

Permalink
Show issues and PRs without milestones in 'Contributions' preset view (
Browse files Browse the repository at this point in the history
…#392)

Include issues/PRs without milestones in 'Contributions' preset view

The 'Contributions' preset view doesn't include issues/PRs without a milestone.

However, issues and PRs without milestones are contributions as well, and should
be included in the 'Contributions' preset view.

Let's show issues and PRs without milestones in the 'Contributions' preset view as well.
  • Loading branch information
wx-03 authored Jan 21, 2025
1 parent a6b0e1d commit a6b925c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/core/services/filters.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class FiltersService {
type: 'all',
sort: { active: 'id', direction: 'desc' },
labels: [],
milestones: this.milestoneService.milestones.map((milestone) => milestone.title),
milestones: this.getMilestonesForContributions().map((milestone) => milestone.title),
deselectedLabels: new Set<string>(),
itemsPerPage: 20,
assignees: this.assigneeService.assignees.map((assignee) => assignee.login)
Expand Down Expand Up @@ -359,4 +359,9 @@ export class FiltersService {
// TODO Filter out assignees that have not contributed in currently active milestones
return [...this.assigneeService.assignees, GithubUser.NO_ASSIGNEE];
}

getMilestonesForContributions(): Milestone[] {
const milestones = this.milestoneService.milestones;
return [...milestones, Milestone.PRWithoutMilestone, Milestone.IssueWithoutMilestone];
}
}

0 comments on commit a6b925c

Please sign in to comment.