Skip to content
Merged
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
29 changes: 1 addition & 28 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44882,33 +44882,6 @@ axios.default = axios;
// this module should only have a default export
/* harmony default export */ const lib_axios = (axios);

;// CONCATENATED MODULE: ./node_modules/axios/index.js


// This module is intended to unwrap Axios default export as named.
// Keep top-level export same with static properties
// so that it can keep same with es module or cjs
const {
Axios: axios_Axios,
AxiosError: axios_AxiosError,
CanceledError: axios_CanceledError,
isCancel: axios_isCancel,
CancelToken: axios_CancelToken,
VERSION: axios_VERSION,
all: axios_all,
Cancel,
isAxiosError: axios_isAxiosError,
spread: axios_spread,
toFormData: axios_toFormData,
AxiosHeaders: axios_AxiosHeaders,
HttpStatusCode: axios_HttpStatusCode,
formToJSON,
getAdapter,
mergeConfig: axios_mergeConfig
} = lib_axios;



;// CONCATENATED MODULE: ./src/index.js


Expand All @@ -44921,7 +44894,7 @@ async function validateSubscription() {
try {
await lib_axios.get(API_URL, { timeout: 3000 });
} catch (error) {
if (axios_isAxiosError(error) && error.response) {
if (error.response && error.response.status === 403) {
core.error(
'Subscription is not valid. Reach out to support@stepsecurity.io'
);
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import core, { getInput, setOutput, setFailed } from '@actions/core';
import { Octokit } from '@octokit/core';
import fetch from 'node-fetch';
import axios, { isAxiosError } from 'axios';
import axios from 'axios';

async function validateSubscription() {
const API_URL = `https://agent.api.stepsecurity.io/v1/github/${process.env.GITHUB_REPOSITORY}/actions/subscription`;

try {
await axios.get(API_URL, { timeout: 3000 });
} catch (error) {
if (isAxiosError(error) && error.response) {
if (error.response && error.response.status === 403) {
core.error(
'Subscription is not valid. Reach out to support@stepsecurity.io'
);
Expand Down
Loading