Skip to content

Commit

Permalink
PLA-290 Add CodeOwners component
Browse files Browse the repository at this point in the history
  • Loading branch information
quesabe committed Jan 6, 2024
1 parent 55d11df commit 99b3837
Show file tree
Hide file tree
Showing 10 changed files with 1,103 additions and 5 deletions.
14 changes: 13 additions & 1 deletion src/apollo-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ import {TypeScriptAppProject, TypeScriptProjectOptions} from 'projen/lib/typescr
import {WithDocker} from '../common'
import {AssetFile} from '../common/files/AssetFile'
import {WithGitHooks, addHusky, extendGitignore} from '../common/git'
import {ProjenDriftCheckWorkflow, PullRequestTest, WithDefaultWorkflow} from '../common/github'
import {
CodeOwners,
ProjenDriftCheckWorkflow,
PullRequestTest,
WithCodeOwners,
WithDefaultWorkflow,
} from '../common/github'
import {WithCustomLintPaths, addLinters} from '../common/lint'
import {IWithTelemetryReportUrl, WithTelemetry, collectTelemetry, setupTelemetry} from '../common/telemetry'
import {addVsCode} from '../common/vscode-settings'
import {sampleCode} from './sample-code'

export interface OttofellerApolloServerProjectOptions
extends TypeScriptProjectOptions,
WithCodeOwners,
WithDocker,
WithDefaultWorkflow,
WithCustomLintPaths,
Expand Down Expand Up @@ -159,6 +166,11 @@ export class OttofellerApolloServerProject extends TypeScriptAppProject implemen
PullRequestTest.addToProject(this, {...options, isLighthouseEnabled: false})
ProjenDriftCheckWorkflow.addToProject(this, options)

// ANCHOR Code owners
if (this.github && options.codeOwners) {
new CodeOwners(this.github, {codeOwners: options.codeOwners})
}

// ANCHOR Codegen
new AssetFile(this, 'codegen.ts', {sourcePath: path.join(assetsDir, 'codegen.ts'), readonly: false, marker: false})

Expand Down
14 changes: 13 additions & 1 deletion src/cdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import {AwsCdkTypeScriptApp, AwsCdkTypeScriptAppOptions} from 'projen/lib/awscdk
import {NodePackageManager} from 'projen/lib/javascript'
import {AssetFile} from '../common'
import {WithGitHooks, addHusky, extendGitignore} from '../common/git'
import {ProjenDriftCheckWorkflow, PullRequestTest, ReleaseWorkflow, WithDefaultWorkflow} from '../common/github'
import {
CodeOwners,
ProjenDriftCheckWorkflow,
PullRequestTest,
ReleaseWorkflow,
WithCodeOwners,
WithDefaultWorkflow,
} from '../common/github'
import {WithCustomLintPaths, addLinters} from '../common/lint'
import {IWithTelemetryReportUrl, WithTelemetry, collectTelemetry, setupTelemetry} from '../common/telemetry'
import {addVsCode} from '../common/vscode-settings'

export interface OttofellerCDKProjectOptions
extends AwsCdkTypeScriptAppOptions,
WithCodeOwners,
WithDefaultWorkflow,
WithCustomLintPaths,
WithGitHooks,
Expand Down Expand Up @@ -130,6 +138,10 @@ export class OttofellerCDKProject extends AwsCdkTypeScriptApp implements IWithTe
ProjenDriftCheckWorkflow.addToProject(this, options)
}

if (this.github && options.codeOwners) {
new CodeOwners(this.github, {codeOwners: options.codeOwners})
}

// ANCHOR Set up GraphQL
const isGraphqlCodegenEnabled = options.isGraphqlCodegenEnabled ?? false

Expand Down
Loading

0 comments on commit 99b3837

Please sign in to comment.