A Go service for managing callbacks for new Github Issues using Echo, and OpenAPI validation.
✅ REST API with Echo and OpenAPI validation
✅ All handler signatures, request and response types are generated automatically
from api/openapi.yaml via codegen
✅ Clean layered architecture (handlers, app layer, API layer)
✅ Structured logging with slog
✅ request ID, and timeout middleware
✅ Structured error handling
✅ Easily testable architecture
Fill out the required fields:
- GitHub App name:
Issue Estimate Reminder Bot - Description:
Automatically reminds users to add time estimates to new issues - Homepage URL: A URL of your project (or a github link) | Your repository URL |
- Webhook URL:
https://smee.io/YOUR_CHANNEL_ID(you get a new channel ID when you visit smee.io for the first time) - Webhook secret |
your-secret-key-123, a secret key of your choice
In the "Permissions" section:, at Repository Permissions, for Issues select Read and write
In the "Subscribe to events" section, Check "Issues" only
Choose where the app can be installed:
- Select:
Only on this account(recommended for testing) - Alternative:
Any account(if you want others to install it)
- Click "Create GitHub App" button
- Download the private key when prompted
- File will be named something like
your-app-name.2024-01-01.private-key.pem - Save this file safely - you can't download it again!
- File will be named something like
- Note your App ID from the settings page (shows after creation)
- In your GitHub App settings page
- Click "Install App" in left sidebar
- Select your account
- Choose installation type:
- All repositories - Bot works on all your repos
- Only select repositories - Choose specific repos
- Click "Install" button
After installation, you'll see a URL like:
https://github.com/settings/installations/12345678
The number 12345678 is your Installation ID - save this!
- Go 1.22+
make
- Clone the repository.
- Install dependencies:
go mod download - cd into the project directory:
cd estimate - Copy
.env.exampleto.env: - fill in the environment variables at
.envwith the values you got from the previous step. The pem file you can store in a single line by replacing new lines with\n. Example of how that line would look like in.env:
GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAoCeB+vlcUYilkl0ubl+ws7o930eeC2HyUKDRcL8dToXpzLqf\n4mN1p3Kyb4FIvm03LDSKjbvdhsXiuEM519+NdQDk8fmZljj+6B1EDA==\n-----END RSA PRIVATE KEY-----"
- Start the server:
make devThe service will be accessible at:
http://localhost:8080
Then you can go ahead and create issues in your repository.If they contain a text in the body with the pattern Estimate: <number of hours> days the bot will remind you to add an estimate.
make testgenerate: # Generates code: mocks, openapi...The API is defined in api/openapi.yaml.
✅ All handler signatures, request and response types are generated automatically via codegen from this file.
✅ Ensures strict request/response validation and consistency across API changes.
✅ Use this file to understand the full API surface or generate client SDKs for integration.