Skip to content

Commit 51d09e1

Browse files
author
Andrew Omondi
committed
Cleanup branch protection rules and branch alignement
1 parent 80b8084 commit 51d09e1

15 files changed

+23
-223
lines changed

.github/policies/msgraph-sdk-dotnet-core-branch-protection.yml

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,9 @@ resource: repository
99
configuration:
1010
branchProtectionRules:
1111

12-
- branchNamePattern: dev
12+
- branchNamePattern: main
1313
# This branch pattern applies to the following branches:
14-
# dev
15-
16-
# Specifies whether this branch can be deleted. boolean
17-
allowsDeletions: false
18-
# Specifies whether forced pushes are allowed on this branch. boolean
19-
allowsForcePushes: false
20-
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
21-
dismissStaleReviews: true
22-
# Specifies whether admins can overwrite branch protection. boolean
23-
isAdminEnforced: false
24-
# Indicates whether "Require a pull request before merging" is enabled. boolean
25-
requiresPullRequestBeforeMerging: true
26-
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
27-
requiredApprovingReviewsCount: 1
28-
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
29-
requireCodeOwnersReview: true
30-
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
31-
requiresCommitSignatures: false
32-
# Are conversations required to be resolved before merging? boolean
33-
requiresConversationResolution: true
34-
# Are merge commits prohibited from being pushed to this branch. boolean
35-
requiresLinearHistory: false
36-
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
37-
requiredStatusChecks:
38-
- Build and Test # Contains CodeQL
39-
- license/cla
40-
# Require branches to be up to date before merging. boolean
41-
requiresStrictStatusChecks: true
42-
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
43-
restrictsPushes: false
44-
# Restrict who can dismiss pull request reviews. boolean
45-
restrictsReviewDismissals: false
46-
47-
- branchNamePattern: master
48-
# This branch pattern applies to the following branches:
49-
# master
14+
# main
5015

5116
# Specifies whether this branch can be deleted. boolean
5217
allowsDeletions: false

.github/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
manifest: true
2-
primaryBranch: master
2+
primaryBranch: main
33
handleGHRelease: true

.github/workflows/auto-merge-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Auto-merge dependabot updates
22

33
on:
44
pull_request:
5-
branches: [ dev ]
5+
branches: [ main ]
66

77
permissions:
88
pull-requests: write

.github/workflows/project-auto-add.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
types:
1010
- opened
1111
branches:
12-
- "dev"
12+
- "main"
1313

1414
jobs:
1515
track_issue:

.github/workflows/validatePullRequest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Validate Pull Request
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ 'feature/*', 'dev' ,'master' ]
6+
branches: [ 'feature/*', 'main' ]
77
pull_request:
8-
branches: [ 'feature/*', 'dev' ,'master' ]
8+
branches: [ 'feature/*', 'main' ]
99

1010
permissions:
1111
contents: read #those permissions are required to run the codeql analysis

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ Package.StoreAssociation.xml
3333
_UpgradeReport_Files/
3434
Backup*/
3535
UpgradeLog*.XML
36-
UpgradeLog*.htm
36+
UpgradeLog*.htm
37+
.idea/

CONTRIBUTING.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ There are a few different recommended paths to get contributions into the releas
99
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.
1010

1111
## Pull requests
12-
All 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.
13-
14-
When a new package is about to be released, changes in dev will be merged into master. The package will be generated from master.
12+
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.
1513

1614
Some things to note about this project:
1715

@@ -44,20 +42,3 @@ The recommended commit types used are:
4442
- **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file
4543

4644
Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.
47-
48-
### How the library is built
49-
The .Net client library has a handwritten set of core files and two folders of generated models and request builders. These models and request builders are generated using the [MSGraph SDK Code Generator](https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator). **Changes made to the ```Models``` and ```Requests``` folders will be overwritten** the next time the generator is run.
50-
51-
### How the generator works
52-
You can view the [README](https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/blob/master/README.md) for a full run-through of its capabilities.
53-
54-
For the purposes of the .Net client library, the generator runs through an OData-compliant metadata file published by Microsoft Graph (https://graph.microsoft.com/v1.0/$metadata) and builds up an in-memory list of models. These models are converted into C# code files using T4 templates.
55-
56-
### When new features are added to the library
57-
Generation happens as part of a manual process that occurs once a significant change or set of changes has been added to the Graph. This may include:
58-
- A new workload comes to v1.0 of Graph (Microsoft Teams, Batching, etc.)
59-
- There is significant addition of functionality (Delta Queries, etc.)
60-
61-
However, this is evaluated on a case-by-case basis. If the library is missing v1.0 Graph functionality that you wish to utilize, please [file an issue](https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues).
62-
63-
We do our best to prevent breaking changes from being introduced into the library during this process. If you find a breaking change, please file an issue and we will work to get this resolved ASAP.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ If you are looking to build the library locally for the purposes of contributing
9898
9999
## License
100100

101-
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-core/blob/master/THIRD%20PARTY%20NOTICES) for information on the packages referenced via NuGet.
101+
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-core/blob/main/THIRD%20PARTY%20NOTICES) for information on the packages referenced via NuGet.

docs/contributions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ The best way to get started with a contribution is to start a dialog with the ow
1111

1212
## Pull requests
1313

14-
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.
14+
If you are making documentation changes, feel free to submit a pull request against the **main** branch. Other pull requests could be submitted against a specific **feature** branch.
1515

16-
When a new package is about to be released, changes in **dev** will be merged into **master**. The package will be generated from **master**.
16+
The package will be generated from **main**.
1717

1818
## Submit pull requests for trivial changes
1919

20-
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.
20+
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.
2121

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

2424
## Submit pull requests for features
2525

26-
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.
26+
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.
2727

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

pipelines/productionBuild.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
trigger:
44
branches:
55
include:
6-
- master
6+
- main
77
paths:
88
include:
99
- src/*
@@ -65,7 +65,7 @@ extends:
6565
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_11_X64)"
6666
echo "##vso[task.setvariable variable=PATH]$(JAVA_HOME_11_X64)\bin;$(PATH)"
6767
- task: PowerShell@2
68-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
68+
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
6969
displayName: 'Validate updated version'
7070
inputs:
7171
targetType: filePath
@@ -235,7 +235,7 @@ extends:
235235
TargetFolder: '$(Build.ArtifactStagingDirectory) '
236236

237237
- stage: deploy
238-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
238+
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
239239
dependsOn: build
240240
jobs:
241241
- deployment: deploy_nuget
@@ -264,7 +264,7 @@ extends:
264264
inputs:
265265
targetType: filePath
266266
filePath: '$(Pipeline.Workspace)\scripts\GetLatestCommitSHA.ps1'
267-
arguments: '-repo "msgraph-sdk-dotnet-core" -owner "microsoftgraph" -branchName "master"'
267+
arguments: '-repo "msgraph-sdk-dotnet-core" -owner "microsoftgraph" -branchName "main"'
268268
pwsh: true
269269
- task: PowerShell@2
270270
displayName: 'Extract release information to pipeline'

scripts/GetLatestCommitSHA.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
.Parameter repo
1414
Specifies the name of the repository.
1515
.Parameter branchName
16-
Specifies the target branch name. The default value is 'master'.
16+
Specifies the target branch name. The default value is 'main'.
1717
#>
1818

1919
Param(
2020
[string]$owner,
2121
[string]$repo,
22-
[string]$branchName = "master"
22+
[string]$branchName = "main"
2323
)
2424

2525
if ([string]::IsNullOrEmpty($owner)) {

scripts/IncrementMinorVersion.ps1

Lines changed: 0 additions & 56 deletions
This file was deleted.

scripts/IncrementPreviewVersion.ps1

Lines changed: 0 additions & 91 deletions
This file was deleted.

src/Microsoft.Graph.Core/Tasks/PageIterator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.Graph
1212
using System.Threading.Tasks;
1313

1414
/*
15-
Spec https://github.com/microsoftgraph/msgraph-sdk-design/blob/master/tasks/PageIteratorTask.md
15+
Spec https://github.com/microsoftgraph/msgraph-sdk-design/blob/main/tasks/PageIteratorTask.md
1616
*/
1717

1818
/// <summary>

tests/Microsoft.Graph.DotnetCore.Core.Test/Tasks/PageIteratorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.Graph.DotnetCore.Core.Test.Tasks
2222
using Xunit;
2323

2424
/**
25-
Spec https://github.com/microsoftgraph/msgraph-sdk-design/blob/master/tasks/PageIteratorTask.md
25+
Spec https://github.com/microsoftgraph/msgraph-sdk-design/blob/main/tasks/PageIteratorTask.md
2626
**/
2727
public class PageIteratorTests
2828
{

0 commit comments

Comments
 (0)