You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/12/27 14:02:04 UTC
[airflow-checks-action] 02/27: Setup repo
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-checks-action.git
commit d4c0b88ca2eb7a365ccce0b84e87925e4efc0168
Author: Louis Brunner <lo...@gmail.com>
AuthorDate: Sat Feb 29 13:23:28 2020 +0000
Setup repo
---
.eslintrc.json | 114 ++++++++--------
.github/workflows/test.yml | 13 +-
.prettierrc.json | 20 +--
README.md | 102 +-------------
__tests__/main.test.ts | 20 +--
action.yml | 11 +-
dist/index.js | 331 +--------------------------------------------
jest.config.js | 6 +-
package-lock.json | 296 +++++++++++++++++++++++++++++++++++-----
package.json | 27 ++--
src/main.ts | 12 +-
src/wait.ts | 9 --
tsconfig.json | 14 +-
13 files changed, 381 insertions(+), 594 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 09d81aa..02c79de 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,58 +1,58 @@
{
- "plugins": ["jest", "@typescript-eslint"],
- "extends": ["plugin:github/es6"],
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "ecmaVersion": 9,
- "sourceType": "module",
- "project": "./tsconfig.json"
- },
- "rules": {
- "eslint-comments/no-use": "off",
- "import/no-namespace": "off",
- "no-unused-vars": "off",
- "@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
- "@typescript-eslint/no-require-imports": "error",
- "@typescript-eslint/array-type": "error",
- "@typescript-eslint/await-thenable": "error",
- "@typescript-eslint/ban-ts-ignore": "error",
- "camelcase": "off",
- "@typescript-eslint/camelcase": "error",
- "@typescript-eslint/class-name-casing": "error",
- "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
- "@typescript-eslint/func-call-spacing": ["error", "never"],
- "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
- "@typescript-eslint/no-array-constructor": "error",
- "@typescript-eslint/no-empty-interface": "error",
- "@typescript-eslint/no-explicit-any": "error",
- "@typescript-eslint/no-extraneous-class": "error",
- "@typescript-eslint/no-for-in-array": "error",
- "@typescript-eslint/no-inferrable-types": "error",
- "@typescript-eslint/no-misused-new": "error",
- "@typescript-eslint/no-namespace": "error",
- "@typescript-eslint/no-non-null-assertion": "warn",
- "@typescript-eslint/no-object-literal-type-assertion": "error",
- "@typescript-eslint/no-unnecessary-qualifier": "error",
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-useless-constructor": "error",
- "@typescript-eslint/no-var-requires": "error",
- "@typescript-eslint/prefer-for-of": "warn",
- "@typescript-eslint/prefer-function-type": "warn",
- "@typescript-eslint/prefer-includes": "error",
- "@typescript-eslint/prefer-interface": "error",
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
- "@typescript-eslint/promise-function-async": "error",
- "@typescript-eslint/require-array-sort-compare": "error",
- "@typescript-eslint/restrict-plus-operands": "error",
- "semi": "off",
- "@typescript-eslint/semi": ["error", "never"],
- "@typescript-eslint/type-annotation-spacing": "error",
- "@typescript-eslint/unbound-method": "error"
- },
- "env": {
- "node": true,
- "es6": true,
- "jest/globals": true
- }
- }
\ No newline at end of file
+ "plugins": ["jest", "@typescript-eslint"],
+ "extends": ["plugin:github/es6"],
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": 9,
+ "sourceType": "module",
+ "project": "./tsconfig.json"
+ },
+ "rules": {
+ "eslint-comments/no-use": "off",
+ "import/no-namespace": "off",
+ "no-unused-vars": "off",
+ "@typescript-eslint/no-unused-vars": "error",
+ "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
+ "@typescript-eslint/no-require-imports": "error",
+ "@typescript-eslint/array-type": "error",
+ "@typescript-eslint/await-thenable": "error",
+ "@typescript-eslint/ban-ts-ignore": "error",
+ "camelcase": "off",
+ "@typescript-eslint/camelcase": "error",
+ "@typescript-eslint/class-name-casing": "error",
+ "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
+ "@typescript-eslint/func-call-spacing": ["error", "never"],
+ "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
+ "@typescript-eslint/no-array-constructor": "error",
+ "@typescript-eslint/no-empty-interface": "error",
+ "@typescript-eslint/no-explicit-any": "error",
+ "@typescript-eslint/no-extraneous-class": "error",
+ "@typescript-eslint/no-for-in-array": "error",
+ "@typescript-eslint/no-inferrable-types": "error",
+ "@typescript-eslint/no-misused-new": "error",
+ "@typescript-eslint/no-namespace": "error",
+ "@typescript-eslint/no-non-null-assertion": "warn",
+ "@typescript-eslint/no-object-literal-type-assertion": "error",
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
+ "@typescript-eslint/no-useless-constructor": "error",
+ "@typescript-eslint/no-var-requires": "error",
+ "@typescript-eslint/prefer-for-of": "warn",
+ "@typescript-eslint/prefer-function-type": "warn",
+ "@typescript-eslint/prefer-includes": "error",
+ "@typescript-eslint/prefer-interface": "error",
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
+ "@typescript-eslint/promise-function-async": "error",
+ "@typescript-eslint/require-array-sort-compare": "error",
+ "@typescript-eslint/restrict-plus-operands": "error",
+ "semi": "off",
+ "@typescript-eslint/semi": ["error", "never"],
+ "@typescript-eslint/type-annotation-spacing": "error",
+ "@typescript-eslint/unbound-method": "error"
+ },
+ "env": {
+ "node": true,
+ "es6": true,
+ "jest/globals": true
+ }
+}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d62684f..c058dd1 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -7,17 +7,22 @@ on: # rebuild any PRs and main branch changes
- 'releases/*'
jobs:
- build: # make sure build/ci work properly
+ # make sure build/ci work properly
+ build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
npm install
npm run all
- test: # make sure the action works on a clean machine without building
+
+ # make sure the action works on a clean machines without building
+ test1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./
- with:
- milliseconds: 1000
\ No newline at end of file
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ # TODO: add more (race conditions, failures, etc)
diff --git a/.prettierrc.json b/.prettierrc.json
index bbf4311..9d64c21 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -1,11 +1,11 @@
{
- "printWidth": 80,
- "tabWidth": 2,
- "useTabs": false,
- "semi": false,
- "singleQuote": true,
- "trailingComma": "none",
- "bracketSpacing": false,
- "arrowParens": "avoid",
- "parser": "typescript"
- }
\ No newline at end of file
+ "printWidth": 80,
+ "tabWidth": 2,
+ "useTabs": false,
+ "semi": false,
+ "singleQuote": true,
+ "trailingComma": "all",
+ "bracketSpacing": false,
+ "arrowParens": "avoid",
+ "parser": "typescript"
+}
diff --git a/README.md b/README.md
index 93ee363..50aeb47 100644
--- a/README.md
+++ b/README.md
@@ -1,101 +1,7 @@
-<p align="center">
- <a href="https://github.com/actions/typescript-action/actions"><img alt="typescript-action status" src="https://github.com/actions/typescript-action/workflows/build-test/badge.svg"></a>
-</p>
+# GitHub Actions: `checks-action` ![build-test](https://github.com/LouisBrunner/checks-action/workflows/build-test/badge.svg)
-# Create a JavaScript Action using TypeScript
+TODO: description
-Use this template to bootstrap the creation of a JavaScript action.:rocket:
+# Usage
-This template includes compilication support, tests, a validation workflow, publishing, and versioning guidance.
-
-If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
-
-## Create an action from this template
-
-Click the `Use this Template` and provide the new repo details for your action
-
-## Code in Master
-
-Install the dependencies
-```bash
-$ npm install
-```
-
-Build the typescript and package it for distribution
-```bash
-$ npm run build && npm run pack
-```
-
-Run the tests :heavy_check_mark:
-```bash
-$ npm test
-
- PASS ./index.test.js
- ✓ throws invalid number (3ms)
- ✓ wait 500 ms (504ms)
- ✓ test runs (95ms)
-
-...
-```
-
-## Change action.yml
-
-The action.yml contains defines the inputs and output for your action.
-
-Update the action.yml with your name, description, inputs and outputs for your action.
-
-See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
-
-## Change the Code
-
-Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
-
-```javascript
-import * as core from '@actions/core';
-...
-
-async function run() {
- try {
- ...
- }
- catch (error) {
- core.setFailed(error.message);
- }
-}
-
-run()
-```
-
-See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
-
-## Publish to a distribution branch
-
-Actions are run from GitHub repos so we will checkin the packed dist folder.
-
-Then run [ncc](https://github.com/zeit/ncc) and push the results:
-```bash
-$ npm run pack
-$ git add dist
-$ git commit -a -m "prod dependencies"
-$ git push origin releases/v1
-```
-
-Your action is now published! :rocket:
-
-See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
-
-## Validate
-
-You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml)])
-
-```yaml
-uses: ./
-with:
- milliseconds: 1000
-```
-
-See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
-
-## Usage:
-
-After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action
+TODO: usage
diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts
index efcf95e..9333b62 100644
--- a/__tests__/main.test.ts
+++ b/__tests__/main.test.ts
@@ -1,27 +1,13 @@
-import {wait} from '../src/wait'
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
-test('throws invalid number', async () => {
- const input = parseInt('foo', 10)
- await expect(wait(input)).rejects.toThrow('milliseconds not a number')
-})
-
-test('wait 500 ms', async () => {
- const start = new Date()
- await wait(500)
- const end = new Date()
- var delta = Math.abs(end.getTime() - start.getTime())
- expect(delta).toBeGreaterThan(450)
-})
-
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
- process.env['INPUT_MILLISECONDS'] = '500'
- const ip = path.join(__dirname, '..', 'lib', 'main.js')
+ process.env['TOKEN'] = 'ABC'
+ const ip = path.join(__dirname, '..', 'dist', 'index.js')
const options: cp.ExecSyncOptions = {
- env: process.env
+ env: process.env,
}
console.log(cp.execSync(`node ${ip}`, options).toString())
})
diff --git a/action.yml b/action.yml
index c0575e9..e7a778d 100644
--- a/action.yml
+++ b/action.yml
@@ -1,10 +1,9 @@
-name: 'Your name here'
-description: 'Provide a description here'
-author: 'Your name or organization here'
+name: 'GitHub Checks'
+description: 'Wrapper around the GitHub Checks API'
+author: 'Louis Brunner'
inputs:
- myInput: # change this
- description: 'input description here'
- default: 'default value if applicable'
+ token:
+ description: 'your GITHUB_TOKEN'
runs:
using: 'node12'
main: 'dist/index.js'
diff --git a/dist/index.js b/dist/index.js
index ce9ea57..b93d54d 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,330 +1 @@
-module.exports =
-/******/ (function(modules, runtime) { // webpackBootstrap
-/******/ "use strict";
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ __webpack_require__.ab = __dirname + "/";
-/******/
-/******/ // the startup function
-/******/ function startup() {
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(198);
-/******/ };
-/******/
-/******/ // run startup
-/******/ return startup();
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ 87:
-/***/ (function(module) {
-
-module.exports = require("os");
-
-/***/ }),
-
-/***/ 198:
-/***/ (function(__unusedmodule, exports, __webpack_require__) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-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;
- return result;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const core = __importStar(__webpack_require__(470));
-const wait_1 = __webpack_require__(521);
-function run() {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- const ms = core.getInput('milliseconds');
- core.debug(`Waiting ${ms} milliseconds ...`);
- core.debug(new Date().toTimeString());
- yield wait_1.wait(parseInt(ms, 10));
- core.debug(new Date().toTimeString());
- core.setOutput('time', new Date().toTimeString());
- }
- catch (error) {
- core.setFailed(error.message);
- }
- });
-}
-run();
-
-
-/***/ }),
-
-/***/ 431:
-/***/ (function(__unusedmodule, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const os = __webpack_require__(87);
-/**
- * Commands
- *
- * Command Format:
- * ##[name key=value;key=value]message
- *
- * Examples:
- * ##[warning]This is the user warning message
- * ##[set-secret name=mypassword]definatelyNotAPassword!
- */
-function issueCommand(command, properties, message) {
- const cmd = new Command(command, properties, message);
- process.stdout.write(cmd.toString() + os.EOL);
-}
-exports.issueCommand = issueCommand;
-function issue(name, message) {
- issueCommand(name, {}, message);
-}
-exports.issue = issue;
-const CMD_PREFIX = '##[';
-class Command {
- constructor(command, properties, message) {
- if (!command) {
- command = 'missing.command';
- }
- this.command = command;
- this.properties = properties;
- this.message = message;
- }
- toString() {
- let cmdStr = CMD_PREFIX + this.command;
- if (this.properties && Object.keys(this.properties).length > 0) {
- cmdStr += ' ';
- for (const key in this.properties) {
- if (this.properties.hasOwnProperty(key)) {
- const val = this.properties[key];
- if (val) {
- // safely append the val - avoid blowing up when attempting to
- // call .replace() if message is not a string for some reason
- cmdStr += `${key}=${escape(`${val || ''}`)};`;
- }
- }
- }
- }
- cmdStr += ']';
- // safely append the message - avoid blowing up when attempting to
- // call .replace() if message is not a string for some reason
- const message = `${this.message || ''}`;
- cmdStr += escapeData(message);
- return cmdStr;
- }
-}
-function escapeData(s) {
- return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
-}
-function escape(s) {
- return s
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A')
- .replace(/]/g, '%5D')
- .replace(/;/g, '%3B');
-}
-//# sourceMappingURL=command.js.map
-
-/***/ }),
-
-/***/ 470:
-/***/ (function(__unusedmodule, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-const command_1 = __webpack_require__(431);
-const path = __webpack_require__(622);
-/**
- * The code to exit an action
- */
-var ExitCode;
-(function (ExitCode) {
- /**
- * A code indicating that the action was successful
- */
- ExitCode[ExitCode["Success"] = 0] = "Success";
- /**
- * A code indicating that the action was a failure
- */
- ExitCode[ExitCode["Failure"] = 1] = "Failure";
-})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
-//-----------------------------------------------------------------------
-// Variables
-//-----------------------------------------------------------------------
-/**
- * sets env variable for this action and future actions in the job
- * @param name the name of the variable to set
- * @param val the value of the variable
- */
-function exportVariable(name, val) {
- process.env[name] = val;
- command_1.issueCommand('set-env', { name }, val);
-}
-exports.exportVariable = exportVariable;
-/**
- * exports the variable and registers a secret which will get masked from logs
- * @param name the name of the variable to set
- * @param val value of the secret
- */
-function exportSecret(name, val) {
- exportVariable(name, val);
- command_1.issueCommand('set-secret', {}, val);
-}
-exports.exportSecret = exportSecret;
-/**
- * Prepends inputPath to the PATH (for this action and future actions)
- * @param inputPath
- */
-function addPath(inputPath) {
- command_1.issueCommand('add-path', {}, inputPath);
- process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
-}
-exports.addPath = addPath;
-/**
- * Gets the value of an input. The value is also trimmed.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string
- */
-function getInput(name, options) {
- const val = process.env[`INPUT_${name.replace(' ', '_').toUpperCase()}`] || '';
- if (options && options.required && !val) {
- throw new Error(`Input required and not supplied: ${name}`);
- }
- return val.trim();
-}
-exports.getInput = getInput;
-/**
- * Sets the value of an output.
- *
- * @param name name of the output to set
- * @param value value to store
- */
-function setOutput(name, value) {
- command_1.issueCommand('set-output', { name }, value);
-}
-exports.setOutput = setOutput;
-//-----------------------------------------------------------------------
-// Results
-//-----------------------------------------------------------------------
-/**
- * Sets the action status to failed.
- * When the action exits it will be with an exit code of 1
- * @param message add error issue message
- */
-function setFailed(message) {
- process.exitCode = ExitCode.Failure;
- error(message);
-}
-exports.setFailed = setFailed;
-//-----------------------------------------------------------------------
-// Logging Commands
-//-----------------------------------------------------------------------
-/**
- * Writes debug message to user log
- * @param message debug message
- */
-function debug(message) {
- command_1.issueCommand('debug', {}, message);
-}
-exports.debug = debug;
-/**
- * Adds an error issue
- * @param message error issue message
- */
-function error(message) {
- command_1.issue('error', message);
-}
-exports.error = error;
-/**
- * Adds an warning issue
- * @param message warning issue message
- */
-function warning(message) {
- command_1.issue('warning', message);
-}
-exports.warning = warning;
-//# sourceMappingURL=core.js.map
-
-/***/ }),
-
-/***/ 521:
-/***/ (function(__unusedmodule, exports) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-function wait(milliseconds) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise(resolve => {
- if (isNaN(milliseconds)) {
- throw new Error('milliseconds not a number');
- }
- setTimeout(() => resolve('done!'), milliseconds);
- });
- });
-}
-exports.wait = wait;
-
-
-/***/ }),
-
-/***/ 622:
-/***/ (function(module) {
-
-module.exports = require("path");
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};e[t].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(429)}return startup()}({87:function(e){e.exports=require("os")},429:function(e,t,r){e.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t] [...]
\ No newline at end of file
diff --git a/jest.config.js b/jest.config.js
index 563d4cc..9bac3cc 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -5,7 +5,7 @@ module.exports = {
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
- '^.+\\.ts$': 'ts-jest'
+ '^.+\\.ts$': 'ts-jest',
},
- verbose: true
-}
\ No newline at end of file
+ verbose: true,
+}
diff --git a/package-lock.json b/package-lock.json
index d942ec4..e087e51 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
- "name": "typescript-action",
- "version": "0.0.0",
+ "name": "checks-action",
+ "version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -9,6 +9,24 @@
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
"integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw=="
},
+ "@actions/github": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@actions/github/-/github-2.1.1.tgz",
+ "integrity": "sha512-kAgTGUx7yf5KQCndVeHSwCNZuDBvPyxm5xKTswW2lofugeuC1AZX73nUUVDNaysnM9aKFMHv9YCdVJbg7syEyA==",
+ "requires": {
+ "@actions/http-client": "^1.0.3",
+ "@octokit/graphql": "^4.3.1",
+ "@octokit/rest": "^16.43.1"
+ }
+ },
+ "@actions/http-client": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.6.tgz",
+ "integrity": "sha512-LGmio4w98UyGX33b/W6V6Nx/sQHRXZ859YlMkn36wPsXPB82u8xTVlA/Dq2DXrm6lEq9RVmisRJa1c+HETAIJA==",
+ "requires": {
+ "tunnel": "0.0.6"
+ }
+ },
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
@@ -411,6 +429,163 @@
"@types/yargs": "^13.0.0"
}
},
+ "@octokit/auth-token": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz",
+ "integrity": "sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==",
+ "requires": {
+ "@octokit/types": "^2.0.0"
+ }
+ },
+ "@octokit/endpoint": {
+ "version": "5.5.3",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.3.tgz",
+ "integrity": "sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ==",
+ "requires": {
+ "@octokit/types": "^2.0.0",
+ "is-plain-object": "^3.0.0",
+ "universal-user-agent": "^5.0.0"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
+ "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==",
+ "requires": {
+ "isobject": "^4.0.0"
+ }
+ },
+ "isobject": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
+ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA=="
+ },
+ "universal-user-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz",
+ "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==",
+ "requires": {
+ "os-name": "^3.1.0"
+ }
+ }
+ }
+ },
+ "@octokit/graphql": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.3.1.tgz",
+ "integrity": "sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA==",
+ "requires": {
+ "@octokit/request": "^5.3.0",
+ "@octokit/types": "^2.0.0",
+ "universal-user-agent": "^4.0.0"
+ }
+ },
+ "@octokit/plugin-paginate-rest": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
+ "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==",
+ "requires": {
+ "@octokit/types": "^2.0.1"
+ }
+ },
+ "@octokit/plugin-request-log": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz",
+ "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw=="
+ },
+ "@octokit/plugin-rest-endpoint-methods": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz",
+ "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==",
+ "requires": {
+ "@octokit/types": "^2.0.1",
+ "deprecation": "^2.3.1"
+ }
+ },
+ "@octokit/request": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.2.tgz",
+ "integrity": "sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g==",
+ "requires": {
+ "@octokit/endpoint": "^5.5.0",
+ "@octokit/request-error": "^1.0.1",
+ "@octokit/types": "^2.0.0",
+ "deprecation": "^2.0.0",
+ "is-plain-object": "^3.0.0",
+ "node-fetch": "^2.3.0",
+ "once": "^1.4.0",
+ "universal-user-agent": "^5.0.0"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
+ "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==",
+ "requires": {
+ "isobject": "^4.0.0"
+ }
+ },
+ "isobject": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
+ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA=="
+ },
+ "node-fetch": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
+ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
+ },
+ "universal-user-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz",
+ "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==",
+ "requires": {
+ "os-name": "^3.1.0"
+ }
+ }
+ }
+ },
+ "@octokit/request-error": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz",
+ "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==",
+ "requires": {
+ "@octokit/types": "^2.0.0",
+ "deprecation": "^2.0.0",
+ "once": "^1.4.0"
+ }
+ },
+ "@octokit/rest": {
+ "version": "16.43.1",
+ "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz",
+ "integrity": "sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==",
+ "requires": {
+ "@octokit/auth-token": "^2.4.0",
+ "@octokit/plugin-paginate-rest": "^1.1.1",
+ "@octokit/plugin-request-log": "^1.0.0",
+ "@octokit/plugin-rest-endpoint-methods": "2.4.0",
+ "@octokit/request": "^5.2.0",
+ "@octokit/request-error": "^1.0.2",
+ "atob-lite": "^2.0.0",
+ "before-after-hook": "^2.0.0",
+ "btoa-lite": "^1.0.0",
+ "deprecation": "^2.0.0",
+ "lodash.get": "^4.4.2",
+ "lodash.set": "^4.3.2",
+ "lodash.uniq": "^4.5.0",
+ "octokit-pagination-methods": "^1.1.0",
+ "once": "^1.4.0",
+ "universal-user-agent": "^4.0.0"
+ }
+ },
+ "@octokit/types": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.3.1.tgz",
+ "integrity": "sha512-rvJP1Y9A/+Cky2C3var1vsw3Lf5Rjn/0sojNl2AjCX+WbpIHYccaJ46abrZoIxMYnOToul6S9tPytUVkFI7CXQ==",
+ "requires": {
+ "@types/node": ">= 8"
+ }
+ },
"@types/babel__core": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz",
@@ -501,8 +676,7 @@
"@types/node": {
"version": "12.12.14",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz",
- "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==",
- "dev": true
+ "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA=="
},
"@types/stack-utils": {
"version": "1.0.1",
@@ -808,6 +982,11 @@
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
+ "atob-lite": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
+ "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY="
+ },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -1005,6 +1184,11 @@
"tweetnacl": "^0.14.3"
}
},
+ "before-after-hook": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
+ "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A=="
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -1085,6 +1269,11 @@
"node-int64": "^0.4.0"
}
},
+ "btoa-lite": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
+ "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc="
+ },
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
@@ -1334,7 +1523,6 @@
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
@@ -1346,8 +1534,7 @@
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
}
}
},
@@ -1488,6 +1675,11 @@
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
+ "deprecation": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
+ "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
+ },
"detect-newline": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
@@ -1538,7 +1730,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "dev": true,
"requires": {
"once": "^1.4.0"
}
@@ -2116,7 +2307,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
@@ -3020,7 +3210,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
"requires": {
"pump": "^3.0.0"
}
@@ -3552,8 +3741,7 @@
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
- "dev": true
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-symbol": {
"version": "1.0.3",
@@ -3591,8 +3779,7 @@
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
- "dev": true
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isobject": {
"version": "3.0.1",
@@ -4336,12 +4523,22 @@
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
+ "lodash.get": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
+ },
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
"dev": true
},
+ "lodash.set": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
+ "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM="
+ },
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
@@ -4354,6 +4551,11 @@
"integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=",
"dev": true
},
+ "lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M="
+ },
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -4363,6 +4565,11 @@
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
+ "macos-release": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz",
+ "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA=="
+ },
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
@@ -4563,8 +4770,7 @@
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"node-fetch": {
"version": "2.1.2",
@@ -4638,7 +4844,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "dev": true,
"requires": {
"path-key": "^2.0.0"
}
@@ -4780,11 +4985,15 @@
"has": "^1.0.3"
}
},
+ "octokit-pagination-methods": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
+ "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ=="
+ },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
"requires": {
"wrappy": "1"
}
@@ -4822,6 +5031,15 @@
"word-wrap": "~1.2.3"
}
},
+ "os-name": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
+ "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
+ "requires": {
+ "macos-release": "^2.2.0",
+ "windows-release": "^3.1.0"
+ }
+ },
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
@@ -4840,8 +5058,7 @@
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
- "dev": true
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-limit": {
"version": "1.3.0",
@@ -4924,8 +5141,7 @@
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
- "dev": true
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-parse": {
"version": "1.0.6",
@@ -5054,7 +5270,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -5497,7 +5712,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
@@ -5505,8 +5719,7 @@
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
- "dev": true
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"shellwords": {
"version": "0.1.1",
@@ -5517,8 +5730,7 @@
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"sisteransi": {
"version": "1.0.4",
@@ -5871,8 +6083,7 @@
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
- "dev": true
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strip-json-comments": {
"version": "2.0.1",
@@ -6103,6 +6314,11 @@
"tslib": "^1.8.1"
}
},
+ "tunnel": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
+ },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -6165,6 +6381,14 @@
"set-value": "^2.0.1"
}
},
+ "universal-user-agent": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz",
+ "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==",
+ "requires": {
+ "os-name": "^3.1.0"
+ }
+ },
"unset-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@@ -6323,7 +6547,6 @@
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "dev": true,
"requires": {
"isexe": "^2.0.0"
}
@@ -6334,6 +6557,14 @@
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
+ "windows-release": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz",
+ "integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==",
+ "requires": {
+ "execa": "^1.0.0"
+ }
+ },
"word-wrap": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
@@ -6382,8 +6613,7 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write": {
"version": "1.0.3",
diff --git a/package.json b/package.json
index 44a03cd..e5b09a3 100644
--- a/package.json
+++ b/package.json
@@ -1,31 +1,32 @@
{
- "name": "typescript-action",
- "version": "0.0.0",
+ "name": "checks-action",
+ "version": "0.1.0",
"private": true,
- "description": "TypeScript template action",
- "main": "lib/main.js",
+ "description": "GitHub Action which wraps calls to GitHub Checks API",
+ "main": "dist/index.js",
"scripts": {
"build": "tsc",
- "format": "prettier --write **/*.ts",
- "format-check": "prettier --check **/*.ts",
- "lint": "eslint src/**/*.ts",
- "pack": "ncc build",
+ "format": "prettier --write *.js **/*.ts",
+ "format-check": "prettier --check *.js **/*.ts",
+ "lint": "eslint .",
+ "pack": "ncc build -m",
"test": "jest",
"all": "npm run build && npm run format && npm run lint && npm run pack && npm test"
},
"repository": {
"type": "git",
- "url": "git+https://github.com/actions/typescript-action.git"
+ "url": "git+https://github.com/LouisBrunner/checks-action.git"
},
"keywords": [
+ "github",
"actions",
- "node",
- "setup"
+ "checks"
],
- "author": "YourNameOrOrganization",
+ "author": "Louis Brunner",
"license": "MIT",
"dependencies": {
- "@actions/core": "^1.2.0"
+ "@actions/core": "^1.2.0",
+ "@actions/github": "^2.1.1"
},
"devDependencies": {
"@types/jest": "^24.0.23",
diff --git a/src/main.ts b/src/main.ts
index b167fb5..9395a0a 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,16 +1,14 @@
import * as core from '@actions/core'
-import {wait} from './wait'
+import * as github from '@actions/github'
async function run(): Promise<void> {
try {
- const ms: string = core.getInput('milliseconds')
- core.debug(`Waiting ${ms} milliseconds ...`)
+ const token: string = core.getInput('token')
- core.debug(new Date().toTimeString())
- await wait(parseInt(ms, 10))
- core.debug(new Date().toTimeString())
+ core.debug(`Setting up OctoKit`)
+ const octokit = new github.GitHub(token)
- core.setOutput('time', new Date().toTimeString())
+ // TODO: finish
} catch (error) {
core.setFailed(error.message)
}
diff --git a/src/wait.ts b/src/wait.ts
deleted file mode 100644
index b169d9a..0000000
--- a/src/wait.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export async function wait(milliseconds: number): Promise<string> {
- return new Promise(resolve => {
- if (isNaN(milliseconds)) {
- throw new Error('milliseconds not a number')
- }
-
- setTimeout(() => resolve('done!'), milliseconds)
- })
-}
diff --git a/tsconfig.json b/tsconfig.json
index f6e7cb5..4983060 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,12 +1,12 @@
{
"compilerOptions": {
- "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
- "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
- "outDir": "./lib", /* Redirect output structure to the directory. */
- "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
- "strict": true, /* Enable all strict type-checking options. */
- "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
- "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+ "target": "es6",
+ "module": "commonjs",
+ "outDir": "./lib",
+ "rootDir": "./src",
+ "strict": true,
+ "noImplicitAny": true,
+ "esModuleInterop": true
},
"exclude": ["node_modules", "**/*.test.ts"]
}