@credal/actions 0.2.26 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
});
|
9
9
|
};
|
10
10
|
import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
11
|
-
import * as github from "@actions/github";
|
12
11
|
// Limits on the number of results to return
|
13
12
|
const MAX_CODE_RESULTS = 15;
|
14
13
|
const MAX_COMMITS = 10;
|
@@ -18,10 +17,11 @@ const MAX_FILES_PER_PR = 5;
|
|
18
17
|
const MAX_PATCH_LINES = 20;
|
19
18
|
const MAX_FRAGMENT_LINES = 20;
|
20
19
|
const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
20
|
+
const { getOctokit } = yield import("@actions/github");
|
21
21
|
if (!authParams.authToken) {
|
22
22
|
throw new Error(MISSING_AUTH_TOKEN);
|
23
23
|
}
|
24
|
-
const octokit =
|
24
|
+
const octokit = getOctokit(authParams.authToken);
|
25
25
|
const { organization, repository, query } = params;
|
26
26
|
// Search CODE with text match metadata
|
27
27
|
const codeResultsResponse = yield octokit.rest.search.code({
|