Weekend Productivity Challenge: PR/Commit Digest Bot
AI powered weekly summary of your GitHub activity, built on AWS Bedrock
Vision & What the App Does
As a Site Reliability Engineer actively job hunting and juggling multiple open-source projects, I constantly lose track of what I actually shipped in a given week. Writing standup updates, prepping for interviews, or just reflecting on my own GitHub activity meant manually scrolling through commit history and mentally piecing together a narrative. I wanted something that could do that thinking for me.
The PR/Commit Digest Bot solves this by taking a GitHub repository and a lookback window, pulling the raw commit history via the GitHub REST API, and using a generative AI model to transform that list into a clean, themed summary and this helps in task prioritization as you do not have to go though all the PRs that have been made. From a user's perspective, it's dead simple: open the web app, enter a repo owner and name, click "Generate Digest," and get back a readable status update in seconds.
How I Built It
I started by scoping the problem down aggressively — a single input (owner/repo/date range) and a single output (a text digest), which let me finish the whole pipeline in a single sitting.
The biggest design decision was choosing Amazon Bedrock with the Nova Micro model over building my own summarization logic, since it's fast, cheap, and more than capable of this kind of structured text-to-text transformation. The main challenge was getting the S3-hosted frontend and the API Gateway backend to talk to each other cleanly — the browser's cross-origin request initially failed silently until I added an explicit CORS block to the API Gateway resource in Terraform:
resource "aws_apigatewayv2_api" "http_api" { name = "pr-digest-bot-api" protocol_type = "HTTP"
cors_configuration { allow_origins = ["*"] allow_methods = ["POST", "OPTIONS"] allow_headers = ["content-type"] }}I also kept IAM scoping tight, the Lambda execution role only has
bedrock:InvokeModel and CloudWatch logging permissions, following the least-privilege practice I use in my day job.AWS Services Used / Architecture Overview
- Amazon Bedrock (Nova Micro) — generates the themed digest from raw commit text
- AWS Lambda (Python 3.12) — orchestrates the GitHub API call and the Bedrock invocation
- Amazon API Gateway (HTTP API) — exposes the Lambda function as a public POST endpoint with CORS enabled
- Amazon S3 — hosts the static HTML/JS frontend as a public website
- IAM — a narrowly scoped execution role for the Lambda function
- Terraform — defines and deploys the entire stack as code
Architecture flow:
Browser (S3 static site) │ fetch() POST ▼API Gateway (HTTP API) │ ▼Lambda (Python) ├─→ GitHub REST API (fetch commits) └─→ Amazon Bedrock Nova Micro (summarize) │ ▼JSON response → rendered in browserThe core of the Lambda function that ties GitHub and Bedrock together:
def lambda_handler(event, context): body = json.loads(event.get("body") or "{}") owner, repo = body.get("owner"), body.get("repo") since_days = int(body.get("since_days", 7))
token = os.environ["GITHUB_TOKEN"] commits = get_github_commits(owner, repo, token, since_days) prompt = build_prompt(commits) digest = call_bedrock(prompt)
return { "statusCode": 200, "body": json.dumps({ "repo": f"{owner}/{repo}", "commit_count": len(commits), "digest": digest }) }I deliberately skipped Amplify and CloudFront to keep the stack minimal and fully expressible in raw Terraform.
Sample Output
To test the tool end-to-end, I ran it against the actively developed
kubernetes/kubernetes repository with a 3-day lookback window.Request:
curl -X POST https://gc6bo8xvhj.execute-api.us-east-1.amazonaws.com/digest \ -H "Content-Type: application/json" \ -d '{"owner": "kubernetes", "repo": "kubernetes", "since_days": 3}'Response:
{ "repo": "kubernetes/kubernetes", "commit_count": 30, "digest": "### Overview\nThe recent work focused on enhancing Kubernetes metrics, performance, and lifecycle operations. Several pull requests were merged to promote metrics.k8s.io to GA, improve storage metrics, and update the scheduler and other components for better performance and reliability.\n\n### Highlights\n- **Metrics and Performance Enhancements:**\n - Promoted metrics.k8s.io to GA.\n - Replaced TensorFlow with PyTorch workloads for performance improvements.\n - Improved API server metrics and storage metrics.\n\n- **Lifecycle Operations:**\n - Added lifecycle operation tests and hints for provider managers.\n - Implemented podGroup as victim scenario in pod preemption flow.\n\n- **Code Quality and Updates:**\n - Updated vendor libraries, including Ginkgo for better test coverage.\n - Refactored annotation removal factory for cleaner code.\n - Updated cAdvisor to version 0.60.4 for improved monitoring.\n\n- **Bug Fixes and Cleanups:**\n - Fixed issues related to resync after mutation cache TTL and RemoveAll operations.\n - Cleaned up SIG Apps features for better maintainability."}Terminal output:

UI:


Rather than dumping 30 raw commit messages, the tool distilled them into four coherent themes, exactly the kind of "actionable highlight" a busy engineer or manager would actually want to read.
The web UI produces the same result visually, with a form for owner/repo/API endpoint and a rendered digest panel below it, tested live at the deployed S3 URL.
What I Learned
I assumed Bedrock model access would be instant and frictionless, but I learned it requires explicit model access requests per-region in the console before any
InvokeModel calls succeed — a subtle setup step that would trip up first-time Bedrock users. I also got hands-on practice with API Gateway's newer HTTP API CORS configuration syntax, which is cleaner than the older REST API CORS setup.The most valuable lesson was realizing how little infrastructure a genuinely useful AI tool actually needs, no database, no queue, no complex orchestration, just one Lambda function calling one foundation model was enough to produce real value.
Links:
- Github repo: https://github.com/satyajit-dey-17/pr-digest-bot
- LinkedIn: https://www.linkedin.com/in/satyajit-/
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article