CLI de Copilot puede abrir incidencias de GitHub por ti desde el terminal. En lugar de abrir el navegador y rellenar una incidencia a mano, describes lo que quieres y Copilot recopila contexto de tu repositorio y de GitHub, y luego crea la incidencia para que puedas seguir trabajando.
Escenario de ejemplo 1: Presentación de un problema a partir de un error de CI
Tu CI está fallando o has detectado errores en los registros de producción. En lugar de rastrear manualmente el stack trace hasta dar con un commit, le pides a CLI de Copilot que investigue y registre la incidencia por ti.
Mensaje de ejemplo
The CI workflow on main has been failing since yesterday. Look at the failing run, figure out what's breaking and which commit likely introduced it, then create an issue with the stack trace, a link to the failing run, and the suspected PR that caused it. Label it "bug" and "regression".
The CI workflow on main has been failing since yesterday. Look at the failing
run, figure out what's breaking and which commit likely introduced it, then
create an issue with the stack trace, a link to the failing run, and the
suspected PR that caused it. Label it "bug" and "regression".
Respuesta de ejemplo
Nota:
La respuesta siguiente es un ejemplo. Las respuestas de Chat de Copiloto no son deterministas, por lo que puedes obtener una respuesta diferente a la aquí mostrada.
CLI de Copilot usa sus herramientas de MCP de GitHub para:
-
Recupere la ejecución fallida del flujo de trabajo y extraiga la traza de pila de los registros.
-
Identifique el código responsable , por ejemplo,
src/services/payment.ts:94. -
Busque commits recientes que afecten a ese archivo y encuentre la PR que introdujo ese cambio.
-
Cree un problema con todo el contexto ensamblado:
Created issue #421: Regression: PaymentService throws TypeError after #398 What's failing: The `build` job on main has failed since commit `a3f7c21`. Stack trace: TypeError: Cannot read properties of undefined (reading 'amount') at processRefund (src/services/payment.ts:94:22) Introduced by: PR #398 (merged 2 days ago) refactored the payment types but missed updating `processRefund` to handle the new nullable `transaction` field. Failing run: Actions run #2847 Suggested fix: Add a null check for `transaction` before accessing `transaction.amount` on line 94. Labels: `bug`, `regression`
Escenario de ejemplo 2: Convertir TODOs en trabajo gestionado
Con el tiempo, los comentarios TODO y FIXME se acumulan en un código base sin visibilidad. Puede pedir que CLI de Copilot examine estos comentarios, evalúe la prioridad y cree problemas para que se realice el seguimiento del trabajo.
Mensaje de ejemplo
Scan this repo for TODO and FIXME comments. Group them by area, pick the 5 most important ones based on the surrounding code context, and create an issue for each. Include the code snippet, file location, and suggest a label.
Scan this repo for TODO and FIXME comments. Group them by area, pick the 5
most important ones based on the surrounding code context, and create an issue
for each. Include the code snippet, file location, and suggest a label.
Respuesta de ejemplo
Nota:
La respuesta siguiente es un ejemplo. Las respuestas de Chat de Copiloto no son deterministas, por lo que puedes obtener una respuesta diferente a la aquí mostrada.
CLI de Copilot busca en el código base, lee el contexto en torno a cada comentario y da prioridad en función de la gravedad:
Found 23 TODO/FIXME comments across the repo. Here are the 5 I'd prioritize:
Created issue #422: FIXME: SQL injection risk in search query builder
- src/db/search.ts:34 — user input concatenated directly into query string
- Label: security, priority:high
Created issue #423: TODO: Rate limiter bypassed for internal routes
- src/middleware/rate_limit.ts:12 — comment says "temporary bypass, remove before launch"
- Label: security, technical-debt
Created issue #424: FIXME: Memory leak in WebSocket handler
- src/ws/handler.ts:87 — listeners are added on each connection but never cleaned up
- Label: bug, performance
Created issue #425: TODO: Retry logic missing for payment webhook
- src/webhooks/payment.ts:56 — failures silently dropped, no retry queue
- Label: reliability, priority:medium
Created issue #426: TODO: Migrate to new auth token format
- src/auth/token.ts:3 — comment references a closing down API version
- Label: technical-debt