Update to the latest version of @actions/github.
This commit is contained in:
parent
55458a1ab1
commit
9ed519fa12
419 changed files with 56978 additions and 151535 deletions
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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: {},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue