Update to the latest version of @actions/github.

This commit is contained in:
Chris Gavin 2020-09-18 15:40:23 +01:00
parent 55458a1ab1
commit 9ed519fa12
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
419 changed files with 56978 additions and 151535 deletions

View file

@ -1,4 +1,4 @@
import * as github from "@actions/github";
import * as github from "@actions/github/lib/utils";
import consoleLogLevel from "console-log-level";
import * as path from "path";

View file

@ -27,12 +27,12 @@ function mockGetContents(
content: GetContentsResponse
): sinon.SinonStub<any, any> {
// Passing an auth token is required, so we just use a dummy value
const client = new github.GitHub("123");
const client = github.getOctokit("123");
const response = {
data: content,
};
const spyGetContents = sinon
.stub(client.repos, "getContents")
.stub(client.repos, "getContent")
.resolves(response as any);
sinon.stub(api, "getApiClient").value(() => client);
return spyGetContents;
@ -40,7 +40,7 @@ function mockGetContents(
function mockListLanguages(languages: string[]) {
// Passing an auth token is required, so we just use a dummy value
const client = new github.GitHub("123");
const client = github.getOctokit("123");
const response = {
data: {},
};

View file

@ -1023,7 +1023,7 @@ async function getRemoteConfig(
const response = await api
.getApiClient(githubAuth, githubUrl, true)
.repos.getContents({
.repos.getContent({
owner: pieces.groups.owner,
repo: pieces.groups.repo,
path: pieces.groups.path,