Skip to content

Commit

Permalink
Merge pull request #45 from stoplightio/dependabot/npm_and_yarn/types…
Browse files Browse the repository at this point in the history
…/node-12.12.14

Bump @types/node from 12.12.12 to 12.12.14
  • Loading branch information
XVincentX committed Nov 26, 2019
2 parents f388812 + 5f4c411 commit 5bb737b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
spectral_ruleset:
required: true
description: Ruleset file to load in Spectral
default: spectral.yml
repo_token:
required: true
description: Repository token to create the checks
runs:
using: docker
image: Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@octokit/graphql": "^4.3.1",
"@octokit/request": "^5.3.1",
"@octokit/rest": "^16.35.0",
"@types/node": "^12.12.12",
"@types/node": "^12.12.14",
"@types/urijs": "^1.19.4",
"husky": "^3.1.0",
"prettier": "^1.19.1",
Expand Down
15 changes: 8 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Config } from './config';
import { runSpectral, createSpectral } from './spectral';
import { createGithubCheck, createOctokitInstance, getRepositoryInfoFromEvent, updateGithubCheck } from './octokit';

import { error, info, setFailed } from '@actions/core';
import { info, setFailed } from '@actions/core';
import * as IOEither from 'fp-ts/lib/IOEither';
import * as IO from 'fp-ts/lib/IO';
import * as TaskEither from 'fp-ts/lib/TaskEither';
Expand Down Expand Up @@ -92,16 +92,17 @@ const program = pipe(
pipe(
readFileToAnalyze(join(GITHUB_WORKSPACE, INPUT_FILE_PATH)),
TaskEither.chain(content => createSpectralAnnotations(INPUT_FILE_PATH, INPUT_SPECTRAL_RULESET, content)),
TaskEither.chain(annotations =>
updateGithubCheck(
TaskEither.chain(annotations => {
info(`${annotations.length} annotations found on ${INPUT_FILE_PATH}`);
return updateGithubCheck(
octokit,
GITHUB_ACTION,
check,
event,
annotations,
annotations.findIndex(f => f.annotation_level === 'failure') === -1 ? 'success' : 'failure'
)
),
);
}),
TaskEither.orElse(e => {
setFailed(e.message);
return updateGithubCheck(octokit, GITHUB_ACTION, check, event, [], 'failure', e.message);
Expand All @@ -116,8 +117,8 @@ program().then(result =>
pipe(
result,
Either.fold(
e => error(e.message),
() => info('Worked fine')
e => setFailed(e.message),
res => info(`Linting completed with: ${JSON.stringify(res.data, undefined, 2)}`)
)
)
);
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==

"@types/node@>= 8", "@types/node@^12.12.12":
version "12.12.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.12.tgz#529bc3e73dbb35dd9e90b0a1c83606a9d3264bdb"
integrity sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==
"@types/node@>= 8", "@types/node@^12.12.14":
version "12.12.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2"
integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down

0 comments on commit 5bb737b

Please sign in to comment.