From c8e2c9667b643f876de003bf5a5dda1ddcd71daf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 10:36:27 +0000 Subject: [PATCH 1/8] Bump @types/node from 13.7.0 to 13.7.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5aaced..6a1017a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -134,9 +134,9 @@ } }, "@types/node": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz", - "integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==" + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", + "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" }, "@zeit/ncc": { "version": "0.21.0", diff --git a/package.json b/package.json index e2e47c1..632b040 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@octokit/rest": "^16.43.1", - "@types/node": "^13.7.0", + "@types/node": "^13.7.1", "@zeit/ncc": "^0.21.0", "typescript": "^3.7.2" } From 36f53c692a8c0dc42032388fab8b2d1ad01eed6e Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Wed, 12 Feb 2020 08:44:42 -0500 Subject: [PATCH 2/8] Add dependabot badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8e8c308..ccfdbb7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Pull Request Comment Branch +[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=xt0rted/pull-request-comment-branch)](https://dependabot.com) + Get the head ref and sha of a pull request comment. Workflows for pull request comments are triggered using the [`issue_comment`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment) event which runs for both issues and pull requests. From 2b1c1df795a37a22999ba6560686d1da25f00410 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2020 10:52:00 +0000 Subject: [PATCH 3/8] Bump @zeit/ncc from 0.21.0 to 0.21.1 Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.21.0 to 0.21.1. - [Release notes](https://github.com/zeit/ncc/releases) - [Commits](https://github.com/zeit/ncc/compare/0.21.0...0.21.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6a1017a..803c603 100644 --- a/package-lock.json +++ b/package-lock.json @@ -139,9 +139,9 @@ "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" }, "@zeit/ncc": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.0.tgz", - "integrity": "sha512-RUMdvVK/w78oo+yBjruZltt0kJXYar2un/1bYQ2LuHG7GmFVm+QjxzEmySwREctaJdEnBvlMdUNWd9hXHxEI3g==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.1.tgz", + "integrity": "sha512-M9WzgquSOt2nsjRkYM9LRylBLmmlwNCwYbm3Up3PDEshfvdmIfqpFNSK8EJvR18NwZjGHE5z2avlDtYQx2JQnw==", "dev": true }, "atob-lite": { diff --git a/package.json b/package.json index 632b040..828b9ec 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@octokit/rest": "^16.43.1", "@types/node": "^13.7.1", - "@zeit/ncc": "^0.21.0", + "@zeit/ncc": "^0.21.1", "typescript": "^3.7.2" } } From fcea6bdb752c85a06f3962e211e0f47b2bfe99c6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 19:47:01 +0000 Subject: [PATCH 4/8] Bump @types/node from 13.7.1 to 13.7.4 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.1 to 13.7.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 803c603..cd6d739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -134,9 +134,9 @@ } }, "@types/node": { - "version": "13.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", - "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" + "version": "13.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.4.tgz", + "integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==" }, "@zeit/ncc": { "version": "0.21.1", diff --git a/package.json b/package.json index 828b9ec..31de044 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@octokit/rest": "^16.43.1", - "@types/node": "^13.7.1", + "@types/node": "^13.7.4", "@zeit/ncc": "^0.21.1", "typescript": "^3.7.2" } From 8f52e9ed11c9bda474887bc3c07539900e34d5f6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 19:08:06 +0000 Subject: [PATCH 5/8] Bump @actions/github from 2.1.0 to 2.1.1 Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd6d739..d9ca390 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,13 @@ "integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==" }, "@actions/github": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.0.tgz", - "integrity": "sha512-G4ncMlh4pLLAvNgHUYUtpWQ1zPf/VYqmRH9oshxLabdaOOnp7i1hgSgzr2xne2YUaSND3uqemd3YYTIsm2f/KQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.1.tgz", + "integrity": "sha512-kAgTGUx7yf5KQCndVeHSwCNZuDBvPyxm5xKTswW2lofugeuC1AZX73nUUVDNaysnM9aKFMHv9YCdVJbg7syEyA==", "requires": { "@actions/http-client": "^1.0.3", "@octokit/graphql": "^4.3.1", - "@octokit/rest": "^16.15.0" + "@octokit/rest": "^16.43.1" } }, "@actions/http-client": { diff --git a/package.json b/package.json index 31de044..eb1b090 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.2.0", - "@actions/github": "^2.1.0" + "@actions/github": "^2.1.1" }, "devDependencies": { "@octokit/rest": "^16.43.1", From ee10a0d37102ebcb0915efaa6f80ba7332f3ab53 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 22:50:26 +0000 Subject: [PATCH 6/8] Bump typescript from 3.7.5 to 3.8.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 3.8.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd6d739..e226989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -342,9 +342,9 @@ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.2.tgz", + "integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==", "dev": true }, "universal-user-agent": { diff --git a/package.json b/package.json index 31de044..b19352a 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ "@octokit/rest": "^16.43.1", "@types/node": "^13.7.4", "@zeit/ncc": "^0.21.1", - "typescript": "^3.7.2" + "typescript": "^3.8.2" } } From b84abe0de133de8e0906534521d081d63b74df9b Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 21 Feb 2020 10:04:06 -0500 Subject: [PATCH 7/8] Switch back to using @actions/github --- package.json | 1 - src/main.ts | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eb1b090..e2c074a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "@actions/github": "^2.1.1" }, "devDependencies": { - "@octokit/rest": "^16.43.1", "@types/node": "^13.7.4", "@zeit/ncc": "^0.21.1", "typescript": "^3.7.2" diff --git a/src/main.ts b/src/main.ts index d9a6d8a..6738e33 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,9 @@ import { getInput, setFailed, setOutput } from "@actions/core"; -import { context } from "@actions/github"; -import { Octokit } from "@octokit/rest"; +import { context, GitHub } from "@actions/github"; export async function run() { try { - const token = getInput("repo_token", { required: true }); - const client = new Octokit({ auth: `token ${token}` }); + const client = new GitHub(getInput("repo_token", { required: true })); const { data: { pull_request } } = await client.issues.get({ ...context.repo, From 2d5460da060c36742755126123bd2ba497c52b85 Mon Sep 17 00:00:00 2001 From: Brian Surowiec Date: Fri, 21 Feb 2020 10:55:21 -0500 Subject: [PATCH 8/8] Release v1.1.0 --- dist/index.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index 369c592..ab4e37a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1452,12 +1452,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = __webpack_require__(470); const github_1 = __webpack_require__(469); -const rest_1 = __webpack_require__(0); function run() { return __awaiter(this, void 0, void 0, function* () { try { - const token = core_1.getInput("repo_token", { required: true }); - const client = new rest_1.Octokit({ auth: `token ${token}` }); + const client = new github_1.GitHub(core_1.getInput("repo_token", { required: true })); const { data: { pull_request } } = yield client.issues.get(Object.assign(Object.assign({}, github_1.context.repo), { issue_number: github_1.context.issue.number })); if (!pull_request) { throw Error("Comment is not on a pull request"); @@ -6947,9 +6945,6 @@ exports.RequestError = RequestError; "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; @@ -6960,13 +6955,13 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); // Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts const graphql_1 = __webpack_require__(898); -const rest_1 = __importDefault(__webpack_require__(0)); +const rest_1 = __webpack_require__(0); const Context = __importStar(__webpack_require__(262)); const httpClient = __importStar(__webpack_require__(539)); // We need this in order to extend Octokit -rest_1.default.prototype = new rest_1.default(); +rest_1.Octokit.prototype = new rest_1.Octokit(); exports.context = new Context.Context(); -class GitHub extends rest_1.default { +class GitHub extends rest_1.Octokit { constructor(token, opts) { super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts))); this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts));