Skip to content

Commit

Permalink
Require username; NOT setting config implies not adding person to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
rlmartin committed Dec 9, 2022
1 parent 24082d3 commit 3aaefec
Show file tree
Hide file tree
Showing 10 changed files with 717 additions and 582 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/upgrade-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions src/person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Organization } from './organization';

export interface PersonProps extends BaseProps {
readonly admin?: boolean;
readonly username?: string;
readonly username: string;
}

export class Person<
Expand All @@ -20,15 +20,13 @@ export class Person<
) {
super(scope, namespace, config);

if (this._props.username) {
new github.membership.Membership(this, `${namespace}-membership`, {
username: this._props.username,
role: this._props.admin ? 'admin' : 'member',
});
}
new github.membership.Membership(this, `${namespace}-membership`, {
username: this._props.username,
role: this._props.admin ? 'admin' : 'member',
});
}

get username(): string | undefined {
get username(): string {
return this._props.username;
}
}
Loading

0 comments on commit 3aaefec

Please sign in to comment.