Menu
๐Ÿ™GitHub EngineeringยทApril 11, 2025

Designing Hierarchical Issue Management: GitHub's Sub-Issues Implementation

This article details GitHub's journey in building sub-issues, a feature enhancing complex issue management by introducing hierarchical task structures. It covers the data modeling approach using MySQL relationships, exposure via GraphQL, and the benefits of integrating deeply with existing GitHub components to support nested tasks and track progress efficiently. The design emphasizes simplicity, performance, and reusability.

Read original on GitHub Engineering

GitHub's introduction of sub-issues addresses a common challenge in project management: effectively breaking down and tracking complex tasks within a hierarchical structure. Rather than a mere UI enhancement, this feature necessitated fundamental changes in data modeling and API exposure to support nested relationships between issues. The core problem was to enable users to manage interdependent tasks without overcomplicating the existing issue experience.

Data Model for Hierarchical Issues

The implementation of sub-issues involved designing a new hierarchical structure for tasks. Instead of modifying existing task list functionality, GitHub opted for a dedicated approach. A key design decision was to represent sub-issues as relationships within a dedicated MySQL table. This table stores the parent-child links between issues, maintaining the hierarchical structure.

  • A `sub-issues` table stores relationships (e.g., Issue X is parent of Issue Y).
  • A separate `sub-issue list` table aggregates completion information to ensure performant progress tracking without deep traversals.
  • When a child issue is completed, the system automatically updates the parent's progress, removing the need for manual checks.
๐Ÿ’ก

Why a separate relationship table?

Storing relationships in a dedicated table, rather than directly nesting data, provides several benefits: it simplifies data residency requirements (especially for GitHub Enterprise), improves query performance for large datasets, and enhances flexibility for future feature expansions. It also decouples the issue data from its hierarchical context.

API Exposure and Front-end Integration

Sub-issues are exposed through GraphQL endpoints, leveraging GitHub's modern API architecture. This choice facilitated more efficient data fetching and provided greater flexibility in how issue data is queried and displayed. The front-end implementation heavily reused existing React components and integrated new, shared list-view components, demonstrating an emphasis on component reusability and accelerated development.

  • GraphQL endpoints enable efficient data retrieval for sub-issue relationships.
  • Reused existing React components and newly crafted list-view components for rapid development.
  • Focus on intuitive controls and accessibility through collaboration with dedicated design teams.
githubissue managementdata modelingmysqlgraphqlreacthierarchical datasoftware development workflow

Comments

Loading comments...