diff --git a/interfaces/types.d.ts b/interfaces/types.d.ts new file mode 100644 index 0000000..2ab8aab --- /dev/null +++ b/interfaces/types.d.ts @@ -0,0 +1,28 @@ +export interface RepoWithOwner { + owner: string + repo: string +} + +export interface Workflow { + meta: string + raw: string +} + +export interface WorkflowData { + name?: string + path?: string + triggers?: string[] + jobs_count?: number + steps_count?: number +} + +export interface Reports { + workflows: WorkflowData[] + actions: {} +} + +export interface File { + type: string + path: string + html_url: string +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 108f988..8faa6c6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import * as artifact from '@actions/artifact' import * as fs from 'fs' import { ReposGetContentResponseData } from '@octokit/types' import { WorkflowParser } from './workflow-parser' -import { File, RepoWithOwner, Reports, Workflow, WorkflowData } from '../lib/types' +import { File, RepoWithOwner, Reports, Workflow, WorkflowData } from '../interfaces/types' const octokit = github.getOctokit(process.env.GITHUB_TOKEN ?? '') diff --git a/tsconfig.json b/tsconfig.json index c3cf92d..bfbcf37 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "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. */ + "outDir": "interfaces", /* 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. */