https://github.com/uber-workflow/probot-app-delete-merged-branch
https://github.com/uber-workflow/probot-app-delete-merged-branch
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uber-workflow/probot-app-delete-merged-branch
- Owner: uber-workflow
- License: isc
- Created: 2018-10-09T18:39:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:22:41.000Z (almost 2 years ago)
- Last Synced: 2025-07-03T04:46:47.594Z (4 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# probot-app-delete-merged-branch
Forked from [https://github.com/SvanBoxel/delete-merged-branch](https://github.com/SvanBoxel/delete-merged-branch)
A GitHub app built with [Probot](https://github.com/probot/probot) that automatically deletes a branch after it's merged.
## Running it locally
1. First, follow [these instructions](https://probot.github.io/docs/development/#configure-a-github-app) for making your own GitHub app.
Give your app the following permissions:
- Repository contents: Read & Write.
- Pull requests: Read2. Then, clone the repo:
```sh
git clone git@github.com:uber-workflow/probot-app-delete-merged-branch.git
```3. Copy `.env.example` to `.env` and set the right environment variables as [here](https://probot.github.io/docs/development/#configure-a-github-app)
4. Now, install app dependencies and run it:
```sh
# Install dependencies
npm install# Run the bot
npm start
```## How it works
This GitHub app listens to the `pull_request.closed` webhook. If a pull request is closed and the connected branch is merged, it will delete the branch.