Você pode fazer ao Copilot Chat perguntas específicas sobre o seu projeto ou perguntas gerais sobre software. Você também pode pedir ao Copilot Chat para escrever código, corrigir erros, escrever testes e documentar código.
Use as guias acima para selecionar o ambiente em que você está usando o Copilot Chat.
Alguns dos prompts de exemplo exigem que você esteja em um contexto específico no site do GitHub. Para saber mais sobre como acessar esses contextos, confira Como fazer perguntas ao Copilot Chat em contextos diferentes.
Fazer perguntas gerais sobre software
Você pode fazer ao Copilot Chat perguntas gerais sobre software. Por exemplo:
tell me about nodejs web server frameworks
how to create an express app
what is the best way to update an npm package
Fazer perguntas sobre um repositório
Você pode fazer ao Copilot Chat perguntas sobre um repositório. Por exemplo:
what is the purpose of this repository?
When was the most recent release?
Where is rate limiting implemented in our API?
What was the last merged PR by USERNAME
Fazer perguntas sobre um arquivo ou símbolo específico
Você pode fazer perguntas ao Copilot Chat sobre um arquivo ou símbolo específico. Por exemplo:
what sorting algorithm does this function use
how are these files related
what is the purpose of this function
Fazer perguntas sobre uma base de dados de conhecimento
Você pode fazer perguntas ao Copilot Chat sobre uma base de dados de conhecimento. Por exemplo:
How do I deploy a new application?
What's the process for creating a new REST API?
What are our best practices for logging?
Fazer perguntas sobre uma parte de código específica
Você pode fazer perguntas ao Copilot Chat sobre uma parte de código específica. Você pode fazer uma pergunta sobre um arquivo inteiro ou sobre uma linha específica. Por exemplo:
Se você estiver fazendo perguntas sobre um arquivo inteiro, poderá digitar:
Explain this file.
How could I improve this code?
How can I test this script?
Se você estiver questionando sobre linhas específicas, poderá digitar:
Explain the function at the selected lines.
How could I improve this class?
Add error handling to this code.
Write a unit test for this method.
Fazer perguntas sobre alertas do GitHub Advanced Security
Você pode fazer ao Copilot Chat perguntas sobre alertas de segurança em repositórios em sua organização do GitHub Advanced Security (code scanning, secret scanning, and Dependabot alerts). Por exemplo:
How would I fix this alert?
How many alerts do I have on this pull request?
Which line of code is this code scanning alert referencing?
What library is affected by this Dependabot alert?
Fazer perguntas ao Copilot Chat em uma pull request
Você pode fazer perguntas ao Copilot Chat em uma pull request. Sua pergunta pode estar relacionada a vários elementos da pull request, por exemplo:
Você pode solicitar um resumo das alterações na pull request:
Summarize this PR for me.
Summarize the comments in this PR.
Summarize the changes in this PR.
Você pode perguntar sobre as alterações em um arquivo específico na pull request:
What's the purpose of this file?
Why has this module been included?
Você pode perguntar sobre as alterações em uma linha específica na pull request:
What is "actorData" in this line?
Explain this "do..end" block.
Você pode perguntar por que um fluxo de trabalho falhou:
Tell me why this job failed
Suggest a fix for this error
Fazer perguntas ao Copilot Chat sobre um problema ou uma discussão específica
Você pode fazer perguntas ao Copilot Chat sobre um problema ou uma discussão específica. Por exemplo:
what is the purpose of this issue?
Fazer perguntas ao Copilot Chat sobre um commit específico
Faça perguntas ao Copilot Chat sobre um commit específico. Por exemplo:
what is the purpose of this commit?
what is the expected output of this commit?
what is the best way to test this commit?