# GitAuto AI
GitAuto is a GitHub coding agent that opens pull requests from backlog tickets for software engineering managers to complete more bug fixes and feature requests. Assign tasks to GitAuto first, and have people work on more complex tickets.
gitauto
, which also assigns GitAuto to the issue.New GitHub App
.GitHub App name
like GitAuto Dev {Your Name}
e.g. GitAuto Dev John
.Homepage URL
like http://localhost:8000
.Webhook URL
like https://gitauto.ngrok.dev/webhook
. GitHub requires HTTPS for the webhook URL, so we need to use ngrok or something similar instead of localhost
. GitHub sends webhook events (e.g. an issue is created) to the webhook URL and ngrok tunnels to localhost. You can update this URL later after setting up the ngrok tunnel.Webhook secret
with your preferred secret.Repository permissions
Actions
: Read & WriteChecks
: Read & WriteCommit statuses
: Read & WriteContents
: Read & WriteIssues
: Read & WritePull requests
: Read & WriteSecrets
: Read & WriteVariables
: Read & WriteWorkflows
: Read & WriteOrganization permissions
Members
: Read-onlySubscribe to events
Installation target
: CheckedMetadata
: CheckedCheck run
: CheckedCommit comment
: CheckedIssue comment
: CheckedIssues
: CheckedPull request
: CheckedPull request review
: CheckedPull request review comment
: CheckedPull request review thread
: CheckedPush
: CheckedStatus
: CheckedWhere can this GitHub App be installed?
and select Only on this account
.Create GitHub App
Generate a private key
and download the private key.Install App
page.https://github.com/settings/apps/{your-github-app-name}/installations
such as https://github.com/settings/apps/gitauto-for-dev/installations
.GitHub allows only a HTTPS URL for webhook events, so we need to use ngrok or something similar service to tunnel/forward the GitHub webhook events to your localhost.
ngrok.yml
in the root directory. It should contain authtoken: YOUR_NGROK_AUTH_TOKEN
and version: 2
.ngrok http --config=ngrok.yml --domain={your-endpoint-url} 8000
. Replace {your-endpoint-url}
with your own endpoint URL, so it looks like ngrok http --config=ngrok.yml --domain=gitauto.ngrok.dev 8000
.http://localhost:8000
.{your-endpoint-url}/webhook
like https://gitauto.ngrok.dev/webhook
as the webhook URL in the GitHub app settings as GitHub requires HTTPS for the webhook URL instead of HTTP.deactivate
to deactivate the virtual environment if you have activated it and not sure where you are.rm -rf venv
to remove the virtual environment if you have created it and not sure what's in it.python3 -m venv --upgrade-deps venv
to create a virtual environment.source venv/bin/activate
to activate the virtual environment. You will see (venv)
in the terminal. Note that you need to activate the virtual environment every time you open a new terminal.which python
, which pip
, and python --version
to check the Python version and make sure it points to the virtual environment.pip install -r requirements.txt
to install the dependencies..env
file.env
file from @hiroshinishio..env
file in the root directory.In .env
file, you need to set your own GH_PRIVATE_KEY
. Here's the step:
General
tab on the left.Private key
section. Generate a private key.base64 -i your/path/to/private-key.pem
to encode the private key to base64.GH_PRIVATE_KEY
field in your .env
file.uvicorn main:app --reload --port 8000 --log-level warning
to start the ASGI server and run main.py
with app
as the FastAPI instance.
--reload
is for auto-reloading the server when the code changes.--log-level warning
is to suppress the INFO logs.info
(default):(venv) rwest@Roshis-MacBook-Pro gitauto % uvicorn main:app --reload --port 8000
INFO: Will watch for changes in these directories: ['/Users/rwest/Repositories/gitauto']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [63742] using WatchFiles
INFO: Started server process [63744]
INFO: Waiting for application startup.
INFO: Application startup complete.
For communication (Slack), database (Supabase), payment (Stripe), and serverless functions (AWS Lambda), provide your preferred email to @hiroshinishio so that he can invite you to the local development environment.