Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 26, 2025

This PR implements a new create_sub_issue tool that streamlines the workflow for creating issues that need to be linked as sub-issues to a parent issue.

What was added

New CreateSubIssue function

  • Location: pkg/github/issues.go
  • Tool name: create_sub_issue
  • Functionality: Creates a new issue and automatically adds it as a sub-issue to a specified parent issue in a single operation

Parameters

The function accepts all standard issue creation parameters plus a required parent_issue_number:

  • owner (required): Repository owner
  • repo (required): Repository name
  • parent_issue_number (required): The number of the parent issue
  • title (required): Issue title
  • body (optional): Issue body content
  • assignees (optional): Usernames to assign to this issue
  • labels (optional): Labels to apply to this issue
  • milestone (optional): Milestone number
  • type (optional): Type of this issue

Implementation details

The function performs two sequential operations:

  1. Creates the issue using the GitHub Issues API
  2. Automatically adds the created issue as a sub-issue to the parent using the SubIssue API

Error handling provides clear distinction between issue creation failures and sub-issue addition failures, helping users understand which step failed.

Testing

Added comprehensive test coverage with 5 scenarios:

  • Successful creation with all parameters
  • Successful creation with minimal parameters
  • Issue creation failure handling
  • Sub-issue addition failure handling (after successful issue creation)
  • Parameter validation

Documentation

Updated README.md to include the new tool with complete parameter documentation.

Benefits

  • Streamlined workflow: Single operation instead of requiring separate create_issue + add_sub_issue calls
  • Consistent interface: Matches create_issue parameters exactly, just adds parent_issue_number
  • Robust error handling: Clear error messages for both creation steps
  • Full compatibility: Works with all existing issue creation features (labels, assignees, milestones, etc.)

Fixes #2.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@JaclynCodes JaclynCodes marked this pull request as ready for review August 26, 2025 19:07
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 19:07
Copilot

This comment was marked as outdated.

@JaclynCodes JaclynCodes merged commit a733fad into main Aug 26, 2025
11 of 16 checks passed
@JaclynCodes JaclynCodes deleted the copilot/fix-2 branch August 26, 2025 19:08
@JaclynCodes JaclynCodes restored the copilot/fix-2 branch August 26, 2025 19:08
@JaclynCodes JaclynCodes requested a review from Copilot August 26, 2025 19:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@Copilot Copilot AI changed the title [WIP] Create Sub Issue Add CreateSubIssue function to combine issue creation and sub-issue linking Aug 26, 2025
@Copilot Copilot AI requested a review from JaclynCodes August 26, 2025 19:21
Copilot finished work on behalf of JaclynCodes August 26, 2025 19:21
Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaclynCodes JaclynCodes self-requested a review August 26, 2025 21:35
Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

JaclynCodes added a commit that referenced this pull request Aug 27, 2025
@JaclynCodes JaclynCodes self-requested a review August 30, 2025 17:20
Copy link
Owner

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contributing
2 participants