< Back

New-BitBucketRepo

Sun Jan 19, 2020 5:53 pm

NAME New-BitBucketRepo



SYNOPSIS

Create new repository under given project





SYNTAX

New-BitBucketRepo [-Project] <String> [-Repository] <String> [-WithGitFlowBranch] [[-GitIgnoreFileLoc] <String>]

[[-RepoLocalPath] <String>] [[-ForkEnabled] <String>] [-SetDefaultBranch] [-SetBranchPermission]

[[-BranchPermissionJson] <String>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Project <String>

Mandatory - Bitbucket Project ID



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Repository <String>

Mandatory - New Repository name to be created

Note: all below command work if -WithGitFlowBranch is passed to True.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WithGitFlowBranch [<SwitchParameter>]

Optional - Switch if repo to have develop/master branch with GitIgnore file - Default set to false



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-GitIgnoreFileLoc <String>

Optional - if WithGitFlowBranch is set to true, then make sure you have a git ignore file at

C:\\Temp\\.gitignore or

pass the different location with -GitIgnoreFileLoc



Required? false

Position? 3

Default value C:\\Temp\\.gitignore

Accept pipeline input? false

Accept wildcard characters? false



-RepoLocalPath <String>



Required? false

Position? 4

Default value C:\\Git

Accept pipeline input? false

Accept wildcard characters? false



-ForkEnabled <String>

Optional - This is to set repository with fork enabled (true/false). default set to false



Required? false

Position? 5

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-SetDefaultBranch [<SwitchParameter>]

Optional - bydefault Master branch is set to default, to change default branch as develop, pass

-SetDefaultBranch



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-SetBranchPermission [<SwitchParameter>]

Optional - Set Master/Develop branch permission as attached screenshot

to change the permission level/pattern/branch, have your own json file with permission leverl set similar to

one available at Public\\BranchPermission.json

Pass the json file path with param -BranchPermissionJson <FileName>



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-BranchPermissionJson <String>

Optional - BranchPermissionJson custom file path



Required? false

Position? 6

Default value "$PSScriptRoot\\BranchPermission.Json"

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-BitBucketRepo -Project "TES" -Repository "ABC"















RELATED LINKS