Python utilities for identifying status mismatches between Linear issues and their mirrored GitHub issues. This is a narrowly focused project I created for my work needs, where we use both Linear and GitHub issue tracking systems that sometimes fall out of sync.
Note: This project is unlikely to be useful to anyone else unless they use the same combination of issue trackers (Linear + GitHub) with similar mirroring setup.
This entire tool was created by Claude (Anthropic's AI assistant) through Claude Code. This is a 100% AI-generated, vibe-coded application. No human made any direct changes to the code - all implementation, refactoring, and optimization was done by AI based on conversational requirements and feedback.
Two scripts for analyzing Linear-GitHub issue synchronization:
query_one_issue.py- Check a single Linear issue and its GitHub linksquery_all_issues.py- Bulk analysis of all issues in a Linear team
- Python 3.7+
- GitHub CLI (
gh) - installed and authenticated - Linear API token
-
Install GitHub CLI:
# macOS brew install gh # Other platforms: https://cli.github.com/
-
Authenticate with GitHub:
gh auth login
-
Create
.envfile with your Linear API token:LINEAR_API_TOKEN=lin_api_your_token_here
- Go to Linear Settings > API
- Create a personal API token
- Add to
.envfile
The GitHub CLI handles authentication automatically. A GitHub token is only needed if using the REST API version (not recommended).
python query_one_issue.py MOCO-1233
python query_one_issue.py MOTO-456Shows Linear issue details, GitHub links found, and their current status.
# Default team (MOCO)
python query_all_issues.py
# Specific team
python query_all_issues.py --team-name MOTO
python query_all_issues.py --team-name "Mojo Tooling"
# Show all combinations (including matches)
python query_all_issues.py --show-all
# Limit for testing
python query_all_issues.py --stop-after 50
# Export to markdown
python query_all_issues.py --markdown report.mdpython query_one_issue.py ISSUE_IDENTIFIER
Options:
--team-name TEAM Team identifier or name (default: MOCO)
--show-all Show all status combinations including matches
--stop-after N Stop after processing N Linear issues
--markdown FILE Save results to markdown file
To see all available teams:
python query_all_issues.py --team-name INVALID_TEAMConsole table showing Linear ID, status, GitHub status, GitHub number, and titles:
+---------------+------------+------------+------------+------------------------------------------+
| Linear ID | Status | GH Status | GH Number | Linear Title |
+---------------+------------+------------+------------+------------------------------------------+
| MOCO-2295 | Backlog | open | 5164 | [BUG] Bad / misleading error from par... |
+---------------+------------+------------+------------+------------------------------------------+
By default, hides "expected" status combinations to focus on mismatches:
done+closedbacklog+opencanceled+closedin review+opentodo+openin progress+open
Use --show-all to see everything.
├── query_one_issue.py # Single issue analysis
├── query_all_issues.py # Bulk team analysis
├── linear_access.py # Linear API client
├── github_access.py # GitHub API clients (REST + CLI)
├── env_config.py # Environment configuration
└── README.md # This file
Team not found:
python query_all_issues.py --team-name INVALIDGitHub authentication:
gh auth status
gh auth loginLinear API errors:
- Check LINEAR_API_TOKEN in
.env - Verify token at https://linear.app/settings/api