Skip to content

Latest commit

 

History

History
260 lines (139 loc) · 7.82 KB

API.md

File metadata and controls

260 lines (139 loc) · 7.82 KB

API Reference

Classes

Name Description
Member No description
Repository No description
Team No description

Structs

Name Description
MemberConfig No description
RepositoryConfig No description

Enums

Name Description
RepositoryPermissions No description

class Member

Implements: IConstruct, IResource, IConstruct Extends: Resource

Initializer

new Member(scope: Construct, name: string, config: MemberConfig)
  • scope (Construct) No description
  • name (string) No description
  • config (MemberConfig) No description
    • teams (Array<Team>) No description
    • isOwner (boolean) No description Optional

Properties

Name Type Description
isOwner boolean
name string
role string

class Repository

Implements: IConstruct, IResource, IConstruct Extends: Resource

Initializer

new Repository(scope: Construct, name: string, config: RepositoryConfig)
  • scope (Construct) No description
  • name (string) No description
  • config (RepositoryConfig) No description
    • allowMergeCommit (boolean) Add all commits from the head branch to the base branch with a merge commit. Optional
    • allowRebaseMerge (boolean) No description Optional
    • allowSquashMerge (boolean) No description Optional
    • archived (boolean) No description Optional
    • autoInit (boolean) No description Optional
    • defaultBranch (string) Can only be set after initial repository creation, and only if the target branch exists. Optional
    • deleteBranchOnMerge (boolean) No description Optional
    • description (string) No description Optional
    • gitignoreTemplate (string) No description Optional
    • hasDownloads (boolean) No description Optional
    • hasIssues (boolean) No description Optional
    • hasProjects (boolean) No description Optional
    • hasWiki (boolean) No description Optional
    • homepageUrl (string) No description Optional
    • isTemplate (boolean) No description Optional
    • licenseTemplate (string) No description Optional
    • private (boolean) No description Optional
    • topics (Array) No description Optional

Properties

Name Type Description
name string
resource Repository
static Permissions RepositoryPermissions

Methods

addTeam(team, permission)

addTeam(team: Team, permission: RepositoryPermissions): void

protectBranch(branch)

protectBranch(branch: string): void
  • branch (string) No description

requirePullRequestReviews(count, branch?)

requirePullRequestReviews(count: number, branch?: string): void
  • count (number) No description
  • branch (string) No description

class Team

Implements: IConstruct, IResource, IConstruct Extends: Resource

Initializer

new Team(scope: Construct, name: string)
  • scope (Construct) No description
  • name (string) No description

Properties

Name Type Description
resource Team

Methods

addMember(member)

addMember(member: Member): void
  • member (Member) No description

struct MemberConfig

Name Type Description
teams Array<Team>
isOwner? boolean Optional

struct RepositoryConfig

Name Type Description
allowMergeCommit? boolean Add all commits from the head branch to the base branch with a merge commit.
Optional
allowRebaseMerge? boolean Optional
allowSquashMerge? boolean Optional
archived? boolean Optional
autoInit? boolean Optional
defaultBranch? string Can only be set after initial repository creation, and only if the target branch exists.
Optional
deleteBranchOnMerge? boolean Optional
description? string Optional
gitignoreTemplate? string Optional
hasDownloads? boolean Optional
hasIssues? boolean Optional
hasProjects? boolean Optional
hasWiki? boolean Optional
homepageUrl? string Optional
isTemplate? boolean Optional
licenseTemplate? string Optional
private? boolean Optional
topics? Array Optional

enum RepositoryPermissions

Name Description
PULL Recommended for non-code contributors who want to view or discuss your project.
TRIAGE Recommended for contributors who need to proactively manage issues and pull requests without write access.
PUSH Recommended for contributors who actively push to your project.
MAINTAIN Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
ADMIN Recommended for people who need full access to the project, including sensitive and destructive actions like managing security or deleting a repository.