generated from practical-stack/turborepo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
agent: add make-task-issue command and agent type support #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
p-iknow
merged 3 commits into
main
from
i7-agent/create-custom-claude-code-command-for-make-task-issue
Oct 19, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| --- | ||
| description: "Create GitHub issues using templates with automatic project assignment" | ||
| argument-hint: "[template-type] [issue-title]" | ||
| allowed-tools: | ||
| - Bash | ||
| --- | ||
|
|
||
| # Make Task Issue | ||
|
|
||
| Create a new GitHub issue using one of the available templates and automatically assign it to the repository's GitHub Project. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| /make-task-issue [template-type] [issue-title] | ||
| ``` | ||
|
|
||
| Or simply: | ||
| ``` | ||
| /make-task-issue | ||
| ``` | ||
|
|
||
| ## Available Templates | ||
|
|
||
| The following issue templates are available in `.github/ISSUE_TEMPLATE/`: | ||
|
|
||
| - `feat` - Add a new feature or enhancement | ||
| - `fix` - Fix a bug or issue | ||
| - `doc` - Add or update project documentation | ||
| - `config` - Add or update project configuration, dependencies, or tooling | ||
| - `refactor` - Refactor existing code for better maintainability or performance | ||
| - `agent` - Add or update agent rules, commands, or automation | ||
| - `bug` - Create a bug report to help us improve | ||
| - `test` - Add or improve tests | ||
| - `perf` - Improve performance | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. **Determine template type**: | ||
| - If `$1` (first argument) is provided and matches a template type, use it | ||
| - Otherwise, ask the user to select from available templates | ||
|
|
||
| 2. **Get issue title**: | ||
| - If `$2` (remaining arguments) is provided, use it as the title | ||
| - Otherwise, ask the user for the title | ||
| - Format title as: `{type}: {user-provided-title}` | ||
|
|
||
| 3. **Create the issue**: | ||
| - Use GitHub CLI: `gh issue create --template {template}.md --title "{formatted-title}"` | ||
| - The template will pre-fill the issue body structure | ||
| - User can edit the issue body in their editor before submission | ||
|
|
||
| 4. **Set issue type as "Task"**: | ||
| - After issue creation, set the GitHub issue type to "Task" | ||
| - Use GitHub API via gh CLI: `gh api repos/{owner}/{repo}/issues/{issue-number} -X PATCH -f type='Task'` | ||
| - This categorizes the issue as a "Task" type in GitHub's issue tracking system | ||
| - Note: The field name is `type` (not `issue_type`) and the value should be capitalized (e.g., 'Task', 'Bug', 'Feature') | ||
| - Issue types are an organization-level feature and may not be available in all repositories | ||
|
|
||
| 5. **Add to GitHub Project**: | ||
| - After issue creation, add the issue to the repository's linked GitHub Project | ||
| - Get the project linked to the repository using GraphQL (most efficient): | ||
| ```bash | ||
| gh api graphql -f query=' | ||
| { | ||
| repository(owner: "{owner}", name: "{repo}") { | ||
| projectsV2(first: 1) { | ||
| nodes { | ||
| id | ||
| number | ||
| title | ||
| } | ||
| } | ||
| } | ||
| }' | ||
| ``` | ||
| - Extract the project number from the response | ||
| - Add the issue to the project: | ||
| * Use: `gh project item-add {project-number} --owner {owner} --url {issue-url}` | ||
| - If no project is linked or command fails, show informative message but don't fail issue creation | ||
| - Note: This approach is more efficient than listing all organization projects as it queries only repository-linked projects | ||
|
|
||
| ## Examples | ||
|
|
||
| ### With arguments: | ||
| ``` | ||
| /make-task-issue feat implement dark mode | ||
| ``` | ||
| Creates a feature issue with title "feat: implement dark mode" | ||
|
|
||
| ### Interactive mode: | ||
| ``` | ||
| /make-task-issue | ||
| ``` | ||
| Prompts for template selection and title | ||
|
|
||
| ## Implementation Notes | ||
|
|
||
| - Use `gh issue create` with `--template` flag to utilize existing templates | ||
| - Templates automatically apply correct labels (e.g., feat template applies "feat" label) | ||
| - Issue will be assigned to creator automatically via auto-assign workflow | ||
| - All issues created via this command are set to "Task" type | ||
| - Issues are automatically added to the repository's linked GitHub Project | ||
| - GitHub Project integration: | ||
| * Uses GraphQL to efficiently query only repository-linked projects | ||
| * Supports both organization and user projects | ||
| * Uses `gh project item-add` to add issues to projects | ||
| * Gracefully handles cases where no project is linked | ||
| - Issue type feature requires organization-level setup (default types: Task, Bug, Feature) | ||
|
|
||
| ## Error Handling | ||
|
|
||
| - If template type is invalid, show available templates and ask again | ||
| - If `gh` CLI is not available, guide user to install it | ||
| - If issue type setting fails (e.g., feature not available), show warning but continue | ||
| - If no GitHub Project is linked to repository, show informative message | ||
| - If project assignment fails, show warning but don't fail issue creation | ||
| - Provide clear feedback on each step of the process (issue created, type set, project assigned) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.