Skip to content

Commit

Permalink
Changing master to trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
DarqueWarrior committed Sep 23, 2020
1 parent 1a5b496 commit 280a320
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .build/CredScanTask.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Credential Scanner (CredScan) in the Build

This repository uses the so called [CredScan created by Microsoft](https://secdevtools.azurewebsites.net/helpcredscan.html#collapseOne) to prevent passwords being added to the master branch.
This repository uses the so called [CredScan created by Microsoft](https://secdevtools.azurewebsites.net/helpcredscan.html#collapseOne) to prevent passwords being added to the trunk branch.

To not even commit credentials to the repository you can download and install a [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=VSIDEDevOpsMSFT.ContinuousDeliveryToolsforVisualStudio&ssr=false#overview). Unfortunately, no VS Code extension is available yet.

Expand Down
4 changes: 2 additions & 2 deletions .docs/Add-VSTeamPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
### Example 1

```powershell
Add-VSTeamPolicy -ProjectName Demo -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/master"})}
Add-VSTeamPolicy -ProjectName Demo -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/trunk"})}
```

This command adds a new policy to the Demo project's repository specified. The policy added requires a minimum number of reviewers and applies to the master branch. Specifying `-blocking` will block pushes to master directly.
This command adds a new policy to the Demo project's repository specified. The policy added requires a minimum number of reviewers and applies to the trunk branch. Specifying `-blocking` will block pushes to trunk directly.

## PARAMETERS

Expand Down
2 changes: 1 addition & 1 deletion .docs/Add-VSTeamPullRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Create a new Pull Request
```powershell
Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
$r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
Add-VSTeamPullRequest -ProjectName project -RepositoryId $r.RepositoryId -SourceRefName "refs/heads/mybranch" -TargetRefName "refs/heads/master" -Title "My PR" -Description "My Description" -Draft
Add-VSTeamPullRequest -ProjectName project -RepositoryId $r.RepositoryId -SourceRefName "refs/heads/mybranch" -TargetRefName "refs/heads/trunk" -Title "My PR" -Description "My Description" -Draft
```

Create a new pull request as a draft
Expand Down
2 changes: 1 addition & 1 deletion .docs/Update-VSTeamPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
### Example 1

```powershell
Update-VSTeamPolicy -ProjectName Demo -id 1 -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/master"})}
Update-VSTeamPolicy -ProjectName Demo -id 1 -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/trunk"})}
```

This command updates an existing policy in the Demo project.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# VSTeam

[![Build Status](https://dev.azure.com/LoECDA/Team%20Module/_apis/build/status/MethodsAndPractices.vsteam?branchName=master)](https://dev.azure.com/LoECDA/Team%20Module/_build/latest?definitionId=62&branchName=master)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/DarqueWarrior/vsteam/blob/master/LICENSE)
[![Documentation - VSTeam](https://img.shields.io/badge/Documentation-VSTeam-blue.svg)](https://github.com/DarqueWarrior/vsteam/blob/master/docs/readme.md)
[![Build Status](https://dev.azure.com/LoECDA/Team%20Module/_apis/build/status/MethodsAndPractices.vsteam?branchName=trunk)](https://dev.azure.com/LoECDA/Team%20Module/_build/latest?definitionId=62&branchName=trunk)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/MethodsAndPractices/vsteam/blob/trunk/LICENSE)
[![Documentation - VSTeam](https://img.shields.io/badge/Documentation-VSTeam-blue.svg)](https://github.com/MethodsAndPractices/vsteam/blob/trunk/docs/readme.md)
[![PowerShell Gallery - VSTeam](https://img.shields.io/badge/PowerShell%20Gallery-VSTeam-blue.svg)](https://www.powershellgallery.com/packages/VSTeam)
[![Minimum Supported PowerShell Version](https://img.shields.io/badge/PowerShell-5.0-blue.svg)](https://github.com/PowerShell/PowerShell)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
Expand All @@ -15,7 +15,7 @@ The VSTeam module is also a provider allowing users to navigate their [Azure Dev

To get started you can visit this blog [PowerShell I would like you to meet TFS and VSTS](http://www.donovanbrown.com/post/PowerShell-I-would-like-you-to-meet-TFS-and-VSTS)

Documentation of the cmdlets can be found in the [docs README](https://github.com/DarqueWarrior/vsteam/blob/master/docs/readme.md) or using `Get-Help VSTeam` once the module is installed.
Documentation of the cmdlets can be found in the [docs README](https://github.com/MethodsAndPractices/vsteam/blob/trunk/docs/readme.md) or using `Get-Help VSTeam` once the module is installed.

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions Source/Private/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ function _getDescriptorForACL {
"aad" {
$descriptor = "Microsoft.IdentityModel.Claims.ClaimsIdentity;$($User.Domain)\\$($User.PrincipalName)"
}
default { throw "User type not handled yet for ACL. Please report this as an issue on the VSTeam Repository: https://github.com/DarqueWarrior/vsteam/issues" }
default { throw "User type not handled yet for ACL. Please report this as an issue on the VSTeam Repository: https://github.com/MethodsAndPractices/vsteam/issues" }
}
}

Expand All @@ -960,7 +960,7 @@ function _getDescriptorForACL {
$sid = _getVSTeamIdFromDescriptor -Descriptor $Group.Descriptor
$descriptor = "Microsoft.TeamFoundation.Identity;$sid"
}
default { throw "Group type not handled yet for Add-VSTeamGitRepositoryPermission. Please report this as an issue on the VSTeam Repository: https://github.com/DarqueWarrior/vsteam/issues" }
default { throw "Group type not handled yet for Add-VSTeamGitRepositoryPermission. Please report this as an issue on the VSTeam Repository: https://github.com/MethodsAndPractices/vsteam/issues" }
}
}

Expand Down
6 changes: 3 additions & 3 deletions Source/VSTeam.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@
# ExternalModuleDependencies = @('SHiPS')

# A URL to the license for this module.
LicenseUri = 'https://github.com/DarqueWarrior/vsteam/blob/master/LICENSE'
LicenseUri = 'https://github.com/MethodsAndPractices/vsteam/blob/trunk/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/DarqueWarrior/vsteam'
ProjectUri = 'https://github.com/MethodsAndPractices/vsteam'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/DarqueWarrior/vsteam/blob/master/CHANGELOG.md'
ReleaseNotes = 'https://github.com/MethodsAndPractices/vsteam/blob/trunk/CHANGELOG.md'

} # End of PSData hashtable

Expand Down
10 changes: 5 additions & 5 deletions Tests/function/tests/Get-VSTeamBuildDefinition.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Describe 'VSTeamBuildDefinition' {

It 'with type parameter "build" should return build definitions by type' {
## Arrange
# This has not been supported since version 2.0 of the API which we
# no longer support. https://github.com/DarqueWarrior/vsteam/issues/87
# This has not been supported since version 2.0 of the API which we
# no longer support. https://github.com/MethodsAndPractices/vsteam/issues/87
Mock Write-Warning

## Act
Expand All @@ -112,10 +112,10 @@ Describe 'VSTeamBuildDefinition' {

It 'with both parameters should return build definitions by filter' {
## Arrange
# This has not been supported since version 2.0 of the API which we
# no longer support. https://github.com/DarqueWarrior/vsteam/issues/87
# This has not been supported since version 2.0 of the API which we
# no longer support. https://github.com/MethodsAndPractices/vsteam/issues/87
Mock Write-Warning

## Act
Get-VSTeamBuildDefinition -projectName vsts -filter 'click*'

Expand Down
12 changes: 6 additions & 6 deletions Tests/integration/tests/_testInitialize.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Set-TestPrep {
$null -eq $env:API_VERSION -or
$null -eq $env:PAT -or
$null -eq $env:EMAIL) {
throw "You must set all environment variables that are needed first to run integration tests. Please see https://github.com/DarqueWarrior/vsteam/blob/master/.github/CONTRIBUTING.md#running-integration-tests for details."
throw "You must set all environment variables that are needed first to run integration tests. Please see https://github.com/MethodsAndPractices/vsteam/blob/trunk/.github/CONTRIBUTING.md#running-integration-tests for details."
}

Write-Verbose " Target: $($env:ACCT)"
Expand All @@ -29,7 +29,7 @@ function Set-TestPrep {
function Set-Project {
$projectName = 'TeamModuleIntegration-' + [guid]::NewGuid().toString().substring(0, 5)
$projectDescription = 'Project for VSTeam integration testing.'

# This will search for a project with the description of our test projects
# if it finds one it will reuse that project instead of creating a new project.
# This makes debuging tests easier and faster.
Expand All @@ -50,18 +50,18 @@ function Set-Project {
Description = $projectDescription
NewName = $projectName + [guid]::NewGuid().toString().substring(0, 5) + '1'
}

Write-Verbose " Project Name: $($target.Name)"
Write-Verbose " Project Desc: $($target.Description)"
Write-Verbose " Project NewName: $($target.NewName)"

return $target
return $target
}

function Get-ProjectName {
# Everytime you run the test a new "$newProjectName" is generated.
# This is fine if you are running all the tests but not if you just
# want to run these. So if the newProjectName can't be found in the
# want to run these. So if the newProjectName can't be found in the
# target system change newProjectName to equal the name of the project
# found with the correct description.
$projectDescription = 'Project for VSTeam integration testing.'
Expand All @@ -75,7 +75,7 @@ function Open-SampleFile {
[string] $file,
[switch] $ReturnValue
)

if ($ReturnValue.IsPresent) {
return $(Get-Content "$sampleFiles\$file" -Raw | ConvertFrom-Json).value
}
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: $(Build.BuildID)

trigger:
- master
- trunk

resources:
- repo: self
Expand Down Expand Up @@ -124,7 +124,7 @@ stages:
inputs:
toolMajorVersion: 'V2'
suppressionsFile: '$(Build.SourcesDirectory)/.build/credscan-supression.json'

- task: PostAnalysis@1
displayName: 'Post Analysis'
inputs:
Expand Down Expand Up @@ -250,7 +250,7 @@ stages:
- stage: Production
displayName: PowerShell Gallery / GitHub Release
dependsOn: Testing
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/trunk'))
jobs:
- deployment: Deploy
displayName: PowerShell Gallery / GitHub Release
Expand Down

0 comments on commit 280a320

Please sign in to comment.