Skip to content

Turn GitHub issues into actionable project tasks with the help of an LLM.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
license.txt
Notifications You must be signed in to change notification settings

nanbingxyz/issue2task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Issue to Project Task

Turn GitHub issues into actionable project tasks with the help of an LLM.

C1E758FC-34AB-4FA0-A785-053D150D8A9B

This tool fetches the full content of an issue (title, body, and comments), summarizes it with a large language model, and creates a new GitHub issue (optionally adding it to a Project v2 board) containing a concise problem statement, analysis, and potential solutions.

✨ Why this tool?

Managing complex issues often means scrolling through long threads of comments, back-and-forth discussions, and partial ideas. It’s easy to lose track of what the actual problem is and what the next steps should be.

This script solves that by:

  • Summarizing issues automatically using an LLM (configured via .env).
  • Generating clear, actionable tasks in concise English.
  • Linking back to the original issue for full context.
  • Optionally adding tasks to GitHub Project v2 boards for streamlined project management.

🔧 Requirements

  • Python 3.9+
  • A valid GitHub Personal Access Token (repo scope for private repos, plus project access if you use Projects v2).
  • Access to an OpenAI-compatible LLM API (or any service that implements the /v1/chat/completions endpoint).

⚙️ Configuration

Create a .env file in the project root with your model configuration:

GH_TOKEN=ghp_xxxxxxx              # GitHub token (or pass via --gh-token)
LLM_BASE_URL=https://api.openai.com
LLM_API_KEY=sk-xxxxxxxxxxxxxxxx
LLM_MODEL=gpt-4o-mini
  • GH_TOKEN: Required to fetch issues, post new ones, and update Projects v2.
  • LLM_BASE_URL: Base URL for your model API (defaults to OpenAI if you use their API).
  • LLM_API_KEY: Your API key.
  • LLM_MODEL: The model name (e.g., gpt-4o-mini, gpt-4.1, mistral-small, etc.).

🚀 Usage

python issue_to_project_task.py \
  --issue-url "https://github.com/owner/repo/issues/123" \
  --project myorg/7

Options

  • --issue-url (required): The source GitHub issue.
  • --gh-token: GitHub token (defaults to $GH_TOKEN).
  • --target-owner / --target-repo: Where to create the new task (defaults to the source repo).
  • --labels: Comma-separated labels to apply to the new issue.
  • --assignees: Comma-separated list of assignees.
  • --project: Add the task to a GitHub Project v2 (format: owner/number, e.g. acme-org/3).
  • --dry-run: Print the generated summary without creating anything.

📖 Example

python issue_to_project_task.py \
  --issue-url "https://github.com/nanbingxyz/5ire/issues/456" \
  --project nanbingxyz/4 \
  --labels "triage,backend"

This will:

  1. Fetch the issue and all comments.
  2. Summarize them into a structured task.
  3. Create a new issue in the same repo with the generated title and body.
  4. Add it to your personal Project v2 board nanbingxyz/4.

🤝 Contributing

Contributions are welcome!

  • Found a bug? Open an issue.
  • Have a feature idea? Submit a pull request.
  • Want to improve docs? PRs are always appreciated.

Please keep changes small and focused so they’re easy to review.

📜 License

This project is licensed under the MIT License. You are free to use, modify, and distribute it for personal or commercial purposes, with attribution.

🔍 You May Also Like

Looking for more ways to boost developer productivity on GitHub?

daily-commit-summarizer

Check out daily-commit-summarizer —— a GitHub Action that automatically summarizes your team’s daily commits using AI and delivers a clear report to your preferred webhook (Slack, Feishu, Discord, etc.). It’s a lightweight way to keep everyone aligned without manually scanning commit logs.

About

Turn GitHub issues into actionable project tasks with the help of an LLM.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
license.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages