Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85680,8 +85680,10 @@ async function validateVeracodeApiCreds(inputs) {
owner: repo[0],
repo: repo[1],
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const checkStatic = {
owner: ownership.owner,
Expand Down Expand Up @@ -85741,8 +85743,10 @@ async function validatePolicyName(inputs) {
owner: repo[0],
repo: repo[1],
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const checkStatic = {
owner: ownership.owner,
Expand Down Expand Up @@ -86243,8 +86247,10 @@ async function preparePipelineResults(inputs) {
check_run_id: inputs.check_run_id,
status: Checks.Status.Completed,
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
if (!(0, inputs_1.vaildateScanResultsActionInput)(inputs)) {
core.setFailed('token, check_run_id and source_repository are required.');
Expand Down Expand Up @@ -86468,8 +86474,10 @@ const check_service_1 = __nccwpck_require__(42450);
const app_config_1 = __importDefault(__nccwpck_require__(971));
const http = __importStar(__nccwpck_require__(37542));
async function preparePolicyResults(inputs) {
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const repo = inputs.source_repository.split('/');
const ownership = {
Expand Down
4 changes: 4 additions & 0 deletions dist/services/application-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ async function validateVeracodeApiCreds(inputs) {
owner: repo[0],
repo: repo[1],
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const checkStatic = {
owner: ownership.owner,
Expand Down Expand Up @@ -222,8 +224,10 @@ async function validatePolicyName(inputs) {
owner: repo[0],
repo: repo[1],
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const checkStatic = {
owner: ownership.owner,
Expand Down
2 changes: 2 additions & 0 deletions dist/services/pipeline-results-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ async function preparePipelineResults(inputs) {
check_run_id: inputs.check_run_id,
status: Checks.Status.Completed,
};
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
if (!(0, inputs_1.vaildateScanResultsActionInput)(inputs)) {
core.setFailed('token, check_run_id and source_repository are required.');
Expand Down
2 changes: 2 additions & 0 deletions dist/services/policy-results-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ const check_service_1 = require("./check-service");
const app_config_1 = __importDefault(require("../app-config"));
const http = __importStar(require("../api/http-request"));
async function preparePolicyResults(inputs) {
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new rest_1.Octokit({
auth: inputs.token,
baseUrl: baseUrl
});
const repo = inputs.source_repository.split('/');
const ownership = {
Expand Down
6 changes: 5 additions & 1 deletion src/services/application-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ export async function validateVeracodeApiCreds(inputs: Inputs): Promise<string |
owner: repo[0],
repo: repo[1],
};


const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new Octokit({
auth: inputs.token,
baseUrl: baseUrl
});

const checkStatic: Checks.ChecksStatic = {
Expand Down Expand Up @@ -222,8 +224,10 @@ export async function validatePolicyName(inputs: Inputs): Promise<void> {
repo: repo[1],
};

const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new Octokit({
auth: inputs.token,
baseUrl: baseUrl
});

const checkStatic: Checks.ChecksStatic = {
Expand Down
2 changes: 2 additions & 0 deletions src/services/pipeline-results-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ export async function preparePipelineResults(inputs: Inputs): Promise<void> {
status: Checks.Status.Completed,
};

const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new Octokit({
auth: inputs.token,
baseUrl: baseUrl
});

// When the action is preparePolicyResults, need to make sure token,
Expand Down
2 changes: 2 additions & 0 deletions src/services/policy-results-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import * as VeracodeApplication from '../namespaces/VeracodeApplication';
import * as http from '../api/http-request';

export async function preparePolicyResults(inputs: Inputs): Promise<void> {
const baseUrl = process.env.GITHUB_API_URL || 'https://api.github.com';
const octokit = new Octokit({
auth: inputs.token,
baseUrl: baseUrl
});

const repo = inputs.source_repository.split('/');
Expand Down