Skip to content

Commit

Permalink
fix: move types from lib to interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
imjohnbo committed Nov 25, 2020
1 parent c468f10 commit 28b3c76
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
28 changes: 28 additions & 0 deletions interfaces/types.d.ts
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '')

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 28b3c76

Please sign in to comment.