Skip to content

Commit

Permalink
chore: align branch to single main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Aug 16, 2024
1 parent e8f8eba commit b9c1ef4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
trigger:
branches:
include:
- master
- main
pr: none
variables:
BuildConfiguration: 'release'
Expand Down Expand Up @@ -99,7 +99,7 @@ extends:
arguments: '--configuration $(BuildConfiguration) --verbosity normal --no-build'
- task: PowerShell@2
displayName: 'Validate updated version'
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
inputs:
targetType: filePath
filePath: '$(Build.SourcesDirectory)\scripts\ValidateUpdatedNugetVersion.ps1'
Expand Down Expand Up @@ -239,7 +239,7 @@ extends:
TargetFolder: '$(Build.ArtifactStagingDirectory) '

- stage: deploy
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
dependsOn: build
jobs:
- deployment: deploy_nuget
Expand Down Expand Up @@ -268,7 +268,7 @@ extends:
inputs:
targetType: filePath
filePath: '$(Pipeline.Workspace)\scripts\GetLatestCommitSHA.ps1'
arguments: '-repo "msgraph-sdk-dotnet" -owner "microsoftgraph" -branchName "master"'
arguments: '-repo "msgraph-sdk-dotnet" -owner "microsoftgraph" -branchName "main"'
pwsh: true
- task: PowerShell@2
displayName: 'Extract release information to pipeline'
Expand Down
4 changes: 2 additions & 2 deletions .github/policies/msgraph-sdk-dotnet-branch-protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ resource: repository
configuration:
branchProtectionRules:

- branchNamePattern: master
- branchNamePattern: main
# This branch pattern applies to the following branches as of 06/12/2023 10:31:13:
# master
# main

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
Expand Down
2 changes: 1 addition & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
manifest: true
primaryBranch: master
primaryBranch: main
handleGHRelease: true
4 changes: 2 additions & 2 deletions .github/workflows/validatePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Validate Pull Request
on:
workflow_dispatch:
push:
branches: [ 'feature/*', 'dev' ,'master' ]
branches: [ 'feature/*', 'main' ]
pull_request:
branches: [ 'feature/*', 'dev' ,'master' ]
branches: [ 'feature/*', 'main' ]

permissions:
contents: read #those permissions are required to run the codeql analysis
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ There are a few different recommended paths to get contributions into the releas
The best way to get started with a contribution is to start a dialog with us. Sometimes features will be under development or out of scope for this library, and it's best to check before starting work on contribution, especially for large work items.

## Pull requests
All pull requests should be submitted against the **master** branch or a specific feature branch. The master branch is intended to represent the code released in the most-recent Nuget package.
All pull requests should be submitted against the **main** branch or a specific feature branch. The main branch is intended to represent the code released in the most-recent Nuget package.

## Commit message format

Expand Down Expand Up @@ -42,7 +42,7 @@ The recommended commit types used are:

Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.

When a new package is about to be release, the release PR will be merged into master. The package will be generated from master.
When a new package is about to be release, the release PR will be merged into main. The package will be generated from main.

Some things to note about this project:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ If you are looking to build the library locally for the purposes of contributing
## License

Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT [license](LICENSE.txt). See [Third Party Notices](https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/master/THIRD%20PARTY%20NOTICES) for information on the packages referenced via NuGet.
Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT [license](LICENSE.txt). See [Third Party Notices](https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/main/THIRD%20PARTY%20NOTICES) for information on the packages referenced via NuGet.
8 changes: 3 additions & 5 deletions docs/contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ The best way to get started with a contribution is to start a dialog with the ow

## Pull requests

If you are making documentation changes, feel free to submit a pull request against the **master** branch. All other pull requests should be submitted against the **dev** branch or a specific **feature** branch. The **master** branch is intended to represent the code released in the most-recent Nuget package.

When a new package is about to be released, changes in **dev** will be merged into **master**. The package will be generated from **master**.
If you are making documentation changes, feel free to submit a pull request against the **main** or a specific **feature** branch. The **main** branch is intended to represent the code released in the most-recent Nuget package.

## Submit pull requests for trivial changes

If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the **dev** branch.
If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the **main** branch.

Revisions of this nature will result in a 0.0.X change of the version number.

## Submit pull requests for features

If major functionality is being added it should be submitted against the **dev** branch. If the functionality will require multiple changes or iterations before it is ready for **dev**, feel free to submit pull requests into a dedicated **feature** branch until the whole change is ready.
If major functionality is being added it should be submitted against the **main** branch. If the functionality will require multiple changes or iterations before it is ready for **main**, feel free to submit pull requests into a dedicated **feature** branch until the whole change is ready.

Revisions of this nature will result in a 0.X.X change of the version number.
2 changes: 1 addition & 1 deletion scripts/GetLatestCommitSHA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Param(
[string]$owner,
[string]$repo,
[string]$branchName = "master"
[string]$branchName = "main"
)

if ([string]::IsNullOrEmpty($owner)) {
Expand Down

0 comments on commit b9c1ef4

Please sign in to comment.