renovatebot-github/src/input.ts
Jeroen de Bruijn ec8a542458
refactor: convert project to typescript (#47)
* refactor: convert project to typescript

* fix: image as last argument of docker run

* ci: remove example as the build can act as example

* fix: set tokenEnv to RENOVATE_TOKEN

* fix: add trailing single quite to Docker --env arguments

* fix: mount volume with config file to Docker container

* chore: remove Prettier trailingComma on all

This puts it back at the default, which is es5 style.

* fix: correct package main to dist/indes.js

* fix: use @actions/exec to execute docker child process

* fix: use async/await for exec

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* fix: use async/await in the runner

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2020-05-04 08:19:15 +02:00

20 lines
397 B
TypeScript

import * as core from '@actions/core';
class Input {
readonly configurationFile = core.getInput('configurationFile', {
required: true,
});
readonly token = core.getInput('token', { required: true });
constructor() {
this.validate();
}
validate(): void {
if (this.token === '') {
throw new Error('input.token MUST NOT be empty');
}
}
}
export default Input;