Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2019-12-09 17:01:19 -0500
committereric sciple <ericsciple@users.noreply.github.com>2019-12-09 17:01:19 -0500
commitb750541d2b898eda75e8a36fbee698c9c1978599 (patch)
tree35ce09dc3b3a84157dcca9813f64c3413cf176e4
parenta3220f27da78ca8871a517f4c808a739a436833f (diff)
.
-rw-r--r--.github/workflows/test.yml36
-rw-r--r--dist/index.js92
-rw-r--r--src/git-source-provider.ts4
-rw-r--r--src/github-api-helper.ts (renamed from src/repository-api-helper.ts)4
4 files changed, 68 insertions, 68 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7876739..a485002 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,26 +12,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1 # todo: switch to v2
- - run: npm ci
- - run: npm run build
- - run: npm run format-check
- - run: npm run lint
- - run: npm run pack
- - run: npm run gendocs
- - name: Verify no unstaged changes
- run: __test__/verify-no-unstaged-changes.sh
+ - uses: actions/checkout@v2-beta
+ # - run: npm ci
+ # - run: npm run build
+ # - run: npm run format-check
+ # - run: npm run lint
+ # - run: npm run pack
+ # - run: npm run gendocs
+ # - name: Verify no unstaged changes
+ # run: __test__/verify-no-unstaged-changes.sh
- test:
- strategy:
- matrix:
- runs-on: [ubuntu-latest, macos-latest, windows-latest]
- runs-on: ${{ matrix.runs-on }}
+ # test:
+ # strategy:
+ # matrix:
+ # runs-on: [ubuntu-latest, macos-latest, windows-latest]
+ # runs-on: ${{ matrix.runs-on }}
- steps:
- # Clone this repo
- - name: Checkout
- uses: actions/checkout@v1 # todo: switch to V2
+ # steps:
+ # # Clone this repo
+ # - name: Checkout
+ # uses: actions/checkout@v1 # todo: switch to V2
# Basic checkout
- name: Basic checkout
diff --git a/dist/index.js b/dist/index.js
index 52679ff..f6bf49e 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -4807,7 +4807,7 @@ const gitCommandManager = __importStar(__webpack_require__(289));
const io = __importStar(__webpack_require__(1));
const path = __importStar(__webpack_require__(622));
const refHelper = __importStar(__webpack_require__(227));
-const repositoryApiHelper = __importStar(__webpack_require__(610));
+const githubApiHelper = __importStar(__webpack_require__(464));
const authConfigKey = `http.https://github.com/.extraheader`;
function getSource(settings) {
return __awaiter(this, void 0, void 0, function* () {
@@ -4844,7 +4844,7 @@ function getSource(settings) {
yield prepareExistingDirectory(git, settings.repositoryPath, repositoryUrl, settings.clean);
}
if (!git || `${1}` == '1') {
- yield repositoryApiHelper.download(settings.accessToken, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.repositoryPath);
+ yield githubApiHelper.downloadRepository(settings.accessToken, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.repositoryPath);
}
else {
// Initialize the repository
@@ -8065,6 +8065,50 @@ exports.RequestError = RequestError;
/***/ }),
+/***/ 464:
+/***/ (function(__unusedmodule, exports, __webpack_require__) {
+
+"use strict";
+
+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());
+ });
+};
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
+ result["default"] = mod;
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const github = __importStar(__webpack_require__(469));
+const IS_WINDOWS = process.platform === 'win32';
+function downloadRepository(accessToken, owner, repo, ref, repositoryPath) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const octokit = new github.GitHub(accessToken);
+ const params = {
+ archive_format: IS_WINDOWS ? 'zipball' : 'tarball',
+ owner: owner,
+ repo: repo,
+ ref: ref
+ };
+ const response = yield octokit.repos.getArchiveLink(params);
+ console.log(`status=${response.status}`);
+ console.log(`headers=${JSON.stringify(response.headers)}`);
+ console.log(`data=${JSON.stringify(typeof (response.data))}`);
+ });
+}
+exports.downloadRepository = downloadRepository;
+
+
+/***/ }),
+
/***/ 469:
/***/ (function(__unusedmodule, exports, __webpack_require__) {
@@ -8934,50 +8978,6 @@ module.exports = require("http");
/***/ }),
-/***/ 610:
-/***/ (function(__unusedmodule, exports, __webpack_require__) {
-
-"use strict";
-
-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());
- });
-};
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
- result["default"] = mod;
- return result;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const github = __importStar(__webpack_require__(469));
-const IS_WINDOWS = process.platform === 'win32';
-function download(accessToken, owner, repo, ref, repositoryPath) {
- return __awaiter(this, void 0, void 0, function* () {
- const octokit = new github.GitHub(accessToken);
- const params = {
- archive_format: IS_WINDOWS ? 'zipball' : 'tarball',
- owner: owner,
- repo: repo,
- ref: ref
- };
- const response = yield octokit.repos.getArchiveLink(params);
- console.log(`status=${response.status}`);
- console.log(`headers=${JSON.stringify(response.headers)}`);
- console.log(`data=${JSON.stringify(response.data)}`);
- });
-}
-exports.download = download;
-
-
-/***/ }),
-
/***/ 614:
/***/ (function(module) {
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index dc3e27e..f96cd5d 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -6,7 +6,7 @@ import * as gitCommandManager from './git-command-manager'
import * as io from '@actions/io'
import * as path from 'path'
import * as refHelper from './ref-helper'
-import * as repositoryApiHelper from './repository-api-helper'
+import * as githubApiHelper from './github-api-helper'
import {IGitCommandManager} from './git-command-manager'
const authConfigKey = `http.https://github.com/.extraheader`
@@ -79,7 +79,7 @@ export async function getSource(settings: ISourceSettings): Promise<void> {
}
if (!git || `${1}` == '1') {
- await repositoryApiHelper.download(
+ await githubApiHelper.downloadRepository(
settings.accessToken,
settings.repositoryOwner,
settings.repositoryName,
diff --git a/src/repository-api-helper.ts b/src/github-api-helper.ts
index 2e7d69b..3da0154 100644
--- a/src/repository-api-helper.ts
+++ b/src/github-api-helper.ts
@@ -3,7 +3,7 @@ import {ReposGetArchiveLinkParams} from '@octokit/rest'
const IS_WINDOWS = process.platform === 'win32'
-export async function download(
+export async function downloadRepository(
accessToken: string,
owner: string,
repo: string,
@@ -20,5 +20,5 @@ export async function download(
const response = await octokit.repos.getArchiveLink(params)
console.log(`status=${response.status}`)
console.log(`headers=${JSON.stringify(response.headers)}`)
- console.log(`data=${JSON.stringify(response.data)}`)
+ console.log(`data=${JSON.stringify(typeof response.data)}`)
}