mirror of
https://github.com/actions/checkout.git
synced 2025-03-31 05:20:06 +02:00
Run prettier
This commit is contained in:
parent
c31757e6ed
commit
bd579e858c
2 changed files with 12 additions and 4 deletions
8
dist/index.js
vendored
8
dist/index.js
vendored
|
@ -1514,7 +1514,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
|
||||||
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
|
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
|
||||||
var _a;
|
var _a;
|
||||||
core.info('Retrieving the default branch name');
|
core.info('Retrieving the default branch name');
|
||||||
const octokit = github.getOctokit(authToken, { baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl) });
|
const octokit = github.getOctokit(authToken, {
|
||||||
|
baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl)
|
||||||
|
});
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
// Get the default branch from the repo info
|
// Get the default branch from the repo info
|
||||||
|
@ -1546,7 +1548,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
|
||||||
exports.getDefaultBranch = getDefaultBranch;
|
exports.getDefaultBranch = getDefaultBranch;
|
||||||
function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
|
function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const octokit = github.getOctokit(authToken, { baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl) });
|
const octokit = github.getOctokit(authToken, {
|
||||||
|
baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl)
|
||||||
|
});
|
||||||
const download = IS_WINDOWS
|
const download = IS_WINDOWS
|
||||||
? octokit.rest.repos.downloadZipballArchive
|
? octokit.rest.repos.downloadZipballArchive
|
||||||
: octokit.rest.repos.downloadTarballArchive;
|
: octokit.rest.repos.downloadTarballArchive;
|
||||||
|
|
|
@ -85,7 +85,9 @@ export async function getDefaultBranch(
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return await retryHelper.execute(async () => {
|
return await retryHelper.execute(async () => {
|
||||||
core.info('Retrieving the default branch name')
|
core.info('Retrieving the default branch name')
|
||||||
const octokit = github.getOctokit(authToken, {baseUrl: getServerApiUrl(baseUrl)})
|
const octokit = github.getOctokit(authToken, {
|
||||||
|
baseUrl: getServerApiUrl(baseUrl)
|
||||||
|
})
|
||||||
let result: string
|
let result: string
|
||||||
try {
|
try {
|
||||||
// Get the default branch from the repo info
|
// Get the default branch from the repo info
|
||||||
|
@ -126,7 +128,9 @@ async function downloadArchive(
|
||||||
commit: string,
|
commit: string,
|
||||||
baseUrl?: string
|
baseUrl?: string
|
||||||
): Promise<Buffer> {
|
): Promise<Buffer> {
|
||||||
const octokit = github.getOctokit(authToken, {baseUrl: getServerApiUrl(baseUrl)})
|
const octokit = github.getOctokit(authToken, {
|
||||||
|
baseUrl: getServerApiUrl(baseUrl)
|
||||||
|
})
|
||||||
const download = IS_WINDOWS
|
const download = IS_WINDOWS
|
||||||
? octokit.rest.repos.downloadZipballArchive
|
? octokit.rest.repos.downloadZipballArchive
|
||||||
: octokit.rest.repos.downloadTarballArchive
|
: octokit.rest.repos.downloadTarballArchive
|
||||||
|
|
Loading…
Add table
Reference in a new issue