Public Access
1
0
mirror of https://github.com/actions/checkout.git synced 2025-07-16 13:34:53 +00:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Ross Brodbeck
c43fdbfb30 update dist 2020-08-21 08:14:48 -04:00
Ross Brodbeck
239235dd46 add updated dist 2020-08-21 07:57:25 -04:00
Ross Brodbeck
2955f2419d fix package lock file 2020-08-21 07:53:08 -04:00
Ross Brodbeck
5aa50f005d change zeit -> vercel
Company name changed and deprecated all packages in favor of the new name
2020-08-21 07:47:54 -04:00
73 changed files with 16704 additions and 15418 deletions

View File

@@ -27,7 +27,6 @@
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error", "@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error", "@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-new": "error",

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
.licenses/** -diff linguist-generated=true

View File

@@ -1,20 +0,0 @@
name: Licensed
on:
push: {branches: main}
pull_request: {branches: main}
jobs:
test:
runs-on: ubuntu-latest
name: Check licenses
steps:
- uses: actions/checkout@v2
- run: npm ci
- name: Install licensed
run: |
cd $RUNNER_TEMP
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
sudo tar -xzf licensed.tar.gz
sudo mv licensed /usr/local/bin/licensed
- run: licensed status

View File

@@ -1,14 +0,0 @@
sources:
npm: true
allowed:
- apache-2.0
- bsd-2-clause
- bsd-3-clause
- isc
- mit
- cc0-1.0
- unlicense
reviewed:
npm:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2,5 +2,5 @@
mkdir override-git-version mkdir override-git-version
cd override-git-version cd override-git-version
echo @echo override git version 1.2.3 > git.cmd echo @echo override git version 1.2.3 > git.cmd
echo "%CD%" >> $GITHUB_PATH echo ::add-path::%CD%
cd .. cd ..

View File

@@ -5,5 +5,5 @@ cd override-git-version
echo "#!/bin/sh" > git echo "#!/bin/sh" > git
echo "echo override git version 1.2.3" >> git echo "echo override git version 1.2.3" >> git
chmod +x git chmod +x git
echo "$(pwd)" >> $GITHUB_PATH echo "::add-path::$(pwd)"
cd .. cd ..

30707
dist/index.js vendored

File diff suppressed because it is too large Load Diff

1328
dist/licenses.txt vendored Normal file

File diff suppressed because it is too large Load Diff

8
package-lock.json generated
View File

@@ -971,10 +971,10 @@
} }
} }
}, },
"@zeit/ncc": { "@vercel/ncc": {
"version": "0.20.5", "version": "0.23.0",
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.23.0.tgz",
"integrity": "sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw==", "integrity": "sha512-Fcr1qlG9t54X4X9qbo/+jr1+t5Qc6H3TgIRBXmKkF/WDs6YFulAN6ilq2Ehx38RbgIOFxaZnjlAQ50GyexnMpQ==",
"dev": true "dev": true
}, },
"abab": { "abab": {

View File

@@ -38,7 +38,7 @@
"@types/node": "^12.7.12", "@types/node": "^12.7.12",
"@types/uuid": "^3.4.6", "@types/uuid": "^3.4.6",
"@typescript-eslint/parser": "^2.8.0", "@typescript-eslint/parser": "^2.8.0",
"@zeit/ncc": "^0.20.5", "@vercel/ncc": "^0.23.0",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-github": "^2.0.0", "eslint-plugin-github": "^2.0.0",
"eslint-plugin-jest": "^22.21.0", "eslint-plugin-jest": "^22.21.0",

View File

@@ -148,7 +148,7 @@ class GitAuthHelper {
output.match(/(?<=(^|\n)file:)[^\t]+(?=\tremote\.origin\.url)/g) || [] output.match(/(?<=(^|\n)file:)[^\t]+(?=\tremote\.origin\.url)/g) || []
for (const configPath of configPaths) { for (const configPath of configPaths) {
core.debug(`Replacing token placeholder in '${configPath}'`) core.debug(`Replacing token placeholder in '${configPath}'`)
await this.replaceTokenPlaceholder(configPath) this.replaceTokenPlaceholder(configPath)
} }
if (this.settings.sshKey) { if (this.settings.sshKey) {

View File

@@ -31,7 +31,7 @@ export interface IGitCommandManager {
isDetached(): Promise<boolean> isDetached(): Promise<boolean>
lfsFetch(ref: string): Promise<void> lfsFetch(ref: string): Promise<void>
lfsInstall(): Promise<void> lfsInstall(): Promise<void>
log1(format?: string): Promise<string> log1(): Promise<string>
remoteAdd(remoteName: string, remoteUrl: string): Promise<void> remoteAdd(remoteName: string, remoteUrl: string): Promise<void>
removeEnvironmentVariable(name: string): void removeEnvironmentVariable(name: string): void
revParse(ref: string): Promise<string> revParse(ref: string): Promise<string>
@@ -254,10 +254,8 @@ class GitCommandManager {
await this.execGit(['lfs', 'install', '--local']) await this.execGit(['lfs', 'install', '--local'])
} }
async log1(format?: string): Promise<string> { async log1(): Promise<string> {
var args = format ? ['log', '-1', format] : ['log', '-1'] const output = await this.execGit(['log', '-1'])
var silent = format ? false : true
const output = await this.execGit(args, false, silent)
return output.stdout return output.stdout
} }
@@ -392,8 +390,7 @@ class GitCommandManager {
private async execGit( private async execGit(
args: string[], args: string[],
allowAllExitCodes = false, allowAllExitCodes = false
silent = false
): Promise<GitOutput> { ): Promise<GitOutput> {
fshelper.directoryExistsSync(this.workingDirectory, true) fshelper.directoryExistsSync(this.workingDirectory, true)
@@ -412,7 +409,6 @@ class GitCommandManager {
const options = { const options = {
cwd: this.workingDirectory, cwd: this.workingDirectory,
env, env,
silent,
ignoreReturnCode: allowAllExitCodes, ignoreReturnCode: allowAllExitCodes,
listeners: { listeners: {
stdout: (data: Buffer) => { stdout: (data: Buffer) => {

View File

@@ -201,12 +201,9 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
} }
} }
// Get commit information // Dump some info about the checked out commit
const commitInfo = await git.log1() const commitInfo = await git.log1()
// Log commit sha
await git.log1("--format='%H'")
// Check for incorrect pull request merge commit // Check for incorrect pull request merge commit
await refHelper.checkCommitInfo( await refHelper.checkCommitInfo(
settings.authToken, settings.authToken,

View File

@@ -47,7 +47,7 @@ export async function downloadRepository(
} else { } else {
await toolCache.extractTar(archivePath, extractPath) await toolCache.extractTar(archivePath, extractPath)
} }
await io.rmRF(archivePath) io.rmRF(archivePath)
// Determine the path of the repository content. The archive contains // Determine the path of the repository content. The archive contains
// a top-level folder and the repository content is inside. // a top-level folder and the repository content is inside.
@@ -70,7 +70,7 @@ export async function downloadRepository(
await io.mv(sourcePath, targetPath) await io.mv(sourcePath, targetPath)
} }
} }
await io.rmRF(extractPath) io.rmRF(extractPath)
} }
/** /**