You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to choose the output type of the copilot command (JSON for example) to be able to parse the result easily.
For example for a script to generate messages for git commit.
Relevant terminal output
$ gh copilot suggest "write a commit message for the x.go file following this modification $(git diff x.go)"
{ "suggest_result": "Update ttt function ....." }
With this, we can have a script like this:
#!/bin/bash
files=$(git status --porcelain | awk '{print $2}')forfilein$files;doecho"Analise file: $file"
prompt="Write a commit message for this file $file with this modification $(git diff $file)"
commit_message=$(gh copilot suggest --json $prompt| jq -r '.suggest_result')echo"Commit message for $file: $commit_message"done
The text was updated successfully, but these errors were encountered:
Describe the need
I would like to be able to choose the output type of the copilot command (JSON for example) to be able to parse the result easily.
For example for a script to generate messages for git commit.
Relevant terminal output
With this, we can have a script like this:
The text was updated successfully, but these errors were encountered: