← back Stef van Dijk

GitHub Issue Parser


2026 · Personal project · Go

Overview


A CLI tool that bridges AI-generated planning output and GitHub. During Scrum sprints, user stories and tasks were drafted by an LLM and saved as Markdown files. This tool reads those files and creates the corresponding GitHub issues automatically, including linking each task as a sub-issue of its parent story.

Approach


The tool has two parsers written in plain Go with no external Markdown library. ParseStory splits the first line off as the issue title and treats the rest as the body. ParseTasks walks the file line by line, tracking which section it is in (description or acceptance criteria) based on Dutch heading names, and accumulates each task into a Ticket struct with its checklist items. The GitHub API calls use go-github: the story issue is created first, then each task issue is created and immediately added as a sub-issue via the sub-issue API. Auth is resolved from GITHUB_AUTH_KEY if set, falling back to gh auth token so it works without any extra config on machines already logged in with the GitHub CLI.

Highlights


  • The auth fallback chain means the tool works out of the box on any machine with the GitHub CLI installed, with no environment setup required.
  • Sub-issue linking is done via a separate API call after each task is created, which keeps the story and its tasks navigable as a hierarchy in GitHub rather than just cross-linked in the body text.
  • Ships with a GoReleaser config and GitHub Actions workflow so tagged releases automatically produce binaries for all platforms.

Outcome


Used across multiple sprints to replace manual issue creation. The repo is public on GitHub. If I were to extend it, I would add support for batch-processing multiple story directories in one run rather than invoking the CLI once per story.

Stack

GoGitHub ActionsGit