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 EngineeringGitHub'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.
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.
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.
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.