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

Update octokit version #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Jcc20
Copy link

@Jcc20 Jcc20 commented Feb 13, 2023

This PR updates octokit version to the latest and updates the respective dependencies.

It also updates some octokit methods according to latest version.

src/client.js Outdated
import { differenceBy, get, has } from 'lodash';
import Github from '@octokit/rest';

/**
* GitHub configuration.
*/

const config = {

Choose a reason for hiding this comment

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

No need to have this config object anymore. Just create a timeout constant (or defaultTimeout based on the next comment).

Besides that, as a suggestion, it could just be a default value in case the constructor does not receive a specified timeout value. You would have something like this:

constructor({ timeout, token, ...options }) {
    this.github = new Octokit({
        auth: token,
        request: { timeout: timeout || defaultTimeout },
        ...options
    });
}


err.status = 404;
throw err;
});

Choose a reason for hiding this comment

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

Add a break line here.

@Jcc20 Jcc20 force-pushed the enhancement/ocktokit-upgrade branch 2 times, most recently from aaa69dc to f738ef5 Compare February 16, 2023 15:00
.babelrc Outdated Show resolved Hide resolved
dist/index.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@bsonntag bsonntag changed the title Update octokitversion Update octokit version Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants