Skip to content

Commit 73fdb6e

Browse files
vgrlrsese
andauthored
Update issues with Copilot via Copilot Creates Issues [Public Preview] (#58311)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
1 parent a906b4f commit 73fdb6e

File tree

5 files changed

+63
-31
lines changed

5 files changed

+63
-31
lines changed

content/copilot/how-tos/use-copilot-for-common-tasks/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ versions:
77
topics:
88
- Copilot
99
children:
10-
- /use-copilot-to-create-issues
10+
- /use-copilot-to-create-or-update-issues
1111
- /create-a-pr-summary
1212
- /use-copilot-in-the-cli
1313
redirect_from:

content/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues.md renamed to content/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-or-update-issues.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Using GitHub Copilot to create issues
3-
shortTitle: Use Copilot to create issues
4-
intro: 'Use {% data variables.product.prodname_copilot_short %} to quickly generate structured, high-quality issues from natural language or images, without filling out every field manually.'
5-
permissions: 'Anyone with a {% data variables.product.prodname_copilot_short %} license can use {% data variables.product.prodname_copilot_short %} to create issues. <br> <a href="https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=button&ref_plan=free" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Try {% data variables.product.prodname_copilot_short %} for free</span> {% octicon "link-external" height:16 %}</a>'
2+
title: Using GitHub Copilot to create or update issues
3+
shortTitle: Use Copilot to create or update issues
4+
intro: Use {% data variables.product.prodname_copilot_short %} to quickly generate structured, high-quality issues from natural language or images, without filling out every field manually.
5+
permissions: Anyone with a {% data variables.product.prodname_copilot_short %} license can use {% data variables.product.prodname_copilot_short %} to create issues or update existing issues. <br> <a href="https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=button&ref_plan=free" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Try {% data variables.product.prodname_copilot_short %} for free</span> {% octicon "link-external" height:16 %}</a>
66
versions:
7-
feature: copilot
7+
feature: copilot-create-issues
88
topics:
99
- Copilot
1010
- Issues
@@ -13,17 +13,18 @@ redirect_from:
1313
- /copilot/using-github-copilot/using-github-copilot-to-create-issues
1414
- /copilot/how-tos/github-flow/using-github-copilot-to-create-issues
1515
- /copilot/how-tos/github-flow/use-copilot-to-create-issues
16+
- /copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues
1617
contentType: how-tos
17-
category:
18+
category:
1819
- Author and optimize with Copilot
1920
---
2021

2122
> [!NOTE]
2223
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
2324
24-
Creating issues manually can be repetitive and time-consuming. With {% data variables.product.prodname_copilot_short %}, you can create issues faster by prompting in natural language, or even by uploading a screenshot. {% data variables.product.prodname_copilot_short %} fills out the title, body, labels, assignees, and more, using your repository’s issue forms or templates.
25+
Creating or updating issues manually can be repetitive and time-consuming. With {% data variables.product.prodname_copilot_short %}, you can create or update issues faster by prompting in natural language, or even by uploading a screenshot. {% data variables.product.prodname_copilot_short %} fills out the title, body, labels, assignees, and more, using your repository’s issue forms or templates.
2526

26-
You stay in control of the process. You can review and refine what {% data variables.product.prodname_copilot_short %} suggests before you submit the new issue.
27+
You stay in control of the process. You can review and refine what {% data variables.product.prodname_copilot_short %} suggests before you submit the new or updated issue.
2728

2829
## Creating an issue with {% data variables.product.prodname_copilot_short %}
2930

@@ -88,26 +89,36 @@ For example:
8889

8990
{% data variables.product.prodname_copilot_short %} generates a draft issue tree, with a parent issue at the top level and sub-issues beneath it.
9091

91-
You can review the issue tree, expand or collapse sub-issues, and edit the details of each issue.
92+
You can review the issue tree, expand or collapse sub-issues, and edit the details of each issue.
9293

9394
Click the parent issue to view its details in the workbench. The parent issue displays a list of sub-issues, and you can click each one to view and edit its details in the workbench. From a sub-issue, use the "Parent" dropdown to navigate through the issue tree. You can also click **Review and create** at the top of the workbench to see the full issue tree and navigate directly to any issue.
9495

9596
{% data variables.product.prodname_copilot_short %} can modify the tree, by unlinking issues or by attaching new drafts.
9697

9798
For example, you can:
98-
* Remove a sub-issue from the issue tree:
99+
* Remove a sub-issue from the issue tree:
99100
`Remove sub-issue NAME_OF_ISSUE from the issue tree`
100101
* Add an additional sub-issue to the issue tree:
101102
`Add an additional sub-issue with ISSUE_DETAILS to the issue tree`
102103

103104
Once you've finished editing the drafts and are ready to publish the issues, click **Review and create** then click **Create issues**.
104105

105-
## Working with existing issues
106+
## Updating an existing issue
107+
108+
You can use {% data variables.product.prodname_copilot_short %} to update existing issues in your repository.
109+
110+
For example:
111+
112+
`In octo-org/octo-repo, update issue #123 to add more details about the bug and steps to reproduce it. Also, change the label to "bug" and assign it to @username.`
113+
114+
{% data variables.product.prodname_copilot_short %} drafts the updated issue, which you can review and edit in the workbench. To publish the changes, click **Update**.
115+
116+
## Working with existing parent issues and sub-issues
106117

107118
You can use {% data variables.product.prodname_copilot_short %} to connect new issues with issues that already exist in your repository.
108119

109120
For example, you can:
110-
* Add a sub-issue to an existing parent issue:
121+
* Add a sub-issue to an existing parent issue:
111122
`Create a sub-issue for octo-org/octo-repo issue #456.`
112123
* Add a parent issue to an existing issue:
113124
`Create a parent issue for octo-org/octo-repo issue #456.`

content/copilot/tutorials/plan-a-project.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ With the repository set up, you can use {% data variables.product.prodname_copil
5353

5454
### Create an epic issue
5555

56-
1. Enter a detailed project description as your prompt. For example:
56+
1. Enter a detailed project description as your prompt. For example:
5757
```I’m planning to create a shopping website in React and Node.js. The site should allow users to browse products by category, search for items, add products to a cart, and complete checkout. Please help me plan the project by creating issues and breaking it down into epics, features, and tasks.```
5858
1. Submit your prompt. {% data variables.product.prodname_copilot_short %} will generate an issue tree, typically with an epic at the top and sub-issues for each main feature or task
5959

@@ -62,14 +62,14 @@ With the repository set up, you can use {% data variables.product.prodname_copil
6262
## Navigate the issue tree
6363

6464
1. Click the epic to view its details in the workbench. Navigate through the workbench to explore the issue tree.
65-
1. Each issue typically includes a title and description. Additional metadata such as labels or assignees, can be edited directly in the workbench.
65+
1. Each issue typically includes a title and description. Additional metadata such as labels or assignees, can be edited directly in the workbench.
6666
1. You can expand or collapse sub-issues to focus on specific parts of the project.
6767

6868
The issue tree provides a clear overview of your project structure, making it easy to navigate between epics, features, and tasks.
6969

7070
1. In this first iteration of the draft, {% data variables.product.prodname_copilot_short %} may generate only high-level issues. You can refine these issues further by breaking them down into smaller tasks or features. Let's refine the issue "Feature: UI Skeleton and Navigation".
7171

72-
Prompt {% data variables.product.prodname_copilot_short %} with:
72+
Prompt {% data variables.product.prodname_copilot_short %} with:
7373
```Can you break down the issue "Feature: UI Skeleton and Navigation" into smaller tasks?```
7474

7575
{% data variables.product.prodname_copilot_short %} will generate multiple new sub-issues such as:
@@ -79,20 +79,20 @@ With the repository set up, you can use {% data variables.product.prodname_copil
7979
* Task: Integrate navigation with routing
8080
* Task: Add basic responsive layout
8181

82-
1. Repeat this process for the remaining feature issues in the epic.
82+
1. Repeat this process for the remaining feature issues in the epic.
8383

8484
![Screenshot of the Copilot Chat workbench. The workbench displays an issue tree with an epic at the top and several sub-issues beneath it.](/assets/images/help/copilot/copilot-creates-sub-issues-workbench.png)
8585

8686
### Improve issue descriptions
8787

8888
After you finish generating the issue tree you may notice that {% data variables.product.prodname_copilot_short %}’s issue descriptions may be brief or unclear. To make them actionable, refine each issue as needed.
8989

90-
1. Start with the newly generated issue such as "Task: Create placeholder pages for main routes".
90+
1. Start with the newly generated issue such as "Task: Create placeholder pages for main routes".
9191

92-
Prompt {% data variables.product.prodname_copilot_short %} with:
92+
Prompt {% data variables.product.prodname_copilot_short %} with:
9393
```Can you improve the description for “Task: Create placeholder pages for main routes”? Please provide a detailed technical summary, list the main routes to be included, outline the steps for implementation, and specify what should be delivered for this task. Please add any relevant code snippets.```
9494

95-
1. {% data variables.product.prodname_copilot_short %} will generate a new version of the draft issue "Task: Create placeholder pages for main routes."
95+
1. {% data variables.product.prodname_copilot_short %} will generate a new version of the draft issue "Task: Create placeholder pages for main routes."
9696

9797
At the top-left of the issue, click the versioning drop-down and select **Version 2** to review the new changes.
9898
1. Review and decide whether to keep {% data variables.product.prodname_copilot_short %}’s revised version, edit further, or prompt again for more detail. {% data variables.product.prodname_copilot_short %} can add code snippets into the draft to improve clarity and provide immediate context for these issues.
@@ -112,7 +112,7 @@ Now that you’ve generated and refined your project issues, you can assign them
112112

113113
## Further reading
114114

115-
* [AUTOTITLE](/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues)
115+
* [AUTOTITLE](/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-or-update-issues)
116116
* [AUTOTITLE](/copilot/tutorials/coding-agent/pilot-coding-agent)
117117
* [AUTOTITLE](/copilot/tutorials/coding-agent/get-the-best-results)
118118
* [AUTOTITLE](/copilot/tutorials/speed-up-development-work)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference: #19182
2+
# Copilot create issues public beta
3+
4+
versions:
5+
fpt: '*'
6+
ghec: '*'
7+
ghes: '>= 3.20'

src/data-directory/lib/data-schemas/index.ts

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ interface DataSchemas {
88
[key: string]: string
99
}
1010

11+
// Helper function to resolve schema paths based on runtime context
12+
function resolveSchemaPath(filename: string): string {
13+
// Check if we're in a test context
14+
const isTest = process.env.NODE_ENV === 'test'
15+
16+
if (isTest) {
17+
// Use relative paths that work for vitest and 4.x compatibility with
18+
// dynamic imports in particular
19+
return `../lib/data-schemas/${filename}`
20+
} else {
21+
// Use absolute paths that work for content linter and other contexts
22+
return `@/data-directory/lib/data-schemas/${filename}`
23+
}
24+
}
25+
1126
// Auto-discover table schemas from data/tables/ directory
1227
function loadTableSchemas(): DataSchemas {
1328
const tablesDir = path.join(process.cwd(), 'data/tables')
@@ -22,8 +37,8 @@ function loadTableSchemas(): DataSchemas {
2237
const schemaPath = path.join(schemasDir, `${name}.ts`)
2338

2439
if (fs.existsSync(schemaPath)) {
25-
// Use relative path from test file for vitest 4.x compatibility with dynamic imports
26-
tableSchemas[`data/tables/${yamlFile}`] = `../lib/data-schemas/tables/${name}.ts`
40+
// Use the resolver for consistent path handling
41+
tableSchemas[`data/tables/${yamlFile}`] = resolveSchemaPath(`tables/${name}.ts`)
2742
}
2843
}
2944
}
@@ -32,15 +47,14 @@ function loadTableSchemas(): DataSchemas {
3247
}
3348

3449
// Manual schema registrations for non-table data
35-
// Use relative paths from the test file for vitest 4.x compatibility with dynamic imports
3650
const manualSchemas: DataSchemas = {
37-
'data/features': '../lib/data-schemas/features.ts',
38-
'data/variables': '../lib/data-schemas/variables.ts',
39-
'data/learning-tracks': '../lib/data-schemas/learning-tracks.ts',
40-
'data/release-notes': '../lib/data-schemas/release-notes.ts',
41-
'data/code-languages.yml': '../lib/data-schemas/code-languages.ts',
42-
'data/glossaries/candidates.yml': '../lib/data-schemas/glossaries-candidates.ts',
43-
'data/glossaries/external.yml': '../lib/data-schemas/glossaries-external.ts',
51+
'data/features': resolveSchemaPath('features.ts'),
52+
'data/variables': resolveSchemaPath('variables.ts'),
53+
'data/learning-tracks': resolveSchemaPath('learning-tracks.ts'),
54+
'data/release-notes': resolveSchemaPath('release-notes.ts'),
55+
'data/code-languages.yml': resolveSchemaPath('code-languages.ts'),
56+
'data/glossaries/candidates.yml': resolveSchemaPath('glossaries-candidates.ts'),
57+
'data/glossaries/external.yml': resolveSchemaPath('glossaries-external.ts'),
4458
}
4559

4660
// Combine manual registrations with auto-discovered table schemas

0 commit comments

Comments
 (0)