diff --git a/README.md b/README.md index 1be95ad1..a050d05a 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` diff --git a/package-lock.json b/package-lock.json index 13f23177..4be32ef3 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 49c5a153..326dc1bd 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 ff0902aa..f9f070cf 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 aaf9ba6e..16730860 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, + }, } } }