feat: add command that generates Git commands from natural language
Description
Add a command that generates Git commands from natural language. For example bin/glab git list commits create by Igor Drozdov
will explain and suggest running git log --author='Igor Drozdov'
command.
Related Issues
Related issue/epic: &10402
How has this been tested?
- Checkout on
id-git-command-endpoint
branch on Gitlab Rails:git checkout id-git-command-endpoint
: gitlab!118120 (merged) - Ensure Git Command feature is available to you:
- Feature flags
ai_git_command_ff
,ai_experimentation_api
,openai_experimentation
are enabled - You are a member of Ultimate project
- Feature flags
- Checkout on
id-add-git-command
branch (this Merge Request) in CLI - Run
make
, nowbin/glab
binary is available for you - Run
bin/glab auth login
, chooseGitLab Self-hosted Instance
and follow the steps to add your local env and local private token - Run the
git
command:GITLAB_HOST=127.0.0.1:3000 bin/glab git ask list 10 commit titles
:-
git
is the name of the command - All that goes after
git
is the natural language instructions that are sent to OpenAI
-
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Jay McCure