https://github.com/probot/no-response/issues/24 describes a problem where probot/no-response sometimes closes an issue without posting a comment. We suspect that probot/no-response is attempting to post a comment but is having the comment rejected by GitHub's abuse prevention rate limits, similar to the issue experienced by probot/stale in https://github.com/probot/stale/issues/26.
Proposed remedy
Following the approach implemented in https://github.com/probot/stale/pull/64, this pull request updates probot/no-response to first attempt to post the comment saying that it is closing the issue. If it successfully posts the comment, then it closes the issue. If an error occurs when posting the comment, it does not close the issue.
Install the local probot/no-response app on a repository on github.com
Ensure that the repository has an issue that has gone more than daysUntilClose without a response from the issue author
Test the behavior affected by this pull request:
[x] Run the sweep function and use Little Snitch to block the HTTP request that attempts to post the comment. Verify that the comment is not posted and the issue is not closed.
[x] Configure Little Snitch to allow all HTTP requests to flow in/out of the app. Run the sweep function and verify that it leaves a comment and closes the issue.
Fixes #24 ... probably 🤞
Context
https://github.com/probot/no-response/issues/24 describes a problem where probot/no-response sometimes closes an issue without posting a comment. We suspect that probot/no-response is attempting to post a comment but is having the comment rejected by GitHub's abuse prevention rate limits, similar to the issue experienced by probot/stale in https://github.com/probot/stale/issues/26.
Proposed remedy
Following the approach implemented in https://github.com/probot/stale/pull/64, this pull request updates probot/no-response to first attempt to post the comment saying that it is closing the issue. If it successfully posts the comment, then it closes the issue. If an error occurs when posting the comment, it does not close the issue.
Verification process
Using a locally-running instance of probot/no-response:
daysUntilClose
without a response from the issue authorsweep
function and use Little Snitch to block the HTTP request that attempts to post the comment. Verify that the comment is not posted and the issue is not closed.sweep
function and verify that it leaves a comment and closes the issue./cc @lee-dohm for review