replace api.github.com to gitea.cn/api/v1
This commit is contained in:
parent
93397bea11
commit
0e0674b993
|
@ -6346,7 +6346,7 @@ var MediaTypes;
|
||||||
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
|
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
|
||||||
/**
|
/**
|
||||||
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
||||||
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
* @param serverUrl The server URL where the request will be sent. For example, https://gitea.cn/api/v1
|
||||||
*/
|
*/
|
||||||
function getProxyUrl(serverUrl) {
|
function getProxyUrl(serverUrl) {
|
||||||
const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
||||||
|
@ -6693,7 +6693,7 @@ class HttpClient {
|
||||||
/**
|
/**
|
||||||
* Gets an http agent. This function is useful when you need an http agent that handles
|
* Gets an http agent. This function is useful when you need an http agent that handles
|
||||||
* routing through a proxy server - depending upon the url and proxy environment variables.
|
* routing through a proxy server - depending upon the url and proxy environment variables.
|
||||||
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
* @param serverUrl The server URL where the request will be sent. For example, https://gitea.cn/api/v1
|
||||||
*/
|
*/
|
||||||
getAgent(serverUrl) {
|
getAgent(serverUrl) {
|
||||||
const parsedUrl = new URL(serverUrl);
|
const parsedUrl = new URL(serverUrl);
|
||||||
|
@ -8224,7 +8224,7 @@ exports.findAllVersions = findAllVersions;
|
||||||
function getManifestFromRepo(owner, repo, auth, branch = 'master') {
|
function getManifestFromRepo(owner, repo, auth, branch = 'master') {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let releases = [];
|
let releases = [];
|
||||||
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;
|
const treeUrl = `https://gitea.cn/api/v1/repos/${owner}/${repo}/git/trees/${branch}`;
|
||||||
const http = new httpm.HttpClient('tool-cache');
|
const http = new httpm.HttpClient('tool-cache');
|
||||||
const headers = {};
|
const headers = {};
|
||||||
if (auth) {
|
if (auth) {
|
||||||
|
@ -8425,7 +8425,7 @@ var MediaTypes;
|
||||||
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
|
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
|
||||||
/**
|
/**
|
||||||
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
||||||
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
* @param serverUrl The server URL where the request will be sent. For example, https://gitea.cn/api/v1
|
||||||
*/
|
*/
|
||||||
function getProxyUrl(serverUrl) {
|
function getProxyUrl(serverUrl) {
|
||||||
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
||||||
|
@ -8731,7 +8731,7 @@ class HttpClient {
|
||||||
/**
|
/**
|
||||||
* Gets an http agent. This function is useful when you need an http agent that handles
|
* Gets an http agent. This function is useful when you need an http agent that handles
|
||||||
* routing through a proxy server - depending upon the url and proxy environment variables.
|
* routing through a proxy server - depending upon the url and proxy environment variables.
|
||||||
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
* @param serverUrl The server URL where the request will be sent. For example, https://gitea.cn/api/v1
|
||||||
*/
|
*/
|
||||||
getAgent(serverUrl) {
|
getAgent(serverUrl) {
|
||||||
let parsedUrl = new URL(serverUrl);
|
let parsedUrl = new URL(serverUrl);
|
||||||
|
|
Loading…
Reference in New Issue