From 6823a1249492a7aab8d2ec24731aab4a00327b0a Mon Sep 17 00:00:00 2001 From: Ross Brodbeck Date: Fri, 22 Nov 2019 10:18:33 -0500 Subject: [PATCH] Run prettier --- packages/github/package.json | 2 ++ packages/github/src/context.ts | 4 +--- packages/github/src/github.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/github/package.json b/packages/github/package.json index ff2d16b86a..23ef2adc25 100644 --- a/packages/github/package.json +++ b/packages/github/package.json @@ -27,6 +27,8 @@ "scripts": { "test": "jest", "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", "tsc": "tsc" }, "bugs": { diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index a06a8e0a48..b587ec9b1a 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -28,9 +28,7 @@ export class Context { ) } else { process.stdout.write( - `GITHUB_EVENT_PATH ${ - process.env.GITHUB_EVENT_PATH - } does not exist${EOL}` + `GITHUB_EVENT_PATH ${process.env.GITHUB_EVENT_PATH} does not exist${EOL}` ) } } diff --git a/packages/github/src/github.ts b/packages/github/src/github.ts index a014e29a58..a7804a3505 100644 --- a/packages/github/src/github.ts +++ b/packages/github/src/github.ts @@ -1,6 +1,6 @@ // Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts -import { graphql } from '@octokit/graphql' -import { graphql as GraphQL } from '@octokit/graphql/dist-types/types' +import {graphql} from '@octokit/graphql' +import {graphql as GraphQL} from '@octokit/graphql/dist-types/types' import Octokit from '@octokit/rest' import * as Context from './context' @@ -13,7 +13,7 @@ export class GitHub extends Octokit { graphql: GraphQL constructor(token: string, opts: Omit = {}) { super({...opts, auth: `token ${token}`}) - + this.graphql = graphql.defaults({ headers: {authorization: `token ${token}`} })