In this tutorial, we will install git-bob
in the stackview
repository to demonstrate all steps necessary for this.
Afterwards, git-bob
can use AI to help developing stackview
.
The first step is to copy over the git-bob.yml
GitHub workflow from the folder .github/workflows/
in the git-bob
repository to the same folder in the stackview
repository.
We only need adapt one thing, we replace this line:
pip install -e .
by this one:
pip install git-bob==0.16.0
If your project does not contain a requirements.txt
file, remove the line pip install -r requirements.txt
.
We navigate to the openai API website and log in.
You find the API Key page by clicking on Dashbord
and API Keys
.
Click on Create new secret key
and enter a meaningful name.
Copy the key from this text field:
And navigate to the repository on github
https://github.com/<GITHUB ORGANIZATION>/<REPOSITORY>/settings/secrets/actions
In our case, we navigate to stackview
:
https://github.com/haesleinhuepf/stackview/settings/secrets/actions
Click on New repository secret
Enter the key name OPENAI_API_KEY
and paste the key into the value field.
In the menu on the right, under Actions / General, give read and write permissions to the Workflows using the GITHUB_TOKEN
and allow github actions to create and merge pull-requests.
Go back to the OpenAI API website and set a limit for the API key. With this you can make sure that the usage does not spend to much money:
Next, we navigate to the github repository and submit our changes as pull-request.
In this pull-request, enter git-bob comment
and it will review the pull-request in the new repository:
Wait a second and this box should appear indicating that the git-bob github action is running:
If the installation works, another box will appear after a minute with a review from git-bob:
After merging this pull-request, you can continue asking git-bob comment
in all pull-requests and issues in the repository.
In case of any issues while installing, please mention @haesleinhuepf
.