From 940dc8ae05472c299a1ea52a1d63374e4f412d66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Jul 2021 15:23:07 +0000 Subject: [PATCH 1/2] chore(deps): bump @actions/github from 4.0.0 to 5.0.0 Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 4.0.0 to 5.0.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) Signed-off-by: dependabot[bot] --- package-lock.json | 69 ++++++++++++++++------------------------------ package.json | 2 +- src/action.js | 2 +- src/action.test.js | 6 ++-- 4 files changed, 29 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13f2317..4be32ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@actions/core": "^1.2.6", - "@actions/github": "^4.0.0", + "@actions/github": "^5.0.0", "@commitlint/config-angular": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", @@ -65,14 +65,14 @@ "integrity": "sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg==" }, "node_modules/@actions/github": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz", + "integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==", "dependencies": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + "@actions/http-client": "^1.0.11", + "@octokit/core": "^3.4.0", + "@octokit/plugin-paginate-rest": "^2.13.3", + "@octokit/plugin-rest-endpoint-methods": "^5.1.1" } }, "node_modules/@actions/http-client": { @@ -3788,11 +3788,11 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.1.tgz", - "integrity": "sha512-4gQg4ySoW7ktKB0Mf38fHzcSffVZd6mT5deJQtpqkuPuAqzlED5AJTeW8Uk7dPRn7KaOlWcXB0MedTFJU1j4qA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.4.1.tgz", + "integrity": "sha512-Nx0g7I5ayAYghsLJP4Q1Ch2W9jYYM0FlWWWZocUro8rNxVwuZXGfFd7Rcqi9XDWepSXjg1WByiNJnZza2hIOvQ==", "dependencies": { - "@octokit/types": "^6.13.0", + "@octokit/types": "^6.18.1", "deprecation": "^2.3.1" }, "peerDependencies": { @@ -3833,18 +3833,6 @@ "@octokit/plugin-rest-endpoint-methods": "5.4.1" } }, - "node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.4.1.tgz", - "integrity": "sha512-Nx0g7I5ayAYghsLJP4Q1Ch2W9jYYM0FlWWWZocUro8rNxVwuZXGfFd7Rcqi9XDWepSXjg1WByiNJnZza2hIOvQ==", - "dependencies": { - "@octokit/types": "^6.18.1", - "deprecation": "^2.3.1" - }, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, "node_modules/@octokit/types": { "version": "6.18.1", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.18.1.tgz", @@ -14653,14 +14641,14 @@ "integrity": "sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg==" }, "@actions/github": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz", + "integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==", "requires": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + "@actions/http-client": "^1.0.11", + "@octokit/core": "^3.4.0", + "@octokit/plugin-paginate-rest": "^2.13.3", + "@octokit/plugin-rest-endpoint-methods": "^5.1.1" } }, "@actions/http-client": { @@ -17457,11 +17445,11 @@ "requires": {} }, "@octokit/plugin-rest-endpoint-methods": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.1.tgz", - "integrity": "sha512-4gQg4ySoW7ktKB0Mf38fHzcSffVZd6mT5deJQtpqkuPuAqzlED5AJTeW8Uk7dPRn7KaOlWcXB0MedTFJU1j4qA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.4.1.tgz", + "integrity": "sha512-Nx0g7I5ayAYghsLJP4Q1Ch2W9jYYM0FlWWWZocUro8rNxVwuZXGfFd7Rcqi9XDWepSXjg1WByiNJnZza2hIOvQ==", "requires": { - "@octokit/types": "^6.13.0", + "@octokit/types": "^6.18.1", "deprecation": "^2.3.1" } }, @@ -17497,17 +17485,6 @@ "@octokit/plugin-paginate-rest": "^2.6.2", "@octokit/plugin-request-log": "^1.0.2", "@octokit/plugin-rest-endpoint-methods": "5.4.1" - }, - "dependencies": { - "@octokit/plugin-rest-endpoint-methods": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.4.1.tgz", - "integrity": "sha512-Nx0g7I5ayAYghsLJP4Q1Ch2W9jYYM0FlWWWZocUro8rNxVwuZXGfFd7Rcqi9XDWepSXjg1WByiNJnZza2hIOvQ==", - "requires": { - "@octokit/types": "^6.18.1", - "deprecation": "^2.3.1" - } - } } }, "@octokit/types": { diff --git a/package.json b/package.json index 49c5a15..326dc1b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "homepage": "https://github.com/wagoid/commitlint-github-action", "dependencies": { "@actions/core": "^1.2.6", - "@actions/github": "^4.0.0", + "@actions/github": "^5.0.0", "@commitlint/config-angular": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", diff --git a/src/action.js b/src/action.js index ff0902a..f9f070c 100644 --- a/src/action.js +++ b/src/action.js @@ -47,7 +47,7 @@ const getRangeForEvent = async () => { const octokit = getOctokit(getInput('token')) const { owner, repo, number } = eventContext.issue - const { data: commits } = await octokit.pulls.listCommits({ + const { data: commits } = await octokit.rest.pulls.listCommits({ owner, repo, pull_number: number, diff --git a/src/action.test.js b/src/action.test.js index aaf9ba6..1673086 100644 --- a/src/action.test.js +++ b/src/action.test.js @@ -25,8 +25,10 @@ const runAction = async () => { const github = await import('@actions/github') class MockOctokit { constructor() { - this.pulls = { - listCommits, + this.rest = { + pulls: { + listCommits, + }, } } } From d126fb67000b1c23a6e58a172f783d8ba6feef90 Mon Sep 17 00:00:00 2001 From: wagoid <7467450+wagoid@users.noreply.github.com> Date: Sat, 17 Jul 2021 16:57:48 -0300 Subject: [PATCH 2/2] docs: reference v4 instead of v3 on Inputs section of readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1be95ad..a050d05 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Alternatively, you can run on other event types such as `on: [push]`. In that ca ## Inputs -You can supply these inputs to the `wagoid/commitlint-github-action@v3` step. +You can supply these inputs to the `wagoid/commitlint-github-action@v4` step. ### `configFile`