Skip to content

mikesir87/hackathon-july-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hackathon - Event-drive PR auto-closer

This project is a hackathon idea for an AI agent that analyzes a PR and determines if it should be auto-closed. If it should be, it generates a comment, adds the comment, and then closes the PR.

The use case is focused on training and tutorial repos where students often submit their work back to the repo. But, to ensure the training works for the next student, we can't accept the submission. This helps automate the handling of those PRs.

Architecture

The app uses the Mastra AI framework and works by using the following:

  • GitHub webhook - a webhook is triggered for any PR related events. The app only cares about PRs being opened or reopened.
  • PR Analyzer - this agent looks at the details of the PR to determine if the PR should be automatically closed
  • Comment generator - this agent will generate a comment, using details from the PR and why it's being closed. It's careful to educate, but still motivate.
  • PR Executor - this agent adds the comment and then closes the PR
  • MCP Gateway - the Docker MCP Gateway that provides the GitHub Official MCP server and provides only the tools needed for this app

And it's all packaged in the compose.yaml file!

Architecture diagram showing all of the components

Try it out

You will need Docker Desktop 4.43.1+. That's it!

  1. Clone this repo

    git clone https://github.com/mikesir87/hackathon-july-2025.git
    cd hackathon-july-2025
  2. Create a .env file, using the .env.sample file as a template:

    cp .env.sample .env
  3. Add a GitHub personal access token in the newly created .env file.

  4. Start the app using Docker Compose!

    docker compose up

    It may take a little while to download the models. Or, use Docker Offload to make things faster 😉

  5. Make a pull request against the mikesir87/temp-training-demo repo

    • I'll provide further instructions on how to tweak things to use your own repo in the future. Just ran out of time before the hackathon presentations!
  6. Watch the PR be analyzed!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors