@actions/github
Advanced tools
Comparing version 5.1.1 to 6.0.0
@@ -14,4 +14,4 @@ "use strict"; | ||
if (process.env.GITHUB_EVENT_PATH) { | ||
if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { | ||
this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); | ||
if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { | ||
this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); | ||
} | ||
@@ -34,3 +34,4 @@ else { | ||
this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; | ||
this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; | ||
this.graphqlUrl = | ||
(_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; | ||
} | ||
@@ -37,0 +38,0 @@ get issue() { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -17,3 +21,3 @@ if (k2 === undefined) k2 = k; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
@@ -35,5 +39,5 @@ return result; | ||
const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); | ||
return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options)); | ||
return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); | ||
} | ||
exports.getOctokit = getOctokit; | ||
//# sourceMappingURL=github.js.map |
/// <reference types="node" /> | ||
import * as http from 'http'; | ||
import { OctokitOptions } from '@octokit/core/dist-types/types'; | ||
import { ProxyAgent, fetch } from 'undici'; | ||
export declare function getAuthString(token: string, options: OctokitOptions): string | undefined; | ||
export declare function getProxyAgent(destinationUrl: string): http.Agent; | ||
export declare function getProxyAgentDispatcher(destinationUrl: string): ProxyAgent | undefined; | ||
export declare function getProxyFetch(destinationUrl: any): typeof fetch; | ||
export declare function getApiBaseUrl(): string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -17,9 +21,19 @@ if (k2 === undefined) k2 = k; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; | ||
exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; | ||
const httpClient = __importStar(require("@actions/http-client")); | ||
const undici_1 = require("undici"); | ||
function getAuthString(token, options) { | ||
@@ -40,2 +54,15 @@ if (!token && !options.auth) { | ||
exports.getProxyAgent = getProxyAgent; | ||
function getProxyAgentDispatcher(destinationUrl) { | ||
const hc = new httpClient.HttpClient(); | ||
return hc.getAgentDispatcher(destinationUrl); | ||
} | ||
exports.getProxyAgentDispatcher = getProxyAgentDispatcher; | ||
function getProxyFetch(destinationUrl) { | ||
const httpDispatcher = getProxyAgentDispatcher(destinationUrl); | ||
const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { | ||
return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); | ||
}); | ||
return proxyFetch; | ||
} | ||
exports.getProxyFetch = getProxyFetch; | ||
function getApiBaseUrl() { | ||
@@ -42,0 +69,0 @@ return process.env['GITHUB_API_URL'] || 'https://api.github.com'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -17,3 +21,3 @@ if (k2 === undefined) k2 = k; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
@@ -35,3 +39,4 @@ return result; | ||
request: { | ||
agent: Utils.getProxyAgent(baseUrl) | ||
agent: Utils.getProxyAgent(baseUrl), | ||
fetch: Utils.getProxyFetch(baseUrl) | ||
} | ||
@@ -38,0 +43,0 @@ }; |
{ | ||
"name": "@actions/github", | ||
"version": "5.1.1", | ||
"version": "6.0.0", | ||
"description": "Actions github lib", | ||
@@ -41,10 +41,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@actions/http-client": "^2.0.1", | ||
"@octokit/core": "^3.6.0", | ||
"@octokit/plugin-paginate-rest": "^2.17.0", | ||
"@octokit/plugin-rest-endpoint-methods": "^5.13.0" | ||
"@actions/http-client": "^2.2.0", | ||
"@octokit/core": "^5.0.1", | ||
"@octokit/plugin-paginate-rest": "^9.0.0", | ||
"@octokit/plugin-rest-endpoint-methods": "^10.0.0" | ||
}, | ||
"devDependencies": { | ||
"proxy": "^1.0.2" | ||
"proxy": "^2.1.1" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23610
331
+ Added@octokit/auth-token@4.0.0(transitive)
+ Added@octokit/core@5.2.0(transitive)
+ Added@octokit/endpoint@9.0.5(transitive)
+ Added@octokit/graphql@7.1.0(transitive)
+ Added@octokit/openapi-types@20.0.022.2.0(transitive)
+ Added@octokit/plugin-paginate-rest@9.2.1(transitive)
+ Added@octokit/plugin-rest-endpoint-methods@10.4.1(transitive)
+ Added@octokit/request@8.4.0(transitive)
+ Added@octokit/request-error@5.1.0(transitive)
+ Added@octokit/types@12.6.013.6.1(transitive)
- Removed@octokit/auth-token@2.5.0(transitive)
- Removed@octokit/core@3.6.0(transitive)
- Removed@octokit/endpoint@6.0.12(transitive)
- Removed@octokit/graphql@4.8.0(transitive)
- Removed@octokit/openapi-types@12.11.0(transitive)
- Removed@octokit/plugin-paginate-rest@2.21.3(transitive)
- Removed@octokit/plugin-rest-endpoint-methods@5.16.2(transitive)
- Removed@octokit/request@5.6.3(transitive)
- Removed@octokit/request-error@2.1.0(transitive)
- Removed@octokit/types@6.41.0(transitive)
- Removedis-plain-object@5.0.0(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updated@actions/http-client@^2.2.0
Updated@octokit/core@^5.0.1