1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Update issues with Copilot via Copilot Creates Issues [Public Preview] (#58311)

Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
This commit is contained in:
Vanessa
2025-11-04 10:59:32 +10:00
committed by GitHub
parent a906b4f938
commit 73fdb6ebcb
5 changed files with 63 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ versions:
topics:
- Copilot
children:
- /use-copilot-to-create-issues
- /use-copilot-to-create-or-update-issues
- /create-a-pr-summary
- /use-copilot-in-the-cli
redirect_from:

View File

@@ -1,10 +1,10 @@
---
title: Using GitHub Copilot to create issues
shortTitle: Use Copilot to create issues
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.'
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>'
title: Using GitHub Copilot to create or update issues
shortTitle: Use Copilot to create or update issues
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.
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>
versions:
feature: copilot
feature: copilot-create-issues
topics:
- Copilot
- Issues
@@ -13,6 +13,7 @@ redirect_from:
- /copilot/using-github-copilot/using-github-copilot-to-create-issues
- /copilot/how-tos/github-flow/using-github-copilot-to-create-issues
- /copilot/how-tos/github-flow/use-copilot-to-create-issues
- /copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues
contentType: how-tos
category:
- Author and optimize with Copilot
@@ -21,9 +22,9 @@ category:
> [!NOTE]
> This feature is in {% data variables.release-phases.public_preview %} and subject to change.
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 repositorys issue forms or templates.
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 repositorys issue forms or templates.
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.
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.
## Creating an issue with {% data variables.product.prodname_copilot_short %}
@@ -102,7 +103,17 @@ For example, you can:
Once you've finished editing the drafts and are ready to publish the issues, click **Review and create** then click **Create issues**.
## Working with existing issues
## Updating an existing issue
You can use {% data variables.product.prodname_copilot_short %} to update existing issues in your repository.
For example:
`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.`
{% 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**.
## Working with existing parent issues and sub-issues
You can use {% data variables.product.prodname_copilot_short %} to connect new issues with issues that already exist in your repository.

View File

@@ -112,7 +112,7 @@ Now that youve generated and refined your project issues, you can assign them
## Further reading
* [AUTOTITLE](/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-issues)
* [AUTOTITLE](/copilot/how-tos/use-copilot-for-common-tasks/use-copilot-to-create-or-update-issues)
* [AUTOTITLE](/copilot/tutorials/coding-agent/pilot-coding-agent)
* [AUTOTITLE](/copilot/tutorials/coding-agent/get-the-best-results)
* [AUTOTITLE](/copilot/tutorials/speed-up-development-work)

View File

@@ -0,0 +1,7 @@
# Reference: #19182
# Copilot create issues public beta
versions:
fpt: '*'
ghec: '*'
ghes: '>= 3.20'

View File

@@ -8,6 +8,21 @@ interface DataSchemas {
[key: string]: string
}
// Helper function to resolve schema paths based on runtime context
function resolveSchemaPath(filename: string): string {
// Check if we're in a test context
const isTest = process.env.NODE_ENV === 'test'
if (isTest) {
// Use relative paths that work for vitest and 4.x compatibility with
// dynamic imports in particular
return `../lib/data-schemas/${filename}`
} else {
// Use absolute paths that work for content linter and other contexts
return `@/data-directory/lib/data-schemas/${filename}`
}
}
// Auto-discover table schemas from data/tables/ directory
function loadTableSchemas(): DataSchemas {
const tablesDir = path.join(process.cwd(), 'data/tables')
@@ -22,8 +37,8 @@ function loadTableSchemas(): DataSchemas {
const schemaPath = path.join(schemasDir, `${name}.ts`)
if (fs.existsSync(schemaPath)) {
// Use relative path from test file for vitest 4.x compatibility with dynamic imports
tableSchemas[`data/tables/${yamlFile}`] = `../lib/data-schemas/tables/${name}.ts`
// Use the resolver for consistent path handling
tableSchemas[`data/tables/${yamlFile}`] = resolveSchemaPath(`tables/${name}.ts`)
}
}
}
@@ -32,15 +47,14 @@ function loadTableSchemas(): DataSchemas {
}
// Manual schema registrations for non-table data
// Use relative paths from the test file for vitest 4.x compatibility with dynamic imports
const manualSchemas: DataSchemas = {
'data/features': '../lib/data-schemas/features.ts',
'data/variables': '../lib/data-schemas/variables.ts',
'data/learning-tracks': '../lib/data-schemas/learning-tracks.ts',
'data/release-notes': '../lib/data-schemas/release-notes.ts',
'data/code-languages.yml': '../lib/data-schemas/code-languages.ts',
'data/glossaries/candidates.yml': '../lib/data-schemas/glossaries-candidates.ts',
'data/glossaries/external.yml': '../lib/data-schemas/glossaries-external.ts',
'data/features': resolveSchemaPath('features.ts'),
'data/variables': resolveSchemaPath('variables.ts'),
'data/learning-tracks': resolveSchemaPath('learning-tracks.ts'),
'data/release-notes': resolveSchemaPath('release-notes.ts'),
'data/code-languages.yml': resolveSchemaPath('code-languages.ts'),
'data/glossaries/candidates.yml': resolveSchemaPath('glossaries-candidates.ts'),
'data/glossaries/external.yml': resolveSchemaPath('glossaries-external.ts'),
}
// Combine manual registrations with auto-discovered table schemas