Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/checkout
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: actions/checkout
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.1
Choose a head ref
  • 4 commits
  • 6 files changed
  • 1 contributor

Commits on Apr 2, 2020

  1. Update changelog

    ericsciple committed Apr 2, 2020
    Copy the full SHA
    94c2de7 View commit details

Commits on May 7, 2020

  1. Copy the full SHA
    ac45559 View commit details

Commits on May 18, 2020

  1. Copy the full SHA
    7523e23 View commit details

Commits on May 19, 2020

  1. changelog

    ericsciple committed May 19, 2020
    Copy the full SHA
    86f86b3 View commit details
Showing with 13,998 additions and 605 deletions.
  1. +21 −0 CHANGELOG.md
  2. +13,876 −561 dist/index.js
  3. +91 −34 package-lock.json
  4. +1 −1 package.json
  5. +3 −4 src/github-api-helper.ts
  6. +6 −5 src/url-helper.ts
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## v2.1.1
- Changes to support GHES ([here](https://github.com/actions/checkout/pull/236) and [here](https://github.com/actions/checkout/pull/248))

## v2.1.0

- [Group output](https://github.com/actions/checkout/pull/191)
- [Changes to support GHES alpha release](https://github.com/actions/checkout/pull/199)
- [Persist core.sshCommand for submodules](https://github.com/actions/checkout/pull/184)
- [Add support ssh](https://github.com/actions/checkout/pull/163)
- [Convert submodule SSH URL to HTTPS, when not using SSH](https://github.com/actions/checkout/pull/179)
- [Add submodule support](https://github.com/actions/checkout/pull/157)
- [Follow proxy settings](https://github.com/actions/checkout/pull/144)
- [Fix ref for pr closed event when a pr is merged](https://github.com/actions/checkout/pull/141)
- [Fix issue checking detached when git less than 2.22](https://github.com/actions/checkout/pull/128)

## v2.0.0

- [Do not pass cred on command line](https://github.com/actions/checkout/pull/108)
- [Add input persist-credentials](https://github.com/actions/checkout/pull/107)
- [Fallback to REST API to download repo](https://github.com/actions/checkout/pull/104)

## v2 (beta)

- Improved fetch performance
14,437 changes: 13,876 additions & 561 deletions dist/index.js

Large diffs are not rendered by default.

125 changes: 91 additions & 34 deletions package-lock.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
"dependencies": {
"@actions/core": "^1.1.3",
"@actions/exec": "^1.0.1",
"@actions/github": "^2.0.2",
"@actions/github": "^2.2.0",
"@actions/io": "^1.0.1",
"@actions/tool-cache": "^1.1.2",
"uuid": "^3.3.3"
7 changes: 3 additions & 4 deletions src/github-api-helper.ts
Original file line number Diff line number Diff line change
@@ -6,9 +6,8 @@ import * as io from '@actions/io'
import * as path from 'path'
import * as retryHelper from './retry-helper'
import * as toolCache from '@actions/tool-cache'
import * as urlHelper from './url-helper'
import {default as uuid} from 'uuid/v4'
import {ReposGetArchiveLinkParams} from '@octokit/rest'
import {Octokit} from '@octokit/rest'

const IS_WINDOWS = process.platform === 'win32'

@@ -75,8 +74,8 @@ async function downloadArchive(
ref: string,
commit: string
): Promise<Buffer> {
const octokit = new github.GitHub(authToken, {baseUrl: urlHelper.getApiUrl()})
const params: ReposGetArchiveLinkParams = {
const octokit = new github.GitHub(authToken)
const params: Octokit.ReposGetArchiveLinkParams = {
owner: owner,
repo: repo,
archive_format: IS_WINDOWS ? 'zipball' : 'tarball',
11 changes: 6 additions & 5 deletions src/url-helper.ts
Original file line number Diff line number Diff line change
@@ -2,10 +2,6 @@ import * as assert from 'assert'
import {IGitSourceSettings} from './git-source-settings'
import {URL} from 'url'

export function getApiUrl(): string {
return process.env['GITHUB_API_URL'] || 'https://api.github.com'
}

export function getFetchUrl(settings: IGitSourceSettings): string {
assert.ok(
settings.repositoryOwner,
@@ -24,5 +20,10 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
}

export function getServerUrl(): URL {
return new URL(process.env['GITHUB_URL'] || 'https://github.com')
// todo: remove GITHUB_URL after support for GHES Alpha is no longer needed
return new URL(
process.env['GITHUB_SERVER_URL'] ||
process.env['GITHUB_URL'] ||
'https://github.com'
)
}