parent
edc52ebffd
commit
554080d193
@ -1,11 +1,13 @@ |
||||
"use strict"; |
||||
|
||||
import * as express from "express"; |
||||
|
||||
import artifact from "./artifact"; |
||||
import * as manual from "./manual"; |
||||
import postreceive from "./postreceive"; |
||||
import release from "./release"; |
||||
import * as status from "./status"; |
||||
|
||||
const index = (req, res) => res.render("index", { title: `Express<br/>\r\n${req}` }); |
||||
const index: express.RequestHandler = (req, res) => res.render("index", { title: `Express<br/>\r\n${req}` }); |
||||
|
||||
export { index, postreceive, manual, status, artifact, release }; |
||||
|
@ -0,0 +1,50 @@ |
||||
interface IOwnerInfo { |
||||
readonly name: string; |
||||
readonly login: string; |
||||
} |
||||
|
||||
interface IRepositoryInfo { |
||||
readonly owner: IOwnerInfo; |
||||
readonly name: string; |
||||
readonly url: string; |
||||
} |
||||
|
||||
interface ITargetInfo { |
||||
readonly repo: IRepositoryInfo; |
||||
readonly ref: string; |
||||
readonly sha: string; |
||||
} |
||||
|
||||
interface IPullRequestInfo { |
||||
readonly head: ITargetInfo; |
||||
readonly base: ITargetInfo; |
||||
readonly merged: boolean; |
||||
} |
||||
|
||||
export interface IHookPushPayload { |
||||
readonly repository: IRepositoryInfo; |
||||
readonly ref: string; |
||||
readonly after: string; |
||||
} |
||||
|
||||
export interface IHookPullRequestPayload { |
||||
readonly action: "opened" | "reopened" | "closed" | "synchronize" | "other-unsupported-actions"; |
||||
readonly number: number; |
||||
readonly pull_request: IPullRequestInfo; |
||||
} |
||||
|
||||
interface IHookPushParameters { |
||||
readonly eventType: "push"; |
||||
readonly payload: IHookPushPayload; |
||||
} |
||||
|
||||
interface IHookPullRequestParameters { |
||||
readonly eventType: "pull_request"; |
||||
readonly payload: IHookPullRequestPayload; |
||||
} |
||||
|
||||
interface IHookUnsupportedRequestParameters { |
||||
readonly eventType: "other-unsupported-events"; |
||||
} |
||||
|
||||
export type HookParameters = IHookPushParameters | IHookPullRequestParameters | IHookUnsupportedRequestParameters; |
@ -1,66 +1,66 @@ |
||||
import * as Github from "github"; |
||||
|
||||
interface IBuilderSettings { |
||||
builderExecutable: string; |
||||
readonly builderExecutable: string; |
||||
} |
||||
|
||||
interface ICodeAnalysisSettingsUnsupported { |
||||
isCodeAnalysisUnsupported: true; |
||||
readonly isCodeAnalysisUnsupported: true; |
||||
} |
||||
|
||||
interface ICodeAnalysisSettingsSupported { |
||||
eslintBrowserConfig: string; |
||||
ignoreCodeAnalysisByDefault: boolean; |
||||
isCodeAnalysisUnsupported: false; |
||||
readonly eslintBrowserConfig: string; |
||||
readonly ignoreCodeAnalysisByDefault: boolean; |
||||
readonly isCodeAnalysisUnsupported: false; |
||||
} |
||||
|
||||
type CodeAnalysisSettings = ICodeAnalysisSettingsUnsupported | ICodeAnalysisSettingsSupported; |
||||
|
||||
interface ICodeSigningSettingsUnsupported { |
||||
skipCodeSigning: true; |
||||
readonly skipCodeSigning: true; |
||||
} |
||||
|
||||
interface ICodeSigningSettingsSupported { |
||||
codeSigningKeyFile: string; |
||||
codeSigningPublicKey: string; |
||||
skipCodeSigning: false; |
||||
readonly codeSigningKeyFile: string; |
||||
readonly codeSigningPublicKey: string; |
||||
readonly skipCodeSigning: false; |
||||
} |
||||
|
||||
type CodeSigningSettings = ICodeSigningSettingsUnsupported | ICodeSigningSettingsSupported; |
||||
|
||||
interface IStorageSettings { |
||||
gitpath: string; |
||||
releasepath: string; |
||||
tmpcodepath: string; |
||||
readonly gitpath: string; |
||||
readonly releasepath: string; |
||||
readonly tmpcodepath: string; |
||||
} |
||||
|
||||
interface INugetSettings { |
||||
nugetApiKey: string; |
||||
nugetHost: string; |
||||
readonly nugetApiKey: string; |
||||
readonly nugetHost: string; |
||||
} |
||||
|
||||
interface ISmtpSettings { |
||||
smtp: { |
||||
auth: { |
||||
pass: string; |
||||
user: string; |
||||
readonly smtp: { |
||||
readonly auth: { |
||||
readonly pass: string; |
||||
readonly user: string; |
||||
}, |
||||
host: string; |
||||
receiver: string; |
||||
sender: string; |
||||
readonly host: string; |
||||
readonly receiver: string; |
||||
readonly sender: string; |
||||
}; |
||||
} |
||||
|
||||
interface ISiteSettings { |
||||
port: number | string; |
||||
siteRoot: string; |
||||
viewspath: string; |
||||
faviconpath: string; |
||||
staticcontentpath: string; |
||||
readonly port: number | string; |
||||
readonly siteRoot: string; |
||||
readonly viewspath: string; |
||||
readonly faviconpath: string; |
||||
readonly staticcontentpath: string; |
||||
} |
||||
|
||||
interface IGithubSettings { |
||||
createGithub: (repoOwner: string) => Github; |
||||
readonly createGithub: (repoOwner: string) => Github; |
||||
} |
||||
|
||||
export type Settings = IBuilderSettings & CodeAnalysisSettings & CodeSigningSettings & IStorageSettings & INugetSettings & ISmtpSettings & ISiteSettings & IGithubSettings; |
||||
|
Loading…
Reference in new issue