node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

gh fails to close PR randomly #678

Closed dantewang closed 5 years ago

dantewang commented 5 years ago

Describe the bug Sometimes gh fails to close PRs with the following output:

Closing pull request #1319
Error: Error closing PR
Error: Can't close pull request 1319.
HttpError: 'body' cannot be null
    at main (/usr/lib/node_modules/gh/lib/cmds/pull-request.js:164:23)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

The PR in this log can be found at https://github.com/dantewang/liferay-portal/pull/1319

To Reproduce Here are my steps:

  1. Either run gh pr 1319 --close or gh pr -s someone on a pr-xx branch
  2. See error

Not sure how to make it reproducible for others. Expected behavior gh closes the PR without any error

Additional context This started to happen recently, maybe within 1 month (at most 2 months).

protoEvangelion commented 5 years ago

Thanks for reporting @dantewang

Are you on latest version? 2.0.7?

Here is what I ran and I didn't have any issue:

image

Is there any other info you can provide?

protoEvangelion commented 5 years ago

Actually I was able to repro using a branch name with pr-2.

Got a fix in the works.

drewbrokke commented 5 years ago

+1 for this issue. It's failing pretty consistently for me.

✅ Works on v1.17.5 🚫 Fails on v2.0.1 and on v2.0.7

protoEvangelion commented 5 years ago

:tada: This PR is included in version 2.0.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket: