Skip to content

Commit

Permalink
Merge pull request #884 from microsoftgraph/dev
Browse files Browse the repository at this point in the history
Merge dev to master
  • Loading branch information
baywet authored Aug 16, 2024
2 parents 1ca64fb + fa69b4a commit 91fa74b
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 225 deletions.
39 changes: 2 additions & 37 deletions .github/policies/msgraph-sdk-dotnet-core-branch-protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,9 @@ resource: repository
configuration:
branchProtectionRules:

- branchNamePattern: dev
- branchNamePattern: main
# This branch pattern applies to the following branches:
# dev

# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: false
# 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
requiredStatusChecks:
- Build and Test # Contains CodeQL
- license/cla
# Require branches to be up to date before merging. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false

- branchNamePattern: master
# This branch pattern applies to the following branches:
# 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
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Auto-merge dependabot updates

on:
pull_request:
branches: [ dev ]
branches: [ main ]

permissions:
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types:
- opened
branches:
- "dev"
- "main"

jobs:
track_issue:
Expand Down
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ Package.StoreAssociation.xml
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
UpgradeLog*.htm
.idea/
21 changes: 1 addition & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +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 **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.
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.

Some things to note about this project:

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

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

### How the library is built
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.

### How the generator works
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.

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.

### When new features are added to the library
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:
- A new workload comes to v1.0 of Graph (Microsoft Teams, Batching, etc.)
- There is significant addition of functionality (Delta Queries, etc.)

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).

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.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,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-core/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-core/blob/main/THIRD%20PARTY%20NOTICES) for information on the packages referenced via NuGet.
8 changes: 4 additions & 4 deletions docs/contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ 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.
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.

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

## 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.
8 changes: 4 additions & 4 deletions pipelines/productionBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
trigger:
branches:
include:
- master
- main
paths:
include:
- src/*
Expand Down Expand Up @@ -65,7 +65,7 @@ extends:
echo "##vso[task.setvariable variable=JAVA_HOME]$(JAVA_HOME_11_X64)"
echo "##vso[task.setvariable variable=PATH]$(JAVA_HOME_11_X64)\bin;$(PATH)"
- task: PowerShell@2
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
displayName: 'Validate updated version'
inputs:
targetType: filePath
Expand Down Expand Up @@ -235,7 +235,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 @@ -264,7 +264,7 @@ extends:
inputs:
targetType: filePath
filePath: '$(Pipeline.Workspace)\scripts\GetLatestCommitSHA.ps1'
arguments: '-repo "msgraph-sdk-dotnet-core" -owner "microsoftgraph" -branchName "master"'
arguments: '-repo "msgraph-sdk-dotnet-core" -owner "microsoftgraph" -branchName "main"'
pwsh: true
- task: PowerShell@2
displayName: 'Extract release information to pipeline'
Expand Down
4 changes: 2 additions & 2 deletions scripts/GetLatestCommitSHA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
.Parameter repo
Specifies the name of the repository.
.Parameter branchName
Specifies the target branch name. The default value is 'master'.
Specifies the target branch name. The default value is 'main'.
#>

Param(
[string]$owner,
[string]$repo,
[string]$branchName = "master"
[string]$branchName = "main"
)

if ([string]::IsNullOrEmpty($owner)) {
Expand Down
56 changes: 0 additions & 56 deletions scripts/IncrementMinorVersion.ps1

This file was deleted.

91 changes: 0 additions & 91 deletions scripts/IncrementPreviewVersion.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------

using System;
using Azure.Core;
using Microsoft.Kiota.Abstractions.Authentication;

Expand All @@ -18,7 +19,19 @@ public class AzureIdentityAuthenticationProvider : BaseBearerTokenAuthentication
/// <param name="allowedHosts">The list of allowed hosts for which to request access tokens.</param>
/// <param name="scopes">The scopes to request the access token for.</param>
/// <param name="observabilityOptions">The observability options to use for the authentication provider.</param>
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, params string[] scopes) : base(new AzureIdentityAccessTokenProvider(credential, allowedHosts, observabilityOptions, scopes))
/// <param name="isCaeEnabled">Determines if the Continuous Access Evaluation (CAE) is enabled.</param>
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, bool isCaeEnabled = true, params string[] scopes) : base(new AzureIdentityAccessTokenProvider(credential, allowedHosts, observabilityOptions, isCaeEnabled, scopes))
{
}
/// <summary>
/// The <see cref="AzureIdentityAuthenticationProvider"/> constructor
/// </summary>
/// <param name="credential">The credential implementation to use to obtain the access token.</param>
/// <param name="allowedHosts">The list of allowed hosts for which to request access tokens.</param>
/// <param name="scopes">The scopes to request the access token for.</param>
/// <param name="observabilityOptions">The observability options to use for the authentication provider.</param>
[Obsolete("Use the constructor that takes an isCaeEnabled parameter instead.")]
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, params string[] scopes) : this(credential, allowedHosts, observabilityOptions, true, scopes)
{
}
}
2 changes: 1 addition & 1 deletion src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- VersionPrefix major and patch versions must be manually set. -->
<VersionSuffix></VersionSuffix>
<PackageReleaseNotes>
- https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/blob/dev/CHANGELOG.md
- https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/blob/main/CHANGELOG.md
</PackageReleaseNotes>
<!-- By default let the Maui targets be excluded to make contribution for external parties easier and dependabot updates. They can be enabled by adding `-p:IncludeMauiTargets=true` to the target build/restore command which is done in the CI.-->
<TargetFrameworks>netstandard2.0;net462;$(MauiTargets)</TargetFrameworks>
Expand Down
Loading

0 comments on commit 91fa74b

Please sign in to comment.