Git

Milestone

No milestone

Labels

Assignees

Linked items

Loading…

Projects

Loading…
lukaas-007 commented

Overview

Create a new endpoint that returns a prioritized list of work items (issues and PRs) assigned to the current user, ranked based on configurable criteria.

Requirements

Endpoint

  • GET /api/prioritized-items
  • Returns open items assigned to the current user
  • Sorted by priority (highest first)

Prioritization Rules

Global Rules (all repositories):

  • Urgent label (+100 points): Items with 'urgent' label
  • PR with approvals (+80 points): Pull requests that have approved reviews
  • PR pending review (+50 points): Pull requests waiting for reviewer approval

Repository-Specific Rules:

  • webinargeek/app - General board on Friday (-10 points): Deprioritize items from the 'General' project on Fridays

Configuration

Store rules in a configurable format (e.g., GithubConfig) so they can be easily added, adjusted, or removed without code changes.

Response Format

Each item should include:

  • Basic data: id, title, number, type, repository, assignees, etc.
  • priority: Total priority score
  • priority_breakdown: Array showing which rules contributed to the score

Performance

  • Only load necessary columns from database
  • Use eager loading to avoid N+1 queries
  • Efficient handling of relationships (requestedReviewers, repository, organization)

Use Case

Provides a personalized 'what to work on next' list based on urgency and review status, with transparency on why items are prioritized.

Insert