GitHub
Connect GitHub repositories to OpenAnalyst to analyze commits, issues, pull requests, and contributor activity. Automate reports from GitHub events and build code analytics dashboards.
Connecting GitHub
OpenAnalyst connects to GitHub via OAuth to read repository data. The integration supports both public and private repositories, and works with GitHub.com (cloud). GitHub Enterprise Server support is available on Max and Enterprise plans.
- In the sidebar, navigate to Integrations.
- Find GitHub in the integrations list and click Connect.
- You will be redirected to GitHub to authorize the OpenAnalyst app. Review the requested permissions and click Authorize OpenAnalyst.
- After authorization, you are returned to OpenAnalyst. Select the repositories you want to analyze by checking them in the repository picker.
- Click Save configuration to complete the connection.
Note: OpenAnalyst requests read-only access to repository data. It does not request write permissions and cannot modify your code or settings.
Analyzing Repository Data
Once connected, OpenAnalyst continuously syncs data from your selected repositories and makes it available for querying and visualization. The following data types are available:
| Data Type | Description |
|---|---|
| Commits | Commit history including author, timestamp, message, files changed, and lines added/removed. |
| Pull Requests | PR status, creation time, merge time, reviewers, and linked issues. |
| Issues | Open/closed issues, labels, assignees, time-to-close, and comment counts. |
| Contributors | Contributor activity over time, lines of code, commit frequency, and PR participation. |
| Releases | Release history, associated tags, and changelog content. |
| Branches | Active branches, last commit date, and merge status. |
This data is available in the Data Explorer, where you can write SQL-style queries against it, and in the AI Chat interface, where you can ask natural-language questions such as:
- "Which contributors had the most commits last month?"
- "What is the average time to merge a pull request this quarter?"
- "Show me the number of open issues by label over the past 30 days."
GitHub Actions Integration
OpenAnalyst can be triggered from GitHub Actions workflows to automatically generate reports or run AI agents when specific events occur in your repository.
Example: Automatically generate a sprint summary report when a milestone is closed.
# .github/workflows/openanalyst-milestone-report.yml
name: Generate Sprint Report
on:
milestone:
types: [closed]
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Trigger OpenAnalyst Report
run: |
curl -X POST https://api.openanalyst.com/v1/agents/run \
-H "Authorization: Bearer ${{ secrets.OPENANALYST_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_sprint_summary",
"task": "Generate a sprint summary for milestone: ${{ github.event.milestone.title }}",
"context": {
"repository": "${{ github.repository }}",
"milestone": "${{ github.event.milestone.number }}"
}
}'Tip: Store your OpenAnalyst API key as a GitHub Actions secret (Settings > Secrets and variables > Actions) and reference it as ${{ secrets.OPENANALYST_API_KEY }} rather than hardcoding it in your workflow file.
Setting Up Webhooks
For real-time event processing, configure a GitHub webhook to push events directly to OpenAnalyst:
- In your GitHub repository, go to Settings > Webhooks > Add webhook.
- In the OpenAnalyst Integrations > GitHub settings, copy your Webhook URL.
- Paste the URL into the GitHub webhook Payload URL field.
- Set the content type to
application/json. - Copy the Webhook Secret from OpenAnalyst and paste it into the GitHub webhook secret field.
- Select the events to subscribe to (for example: push, pull_request, issues, release).
- Click Add webhook to save.
After the webhook is configured, OpenAnalyst will process events in real time and update your datasets and dashboards accordingly. You can also configure rules to trigger AI agent runs or send notifications when specific webhook events occur.
Code Analytics Dashboards
OpenAnalyst provides a set of pre-built GitHub dashboard templates to get you started quickly:
- Repository Overview — Commits per day, active contributors, open issues, and PR merge rate over the past 30 days.
- Contributor Activity — Per-contributor commit frequency, code churn, and PR review participation.
- Issue Tracker Health — Issue backlog growth/shrinkage, average time to close by label, and issue resolution trends.
- Pull Request Cycle Time — Time from PR creation to merge, broken down by reviewer and repository.
- Release Cadence — Release frequency over time and days between major/minor/patch releases.
To use a template, go to Dashboards > New Dashboard > From Template and filter by the GitHub category. Select a template, choose the connected repository as the data source, and click Create Dashboard.