Skip to content

chore(deps): replace github with @octokit/rest #270

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

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

mmarchini
Copy link
Contributor

github has been renamed to @octokit/rest. Also bumped to ^v15 as there were no significant breaking changes before ^v16. Upgrading to v16 will require more effort on our side, including:

  • Change all GitHub API calls from callback-style to Promise-style
  • Rework tests so we don't use sinon to replace GitHub methods as sinon will prevents GitHub deprecation warnings. Use nock instead
  • Increase test coverage to include all GitHub API calls
  • Fix deprecation warnings (preferably one by one so it's easier to revert if the bot breaks)

Ref: https://github.com/octokit/rest.js/releases/tag/v14.0.0
Ref: https://github.com/octokit/rest.js/releases/tag/v15.0.1

`github` has been renamed to `@octokit/rest`. The version sequence was
kept, and the package name is the only breaking change on v14.0.0.

Ref: https://github.com/octokit/rest.js/releases/tag/v14.0.0
Only breaking change on v15.0.1 is to `DELETE` calls, which we don't
use.

Ref: https://github.com/octokit/rest.js/releases/tag/v15.0.1
Copy link
Member

@phillipj phillipj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

@mmarchini mmarchini merged commit 84c5ed2 into nodejs:master Aug 5, 2020
@mmarchini mmarchini deleted the octokit branch August 5, 2020 03:17
@phillipj
Copy link
Member

phillipj commented Aug 5, 2020

FYI had my hopes this update would get rid of the deprecation email we've been getting to the @nodejs-github-bot' email, unfortunately not;

Hi @nodejs-github-bot,

On August 5th, 2020 at 04:53 (UTC) your personal access token (General github-bot token) using Node.js GitHub Bot v1.0-beta octokit.js/15.18.3 was used as part of a query parameter to access an endpoint through the GitHub API:

https://api.github.com/repositories/27193779/pulls/34629/files

Please use the Authorization HTTP header instead, as using the `access_token` query parameter is deprecated. If this token is being used by an app you don't have control over, be aware that it may stop working as a result of this deprecation.

Depending on your API usage, we'll be sending you this email reminder on a monthly basis for each token and User-Agent used in API calls made on your behalf.
Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

Visit https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param for more information about suggested workarounds and removal dates.

Thanks,
The GitHub Team

@mmarchini
Copy link
Contributor Author

That'll take some more upgrades (which is on my list :) )

@phillipj
Copy link
Member

phillipj commented Aug 5, 2020 via email

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 this pull request may close these issues.

3 participants