Description: A GitHub App that executes code in pull requests.
- Files and Folders to explore
- Project Presentation Video
- Installation
- Configuration
- Usage
- Code Execution API Integration
- Known Issues
- Troubleshooting
- Author and Contact Information
- Acknowledgments
root
├── index.js - Default route installed with Probot library.
├── main.js - My main route.
└── code - My folder
├── generateExecutedCode.js
└── getPullRequestCode.js
Please checkout main.js file, and code folder where I have written all the code.
Installation instructions here.
-
Clone this repository to your local machine:
git clone https://github.com/ritesh22201/github-app.git
-
Navigate to the project directory:
cd github-code-execution-app
-
Install the project dependencies:
npm install
Create a .env file in the project root directory with the following content:
- APP_ID=YOUR_GITHUB_APP_ID
- PRIVATE_KEY=YOUR_GITHUB_APP_PRIVATE_KEY
- WEBHOOK_SECRET=YOUR_GITHUB_APP_WEBHOOK_SECRET
- GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY
Ensure your GitHub App is installed in your GitHub repository.
Create a pull request with the command /execute in the pull request body, comments, or commit messages.
The app will automatically detect the command and execute the code within the pull request.
The code execution output will be posted as a comment in the pull request.
The GitHub Code Execution App integrates with the following external packages:
- Probot: Used for handling GitHub events and interactions.
- @google-ai/generativelanguage: Provides AI-powered code execution capabilities.
- google-auth-library: Enables authentication with the Google API.
- dotenv: Helps manage environment variables.
The application is working partially.
If you encounter any issues or have questions, please feel free to reach out to me for assistance. You can find contact information in the "Author and Contact Information" section below.
- Author: Ritesh Goswami
- Email: riteshgoswami22201@gmail.com
- GitHub: ritesh22201
Special thanks to the Probot, Google for providing the open-source resources to the community.