From b742641b90e52548879ab05a15eccb656477731d Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Fri, 9 Sep 2022 16:59:57 -0500 Subject: [PATCH 1/2] Correct organization references --- package.json | 6 +++--- src/index.test.js | 10 +++++----- src/pre.test.js | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ecb014e..af42f63 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/paper-spa/deploy-pages.git" + "url": "git+https://github.com/actions/deploy-pages.git" }, "keywords": [ "GitHub", @@ -42,7 +42,7 @@ "author": "GitHub", "license": "MIT", "bugs": { - "url": "https://github.com/paper-spa/deploy-pages/issues" + "url": "https://github.com/actions/deploy-pages/issues" }, - "homepage": "https://github.com/paper-spa/deploy-pages#readme" + "homepage": "https://github.com/actions/deploy-pages#readme" } diff --git a/src/index.test.js b/src/index.test.js index 3027560..e058175 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -14,7 +14,7 @@ describe('with all environment variables set', () => { process.env.ACTIONS_RUNTIME_URL = 'my-url' process.env.GITHUB_RUN_ID = '123' process.env.ACTIONS_RUNTIME_TOKEN = 'a-token' - process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome' + process.env.GITHUB_REPOSITORY = 'actions/is-awesome' process.env.GITHUB_TOKEN = 'gha-token' process.env.GITHUB_SHA = '123abc' process.env.GITHUB_ACTOR = 'monalisa' @@ -49,7 +49,7 @@ describe('create', () => { process.env.ACTIONS_RUNTIME_URL = 'http://my-url/' process.env.GITHUB_RUN_ID = '123' process.env.ACTIONS_RUNTIME_TOKEN = 'a-token' - process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome' + process.env.GITHUB_REPOSITORY = 'actions/is-awesome' process.env.GITHUB_TOKEN = 'gha-token' process.env.GITHUB_SHA = '123abc' process.env.GITHUB_ACTOR = 'monalisa' @@ -99,7 +99,7 @@ describe('create', () => { await deployment.create(fakeJwt) expect(axios.post).toBeCalledWith( - 'https://api.github.com/repos/paper-spa/is-awesome/pages/deployment', + 'https://api.github.com/repos/actions/is-awesome/pages/deployment', { artifact_url: 'https://fake-artifact.com&%24expand=SignedContent', pages_build_version: 'valid-build-version', @@ -136,7 +136,7 @@ describe('create', () => { deployment.create() } catch (err) { expect(axios.post).toBeCalledWith( - 'https://api.github.com/repos/paper-spa/is-awesome/pages/deployment', + 'https://api.github.com/repos/actions/is-awesome/pages/deployment', { artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent', pages_build_version: 'invalid-build-version' @@ -163,7 +163,7 @@ describe('check', () => { process.env.ACTIONS_RUNTIME_URL = 'http://my-url/' process.env.GITHUB_RUN_ID = '123' process.env.ACTIONS_RUNTIME_TOKEN = 'a-token' - process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome' + process.env.GITHUB_REPOSITORY = 'actions/is-awesome' process.env.GITHUB_TOKEN = 'gha-token' process.env.GITHUB_SHA = '123abc' process.env.GITHUB_ACTOR = 'monalisa' diff --git a/src/pre.test.js b/src/pre.test.js index 9d315b6..f20e9b5 100644 --- a/src/pre.test.js +++ b/src/pre.test.js @@ -11,7 +11,7 @@ describe('emitTelemetry', () => { process.env.ACTIONS_RUNTIME_URL = 'my-url' process.env.GITHUB_RUN_ID = '123' process.env.ACTIONS_RUNTIME_TOKEN = 'a-token' - process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome' + process.env.GITHUB_REPOSITORY = 'actions/is-awesome' process.env.GITHUB_TOKEN = 'gha-token' process.env.GITHUB_SHA = '123abc' process.env.GITHUB_ACTOR = 'monalisa' @@ -45,7 +45,7 @@ describe('emitTelemetry', () => { emitTelemetry() expect(axios.post).toBeCalledWith( - 'https://api.github.com/repos/paper-spa/is-awesome/pages/telemetry', + 'https://api.github.com/repos/actions/is-awesome/pages/telemetry', { github_run_id: process.env.GITHUB_RUN_ID }, From 3ed1d6d9a8499df840e3f9b08d047accb9fb4b2d Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Fri, 9 Sep 2022 17:09:19 -0500 Subject: [PATCH 2/2] Use single quotes in Action metadata for consistency --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 4e7add5..379246f 100644 --- a/action.yml +++ b/action.yml @@ -8,7 +8,7 @@ inputs: emit_telemetry: description: 'Should this action only emit build telemetry instead of deploying the build artifact?' required: false - default: "false" + default: 'false' token: description: 'GitHub token' default: ${{ github.token }} @@ -16,19 +16,19 @@ inputs: timeout: description: 'Time in milliseconds after which to timeout and cancel the deployment (default: 10 minutes)' required: false - default: "600000" + default: '600000' error_count: description: 'Maximum number of status report errors before cancelling a deployment (default: 10)' required: false - default: "10" + default: '10' reporting_interval: description: 'Time in milliseconds between two deployment status report (default: 5 seconds)' required: false - default: "5000" + default: '5000' artifact_name: description: 'Name of the artifact to deploy' required: false - default: "github-pages" + default: 'github-pages' outputs: page_url: description: 'URL to deployed GitHub Pages'