Coder Social home page Coder Social logo

twbs / no-carrier Goto Github PK

View Code? Open in Web Editor NEW
132.0 8.0 23.0 72 KB

Tool to auto-close old GitHub issues that were abandoned by their reporter

Home Page: http://blog.getbootstrap.com/2015/08/04/no-carrier/

License: MIT License

Scala 98.00% Shell 2.00%

no-carrier's Introduction

NO CARRIER

Build Status Development Status :: 4 - Beta MIT License

NO CARRIER is a tool to auto-close old GitHub issues and pull requests that were abandoned by their reporter, which is to say that we were waiting for a response from the reporter but never got a response in a reasonable amount of time.

Named after the message indicating that your dial-up modem has lost its connection.

Motivation

You're a member of a popular open source project. Cool.

But due to the project's popularity, you get lots of bug reports on the issue tracker, and often these reports are lacking key information that's explicitly mentioned in your bug reporting docs as being required. Or maybe you just need extra information or test results from the bug reporter. So, okay, you post nice reply comments on the issues, asking the reporters for the information or requesting that they do some investigation/tests.

And then you wait for a reply. Unfortunately, for whatever reason, a surprisingly large fraction of folks never end up replying to your questions/requests. So unactionable issues start to pile up. You occasionally review the oldest batch of such issues and close them manually.

By automating the process of closing abandoned issues, the issue tracker is kept clean with less tedium on the part of issue triagers. The abandoned issue expiration policy is also applied more uniformly/fairly, and it's easier to use a canonical template for the closing issue comment that clearly and politely explains the reason for the closure.

Example of the bot in action: Screenshot of the bot closing an issue

Used by

Usage

NO CARRIER is designed to be run as a cron job.

Java 8+ is required to run NO CARRIER. You can download NO CARRIER's prebuilt assembly JAR from our GitHub Releases page. For instructions on building NO CARRIER yourself from source, see the Contributing docs.

NO CARRIER requires 2 environment variables to be set:

  • $GITHUB_USERNAME - Username of GitHub user for NO CARRIER to login as
  • $GITHUB_PASSWORD - Password of GitHub user for NO CARRIER to login as

NO CARRIER accepts exactly 3 command line arguments. Once you have the JAR, run e.g. java -jar no-carrier.jar <owner/repo> <label> <days>. Here's what each of the arguments is:

  • owner/repo: GitHub repo whose issues will be operated upon (example: twbs/bootstrap for Bootstrap)
  • label: Name of label used on the repo's GitHub issue tracker to indicate that the issue is blocked waiting for a reply from a user (typically the issue's original poster).
  • days: Integer number of days. If at least this number of days elapses after an issue has been labeled without any new comment being posted, NO CARRIER will close the issue and post an explanatory comment.

Heroku

We also have specific instructions for setting up NO CARRIER on Heroku, courtesy of @zxqfox.

Pull requests

NO CARRIER closes old pull requests according to the same rules it uses to close old issues. This is possible since GitHub treats issues and pull requests as different variations of the same underlying object.

License

NO CARRIER is released under the MIT License.

Acknowledgments

We all stand on the shoulders of giants and get by with a little help from our friends. NO CARRIER is written in Scala and built on top of:

See also

no-carrier's People

Contributors

cevaris avatar cvrebert avatar dwijnand avatar raxod502 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

no-carrier's Issues

Allow customizing explanatory comment

I'd like to use some different text for the explanatory comment that is posted when an issue is closed. However, currently the only way to do that is to fork the repository and build from source. It would be much more convenient to allow exporting an optional environment variable to override the explanatory comment.

Does it close pull requests as well?

I know that GitHub treats issues and pull requests as part of the same internal system, so it doesn't seem implausible to me that NO CARRIER automatically closes both, even though it only explicitly mentions issues.

If this is true, then I would recommend mentioning it in the documentation (I could provide a pull request for this); otherwise, I guess this is a feature request—auto-closing pull requests is also very useful.

IllegalStateException(event of type 'closed') error at runtime

Hey everybody

I've set everything up but I keep getting this error each time:

#latestEvent('closed'): thrown java.lang.IllegalStateException(event of type 'closed')

Issues have never been closed/reopened before, account has correct privileges (I can do everything manually) but can't seem to automate it. It's a private repository, in case that changes anything. Login is successful since I see issues being listed. This is the log, just repeating itself with different #:

2017-03-01 14:41:40,034 [INFO ] com.getbootstrap.no_carrier.Main$ - Checking issue #1196 ...
2017-03-01 14:42:01,461 [ERROR] com.jcabi.github.Issue$Smart - #latestEvent('closed'): thrown java.lang.IllegalStateException(event of type 'closed' not found in issue #1196) out of com.jcabi.github.Issue$Smart#latestEvent_aroundBody40[391] in 16s
2017-03-01 14:42:08,538 [ERROR] com.jcabi.github.Issue$Smart - #latestEvent('reopened'): thrown java.lang.IllegalStateException(event of type 'reopened' not found in issue #1196) out of com.jcabi.github.Issue$Smart#latestEvent_aroundBody40[391] in 7s
.2017-03-01 14:42:19,600 [INFO ] com.getbootstrap.no_carrier.Main$ - GitHub rate limit status: [4653/5000] (resets @ 1970-01-18T05:26:20.011Z)
2017-03-01 14:42:19,600 [INFO ] com.getbootstrap.no_carrier.Main$ - Checking issue #1107 ...

No Bean Validation provider could be found

Hi,

I've downloaded the .jar file from the releases page.
Then I've tried to run it, but I get the following error:

2017-02-01 13:09:00,143 [ERROR] com.jcabi.aspects.aj.MethodValidator - JSR-303 validator failed to initialize: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. (see http://aspects.jcabi.com/jsr-303.html)

Console output:

2017-02-01 21:25:25,776 [ERROR] com.jcabi.aspects.aj.MethodValidator - JSR-303 validator failed to initialize: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. (see http://aspects.jcabi.com/jsr-303.html)
2017-02-01 21:25:25,802 [INFO ] com.getbootstrap.no_carrier.Main$ - Started session.
2017-02-01 21:25:25,910 [INFO ] com.getbootstrap.no_carrier.Main$ - Repo(test/test), Credentials(username = test, password = <SECRET>), Label(auto closed), Timeout(PT5760H)
2017-02-01 21:25:27,220 [INFO ] com.getbootstrap.no_carrier.Main$ - Closed 0 issues.
2017-02-01 21:25:27,220 [INFO ] com.getbootstrap.no_carrier.Main$ - Session complete; exiting.

Permission Denied on Heroku

bash: ./cron.daily.sh: Permission denied

$ heroku run ./cron.daily.sh
Running ./cron.daily.sh on hacke2323uieu23r... starting, run.3251 (Free)
Running ./cron.daily.sh on hacke2323uieu23r... connecting, run.3251 (Free)
Running ./cron.daily.sh on hacke2323uieu23r... up, run.3251 (Free)
bash: ./cron.daily.sh: Permission denied

image


Ping @cvrebert 👍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.