Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

borzecki/github-cleaner

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

github-cleaner

cleaning service for your dirty pull requests

Installation

Make sure you have python and python-pip installed. From the project folder run:

sudo pip install -r requirements.txt

Configuration

This tool uses PyGithub library for communication with GitHub. Authentication is handled by providing environmental variable GITHUB_TOKEN which should be generated using instructions from github help pages.

export GITHUB_TOKEN='{TOKEN}'

Usage

In order to clean your pull requests you'll also need to provide repository name and define filter function.

Hint

You can use this super secret command to get a list of all your repositories.

python github-cleaner list_repos

Provide filter function

Last step is to provide a function which will determine whether comment should be deleted. To do this simply overwrite method should_delete.

def should_delete(comment):
    return any([
        'Killer feature, ship it immediately' in comment.body,
        comment.user.login == 'borzecki'
    ]),

Now simply run this command with chosen repository:

python github-cleaner clean_pulls --name={REPOSITORY_NAME}

About

cleaning service for your dirty pull requests :octocat:

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.