npm/gh-issues

Name: gh-issues

Owner: npm

Description: Batch close github issues.

Created: 2017-06-16 22:11:55.0

Updated: 2018-01-22 18:48:46.0

Pushed: 2018-01-28 23:20:00.0

Homepage: null

Size: 14

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Batch Github Issue Closer

We had an unusual need. 1000s of issues we wanted to close on our issue tracker. So I wrote this code to do that. I talked about this project in a blog post, so if you're wondering more about the reasoning that's the place to look.

list.js asks github for every issue that's open, has no assignee and no milestone and generates issue-list.ndjson and pr-list.ndjson from that. These are newline delimited JSON files.

Each of support-issues.js, unlabeled-issues.js, old-issues.js read issue-list.ndjson and print out issue ids of issues that meet our closing criteria.

Finally, close-issues.js takes a label name and a message file, and reading a list of ids from standard input closes each issue, labels it and adds a comment with the contents of the message file.

Currently close-issues.js waits four seconds after labeling the issue, four after adding a comment and four after closing the issue. These delays are necessary to avoid Github's undocumented abuse filters for actions that trigger notifications.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.