-
Notifications
You must be signed in to change notification settings - Fork 1
github app
BrunoV21 edited this page Apr 11, 2025
·
1 revision
Git Recap integrates with GitHub through both GitHub Apps and Personal Access Tokens (PATs). The GitHub App provides a more secure and scalable authentication method with fine-grained permissions.
- Navigate to GitHub Marketplace
- Search for "Git Recap"
- Click "Install" and select:
- All repositories (recommended) or specific repositories
- Target organization or user account
- Create a new GitHub App in your organization:
https://github.com/organizations/YOUR_ORG/settings/apps/new
- Configure with these settings:
- Homepage URL:
https://your-git-recap-instance.com - Callback URL:
https://your-git-recap-instance.com/auth/callback - Webhook URL:
https://your-git-recap-instance.com/webhooks/github
- Homepage URL:
permissions:
metadata: read
contents: read
pull_requests: read
issues: read
commit_statuses: readsequenceDiagram
participant User
participant Frontend
participant Backend
participant GitHub
User->>Frontend: Clicks "Connect GitHub"
Frontend->>GitHub: Redirects to OAuth
GitHub->>User: Authorize permissions
User->>GitHub: Approves
GitHub->>Backend: Sends OAuth code
Backend->>GitHub: Exchanges code for token
Backend->>Frontend: Returns session ID
Frontend->>User: Shows connected status
For real-time updates, configure these webhook events:
-
pull_request(opened, closed, reopened) -
issues(opened, closed, reopened) push
Example payload URL:
https://your-api-domain.com/webhooks/github
When GitHub App isn't available, you can use a PAT with equivalent permissions:
- Generate PAT with:
-
reposcope (full access to private repos) -
read:orgscope (for organization visibility)
-
- Configure via API:
POST /api/v1/auth/pat { "token": "ghp_your_token_here", "provider": "github" }
| Issue | Solution |
|---|---|
| Missing repositories | Ensure App is installed on target org |
| Permission errors | Reinstall App with correct permissions |
| Rate limiting | Check API usage in GitHub settings |
| Webhook failures | Verify endpoint URL and secret |
- Check GitHub App logs:
https://github.com/organizations/YOUR_ORG/settings/apps/YOUR_APP/advanced
- Verify webhook deliveries
- Check backend logs for authentication errors
- Use different GitHub Apps for production/staging
- Rotate PATs every 90 days
- Monitor rate limits (5000 requests/hour for Apps)
- Restrict repository access to only what's needed