diff --git a/README.md b/README.md index f7d3ac1..4f0188f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ jobs: ## Changelog +### v1.2.2 + +- Fixes [#92](https://github.com/MorrisonCole/pr-lint-action/issues/92) + +### v1.2.1 + +- Fixes [#90](https://github.com/MorrisonCole/pr-lint-action/issues/90) + ### v1.1.1 Internal refactoring only: diff --git a/lib/main.js b/lib/main.js index cb658b7..b48e15e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,9 +1,21 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); @@ -14,7 +26,7 @@ async function run() { var _a, _b; const githubContext = github.context; const githubToken = core.getInput("repo-token"); - const githubClient = new github_1.GitHub(githubToken); + const githubClient = github_1.getOctokit(githubToken); const pr = githubContext.issue; const titleRegex = new RegExp(core.getInput("title-regex")); const title = (_b = (_a = githubContext.payload.pull_request) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ""; diff --git a/src/main.ts b/src/main.ts index 9cb7b53..74b4fcc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/camelcase */ -import { GitHub } from "@actions/github/lib/github"; +import { getOctokit } from "@actions/github/lib/github"; import * as core from "@actions/core"; import * as github from "@actions/github"; async function run(): Promise { const githubContext = github.context; const githubToken = core.getInput("repo-token"); - const githubClient = new GitHub(githubToken); + const githubClient = getOctokit(githubToken); const pr = githubContext.issue;