Automatically monitor GitHub API usage and receive alerts when rate limits are running low.
This project is a production-grade proof of concept (POC) that tracks your GitHub API rate limits and notifies your team (via email) when they fall below a specified threshold (e.g., 200 remaining calls).
It combines a GitHub App (for secure JWT auth), an Azure Function (to retrieve access tokens and API data), and a Logic App (for orchestration and notification).
GitHub imposes rate limits on its API usage, which can disrupt workflows if exceeded. By proactively monitoring the remaining rate limit, you can:
- Avoid CI/CD failures
- Maintain data pipeline integrity
- Alert your team early and mitigate downtime
To follow this setup, you will need:
- An Azure Subscription with permissions to create Logic Apps and Function Apps
- A GitHub Organization or repo where you can create a GitHub App
- Azure CLI and Visual Studio Code with Azure Functions extension
- Azure Key Vault for securely storing secrets like
.pemkeys
Follow these steps in order:
-
Create GitHub App Set up an App with minimal permissions and download the
.pemfile -
Configure Azure Key Vault Store your
.pemfile securely and allow access to Logic App -
Deploy Azure Function This function will use the
.pemto generate a JWT and fetch GitHub tokens -
Create Logic App Orchestrates the process and sends alerts via email
-
Troubleshooting Tips Debug common issues, check deployment results, test integrations
- This is ideal for DevOps teams, internal platform squads, and automation-focused orgs
- Supports extensions like: Microsoft Teams alerts, custom alert thresholds, Log Analytics integration
- Install a GitHub App
- GitHub Rate Limit Docs
- Azure Logic Apps Overview
- Azure Function App Docs
- Azure Keyvault Secret Set
- GitHub Apps Installation ID
Ready? Start with GitHub App Setup ✅