Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ritesh22201/github-app
This Github app allow users to execute the code when they make a pull requests with the command '/execute' in commit message or comment.
https://github.com/ritesh22201/github-app
dotenv google-generative-ai nodejs probot
Last synced: 4 days ago
JSON representation
This Github app allow users to execute the code when they make a pull requests with the command '/execute' in commit message or comment.
- Host: GitHub
- URL: https://github.com/ritesh22201/github-app
- Owner: ritesh22201
- License: isc
- Created: 2023-11-01T07:08:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-02T05:06:04.000Z (about 1 year ago)
- Last Synced: 2024-11-01T05:06:55.358Z (about 2 months ago)
- Topics: dotenv, google-generative-ai, nodejs, probot
- Language: JavaScript
- Homepage: https://github-code-execution.onrender.com
- Size: 83 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# GitHub Code Execution App
**Description**: A GitHub App that executes code in pull requests.
## Table of Contents
- [Files and Folders to explore](#files-and-folders-to-explore)
- [Project Presentation Video](#project-presentation-video)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Code Execution API Integration](#code-execution-api-integration)
- [Known Issues](#known-issues)
- [Troubleshooting](#troubleshooting)
- [Author and Contact Information](#author-and-contact-information)
- [Acknowledgments](#acknowledgments)## Files and Folders to explore
```
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.
## Project Presentation Video
[Video Presentation Link](https://drive.google.com/file/d/1gnjvUwR_-G3UZqAb7s1a9B25BmgNmSid/view?usp=sharing)
## Installation
Installation instructions here.
1. Clone this repository to your local machine:
```bash
git clone https://github.com/ritesh22201/github-app.git
```2. Navigate to the project directory:
```bash
cd github-code-execution-app
```3. Install the project dependencies:
```bash
npm install
```## Configuration
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## Usage
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.
## Code Execution API Integration
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.## Known Issues
The application is working partially.
## Troubleshooting
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 and Contact Information
- **Author**: Ritesh Goswami
- **Email**: [email protected]
- **GitHub**: [ritesh22201](https://github.com/ritesh22201)## Acknowledgments
Special thanks to the Probot, Google for providing the open-source resources to the community.