Skip to content

Commit

Permalink
fix: octocat migration #92
Browse files Browse the repository at this point in the history
  • Loading branch information
MorrisonCole committed Aug 13, 2020
1 parent 0e61862 commit 4a7eec5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 15 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -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 });
Expand All @@ -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 : "";
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -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<void> {
const githubContext = github.context;
const githubToken = core.getInput("repo-token");
const githubClient = new GitHub(githubToken);
const githubClient = getOctokit(githubToken);

const pr = githubContext.issue;

Expand Down

0 comments on commit 4a7eec5

Please sign in to comment.