-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from technote-space/release/v1.1.0
Release/v1.1.0
- Loading branch information
Showing
18 changed files
with
1,159 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[{*.json,*.yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended" | ||
], | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2018 | ||
}, | ||
"env": { | ||
"node": true, | ||
"jest": true, | ||
"es6": true, | ||
"browser": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "latest" | ||
} | ||
}, | ||
"rules": { | ||
"camelcase": [ | ||
"error", | ||
{ | ||
"properties": "always" | ||
} | ||
], | ||
"require-jsdoc": [ | ||
"error", | ||
{ | ||
"require": { | ||
"FunctionDeclaration": true, | ||
"MethodDefinition": true, | ||
"ClassDeclaration": true | ||
} | ||
} | ||
], | ||
"valid-jsdoc": [ | ||
"error", | ||
{ | ||
"requireReturn": false, | ||
"preferType": { | ||
"String": "string", | ||
"Object": "object", | ||
"Number": "number", | ||
"Function": "function", | ||
"Void": "void" | ||
} | ||
} | ||
], | ||
"quotes": [ | ||
"error", | ||
"single", | ||
"avoid-escape" | ||
], | ||
"key-spacing": [ | ||
"error", | ||
{ | ||
"singleLine": { | ||
"beforeColon": false, | ||
"afterColon": true | ||
}, | ||
"multiLine": { | ||
"beforeColon": false, | ||
"afterColon": true | ||
} | ||
} | ||
], | ||
"no-magic-numbers": [ | ||
"error", | ||
{ | ||
"ignoreArrayIndexes": true | ||
} | ||
], | ||
"eqeqeq": "error", | ||
"block-scoped-var": "error", | ||
"complexity": [ | ||
"error", | ||
{ | ||
"maximum": 20 | ||
} | ||
], | ||
"curly": "error", | ||
"default-case": "error", | ||
"dot-location": [ | ||
"error", | ||
"property" | ||
], | ||
"guard-for-in": "error", | ||
"no-eval": "error", | ||
"block-spacing": "error", | ||
"brace-style": "error", | ||
"comma-spacing": [ | ||
"error", | ||
{ | ||
"before": false, | ||
"after": true | ||
} | ||
], | ||
"id-length": [ | ||
"error", | ||
{ | ||
"min": 2, | ||
"properties": "never", | ||
"exceptions": [ | ||
"$" | ||
] | ||
} | ||
], | ||
"indent": [ | ||
"error", | ||
"tab", | ||
{ | ||
"MemberExpression": "off" | ||
} | ||
], | ||
"space-before-function-paren": [ | ||
"error", | ||
"never" | ||
], | ||
"space-before-blocks": "error", | ||
"prefer-const": "error", | ||
"no-var": "error", | ||
"arrow-body-style": "off", | ||
"arrow-spacing": "error", | ||
"strict": [ | ||
"error" | ||
], | ||
"no-warning-comments": [ | ||
"warn", | ||
{ | ||
"terms": [ | ||
"todo", | ||
"fixme", | ||
"hack" | ||
], | ||
"location": "anywhere" | ||
} | ||
], | ||
"semi": [ | ||
"error" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"message": "Resource not accessible by integration", | ||
"documentation_url": "https://developer.github.com/v3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
export const getContext = (override: object) => Object.assign({ | ||
payload: { | ||
action: '', | ||
}, | ||
eventName: '', | ||
sha: '', | ||
ref: '', | ||
workflow: '', | ||
action: '', | ||
actor: '', | ||
issue: { | ||
owner: '', | ||
repo: '', | ||
number: 1, | ||
}, | ||
repo: { | ||
owner: '', | ||
repo: '', | ||
}, | ||
}, override); | ||
|
||
export const getApiFixture = (name: string) => JSON.parse(fs.readFileSync(path.resolve(__dirname, `./fixtures/${name}.json`))); | ||
|
||
export const disableNetConnect = nock => { | ||
beforeEach(() => { | ||
nock.disableNetConnect(); | ||
}); | ||
|
||
afterEach(() => { | ||
nock.cleanAll(); | ||
nock.enableNetConnect(); | ||
}); | ||
}; | ||
import { Context } from '@actions/github/lib/context'; | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
|
||
export const getContext = (override: object): Context => Object.assign({ | ||
payload: { | ||
action: '', | ||
}, | ||
eventName: '', | ||
sha: '', | ||
ref: '', | ||
workflow: '', | ||
action: '', | ||
actor: '', | ||
issue: { | ||
owner: '', | ||
repo: '', | ||
number: 1, | ||
}, | ||
repo: { | ||
owner: '', | ||
repo: '', | ||
}, | ||
}, override); | ||
|
||
export const getApiFixture = (name: string): object => JSON.parse(fs.readFileSync(path.resolve(__dirname, `./fixtures/${name}.json`)).toString()); | ||
|
||
export const disableNetConnect = (nock): void => { | ||
beforeEach(() => { | ||
nock.disableNetConnect(); | ||
}); | ||
|
||
afterEach(() => { | ||
nock.cleanAll(); | ||
nock.enableNetConnect(); | ||
}); | ||
}; |
Oops, something went wrong.