Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

gh fails to close PR randomly #678

Closed
dantewang opened this issue Sep 27, 2019 · 4 comments
Closed

gh fails to close PR randomly #678

dantewang opened this issue Sep 27, 2019 · 4 comments

Comments

@dantewang
Copy link

dantewang commented Sep 27, 2019

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 dantewang/liferay-portal#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).

@dantewang dantewang added the bug label Sep 27, 2019
@protoEvangelion
Copy link
Member

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
Copy link
Member

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

Got a fix in the works.

protoEvangelion pushed a commit to protoEvangelion/gh that referenced this issue Sep 30, 2019
Resolves bug report node-gh#678:
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)
@drewbrokke
Copy link
Contributor

drewbrokke commented Sep 30, 2019

+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 pushed a commit to protoEvangelion/gh that referenced this issue Oct 2, 2019
Resolves bug report node-gh#678:
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)
protoEvangelion pushed a commit that referenced this issue Oct 2, 2019
Resolves bug report #678:
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)
protoEvangelion pushed a commit that referenced this issue Oct 2, 2019
## [2.0.9](v2.0.8...v2.0.9) (2019-10-02)

### Bug Fixes

* **pull-request:** only add body when updating PR when body is truthy ([da8cdbf](da8cdbf)), closes [#678](#678)
@protoEvangelion
Copy link
Member

🎉 This PR is included in version 2.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants