Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pullRequestReviewers octokit deprecation error #956

Closed
vinayakkulkarni opened this issue Jun 16, 2021 · 2 comments
Closed

pullRequestReviewers octokit deprecation error #956

vinayakkulkarni opened this issue Jun 16, 2021 · 2 comments

Comments

@vinayakkulkarni
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. install ship.js 0.23.3
  2. in ship.config.js, add pullRequestReviewers: ['vinayakkulkarni']
  3. npm run release

Expected behavior
A new automated PR should be created with default reviewers.

Screenshots

remote:
remote: Create a pull request for 'releases/v0.1.0' on GitHub by visiting:
remote:      https://github.com/<redacted>/pull/new/releases/v0.1.0
remote:
To https://github.com/<redacted>
 * [new branch]      releases/v0.1.0 -> releases/v0.1.0
› Creating a pull request.
$ git remote prune origin
octokit.pulls.createReviewRequest() has been renamed to octokit.pulls.requestReviewers()
Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
    at RequestError.get (/Users/vinayak/Development/Work/OSS/<redacted>/node_modules/@octokit/request-error/dist-node/index.js:57:21)
    at Proxy.cli (/Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/src/cli.js:50:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/bin/shipjs:7:5
RequestError [HttpError]: Review cannot be requested from pull request author.
    at /Users/vinayak/Development/Work/OSS/<redacted>/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/src/step/prepare/createPullRequest.js:82:7
    at async default (/Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/src/step/prepare/createPullRequest.js:20:3)
    at async prepare (/Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/src/flow/prepare.js:112:30)
    at async Proxy.cli (/Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/src/cli.js:48:5)
    at async /Users/vinayak/Development/Work/OSS/<redacted>/node_modules/shipjs/bin/shipjs:7:5 {
  status: 422,

Environment (please complete the following information):

  • environment: (your local machine, CircleCI, Travis CI, etc.)
  • node -v: v16.3.0
  • npm -v: 7.17.0
  • Ship.js version: 0.23.3

Additional context
This is due to octokit's deprecation of createReviewRequest, instead it's requestReviewers

@eunjae-lee
Copy link
Contributor

Hello @vinayakkulkarni,
Although your PR seems correct, I don't think it will fix your issue.
That's just a warning, but the real error that stopped your release process was:

RequestError [HttpError]: Review cannot be requested from pull request author.

You're assigning yourself as a reviewer and GitHub doesn't allow it. That's why it failed.

@eunjae-lee
Copy link
Contributor

Feel free to reopen if needed :)

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

Successfully merging a pull request may close this issue.

2 participants