diff --git a/.github/policies/msgraph-sdk-javascript-branch-protection.yml b/.github/policies/msgraph-sdk-javascript-branch-protection.yml index a82e58857..72a7868ad 100644 --- a/.github/policies/msgraph-sdk-javascript-branch-protection.yml +++ b/.github/policies/msgraph-sdk-javascript-branch-protection.yml @@ -44,9 +44,9 @@ configuration: # Restrict who can dismiss pull request reviews. boolean restrictsReviewDismissals: false - - branchNamePattern: master + - branchNamePattern: main # This branch pattern applies to the following branches as of 08/30/2023: - # master + # main # Specifies whether this branch can be deleted. boolean allowsDeletions: false diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f06c371af..0b1c5dcf2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,7 +13,7 @@ name: "CodeQL" on: push: - branches: [ dev, 3.0.0, master, support/v2, v2/dev ] + branches: [ dev, 3.0.0, main, support/v2, v2/dev ] pull_request: # The branches below must be a subset of the branches above branches: [ dev ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91872017c..bba5474ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,7 +100,7 @@ To make the contribution process as seamless as possible, follow these steps. #### To create a new branch -1.Open Git Bash. 2.At the Git Bash command prompt, type `git pull upstream master:`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch. 3.At the Git Bash command prompt, type `git push origin `. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub. 4.At the Git Bash command prompt, type `git checkout ` to switch to your new branch. +1.Open Git Bash. 2.At the Git Bash command prompt, type `git pull upstream main:`. This creates a new branch locally that is copied from the latest MicrosoftGraph main branch. 3.At the Git Bash command prompt, type `git push origin `. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub. 4.At the Git Bash command prompt, type `git checkout ` to switch to your new branch. #### Add new content or edit existing content @@ -154,7 +154,7 @@ When you're finished with your work and are ready to have it merged into the mai 1. In the Git Bash command prompt, type `git push origin `. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork. 2. On the GitHub site, navigate in your fork to the new branch. 3. Choose the **Pull Request** button at the top of the page. -4. Verify the Base branch is `microsoftgraph/@master` and the Head branch is `/@`. +4. Verify the Base branch is `microsoftgraph/@main` and the Head branch is `/@`. 5. Choose the **Update Commit Range** button. 6. Add a title to your pull request, and describe all the changes you're making. 7. Submit the pull request. @@ -165,10 +165,10 @@ One of the site administrators will process your pull request. Your pull request After a branch is successfully merged (that is, your pull request is accepted), don't continue working in that local branch. This can lead to merge conflicts if you submit another pull request. To do another update, create a new local branch from the successfully merged upstream branch, and then delete your initial local branch. -For example, if your local branch X was successfully merged into the OfficeDev/microsoft-graph-docs master branch and you want to make additional updates to the content that was merged. Create a new local branch, X2, from the OfficeDev/microsoft-graph-docs master branch. To do this, open GitBash and execute the following commands: +For example, if your local branch X was successfully merged into the OfficeDev/microsoft-graph-docs main branch and you want to make additional updates to the content that was merged. Create a new local branch, X2, from the OfficeDev/microsoft-graph-docs main branch. To do this, open GitBash and execute the following commands: cd microsoft-graph-docs - git pull upstream master:X2 + git pull upstream main:X2 git push origin X2 You now have local copies (in a new local branch) of the work that you submitted in branch X. The X2 branch also contains all the work other writers have merged, so if your work depends on others' work (for example, shared images), it is available in the new branch. You can verify that your previous work (and others' work) is in the branch by checking out the new branch... @@ -183,7 +183,7 @@ Once your changes are successfully merged into the main repository, delete the b #### To delete a branch -1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed). +1. In the Git Bash command prompt, type `git checkout main`. This ensures that you aren't in the branch to be deleted (which isn't allowed). 2. Next, at the command prompt, type `git branch -d `. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.) 3. Finally, type `git push origin :` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork. diff --git a/README-Localized/README-es-es.md b/README-Localized/README-es-es.md index 97ef0641a..40a2ca972 100644 --- a/README-Localized/README-es-es.md +++ b/README-Localized/README-es-es.md @@ -6,7 +6,7 @@ La biblioteca cliente de JavaScript de Microsoft Graph es un envase reducido en **¿Busca IntelliSense en los modelos (usuarios, grupos, etc.)? Vea el repositorio de [tipos de Microsoft Graph](https://github.com/microsoftgraph/msgraph-typescript-typings).** -[![Demostración de TypeScript](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![Demostración de TypeScript](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## Instalación diff --git a/README-Localized/README-fr-fr.md b/README-Localized/README-fr-fr.md index fb16cc028..0a9ac3152 100644 --- a/README-Localized/README-fr-fr.md +++ b/README-Localized/README-fr-fr.md @@ -6,7 +6,7 @@ La bibliothèque client JavaScript de Microsoft Graph est une enveloppe légère **Vous recherchez IntelliSense sur les modèles (utilisateurs, groupes, etc.) ? Consultez les [types Microsoft Graph](https://github.com/microsoftgraph/msgraph-typescript-typings) référentiel !** -[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## Installation diff --git a/README-Localized/README-ja-jp.md b/README-Localized/README-ja-jp.md index f5d1baaee..e6a9c0a21 100644 --- a/README-Localized/README-ja-jp.md +++ b/README-Localized/README-ja-jp.md @@ -6,7 +6,7 @@ Microsoft Graph JavaScript クライアント ライブラリは、Microsoft Gra **モデル (ユーザー、グループなど) で IntelliSense を探していますか ?[Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) リポジトリをご覧ください !** -[![TypeScript でも](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![TypeScript でも](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## インストール diff --git a/README-Localized/README-pt-br.md b/README-Localized/README-pt-br.md index 7bf45d545..96df4d655 100644 --- a/README-Localized/README-pt-br.md +++ b/README-Localized/README-pt-br.md @@ -6,7 +6,7 @@ A biblioteca do cliente Microsoft Graph JavaScript é um invólucro leve em torn **Procurando o IntelliSense nos modelos (usuários, grupos, etc.)? Confira o](https://github.com/microsoftgraph/msgraph-typescript-typings) repositório [do Microsoft Graph Types!** -[![Demonstração TypeScript ](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![Demonstração TypeScript ](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## Instalação diff --git a/README-Localized/README-ru-ru.md b/README-Localized/README-ru-ru.md index cab82c2b8..5696d67fa 100644 --- a/README-Localized/README-ru-ru.md +++ b/README-Localized/README-ru-ru.md @@ -6,7 +6,7 @@ **Требуется IntelliSense для моделей (пользователи, группы и т. п.)? Ознакомьтесь с репозиторием [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings).** -[![Демонстрация TypeScript](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![Демонстрация TypeScript](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## Установка diff --git a/README-Localized/README-zh-cn.md b/README-Localized/README-zh-cn.md index 12a835fef..9ecc557b4 100644 --- a/README-Localized/README-zh-cn.md +++ b/README-Localized/README-zh-cn.md @@ -6,7 +6,7 @@ Microsoft Graph JavaScript 客户端库轻型 Microsoft Graph API 包装器, **正常查找模型上的 IntelliSense(用户、组等)?查看 [Microsoft Graph 类型](https://github.com/microsoftgraph/msgraph-typescript-typings)存储库!** -[![TypeScript 演示](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![TypeScript 演示](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## 安装 diff --git a/README.md b/README.md index 187a0fefe..d2f31fc62 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ The Microsoft Graph JavaScript client library is a lightweight wrapper around th **Looking for IntelliSense on models (Users, Groups, etc.)? Check out the Microsoft Graph Types [v1.0](https://github.com/microsoftgraph/msgraph-typescript-typings) and [beta](https://github.com/microsoftgraph/msgraph-beta-typescript-typings)!!** -[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) +[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/main/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings) ## Node version requirement diff --git a/design/large-file-upload-task-design.md b/design/large-file-upload-task-design.md index cf4b3468b..65fa61805 100644 --- a/design/large-file-upload-task-design.md +++ b/design/large-file-upload-task-design.md @@ -71,7 +71,7 @@ sliceFile(range: Range): ArrayBuffer | Blob { ###### 2. Support large file uploads to Outlook API - Bug in the current implemenation - `response.id !== undefined` this condition to mark the completion of an upload does not work for Outlook API since the final response does not contain a response body. -- An upload task should be marked as completed if the response status is a 201. [SDK-design document](https://github.com/microsoftgraph/msgraph-sdk-design/blob/master/tasks/FileUploadTask.md). +- An upload task should be marked as completed if the response status is a 201. [SDK-design document](https://github.com/microsoftgraph/msgraph-sdk-design/blob/main/tasks/FileUploadTask.md). - The LargeFileUploadTask should allow uploads to OneDrive API, Outlook API and PrintDocument API. - Proposed changes- - Add class `UploadResult` containing `location` and `responseBody` properties. diff --git a/docs/CreatingClientInstance.md b/docs/CreatingClientInstance.md index f2a707983..0aca2cbd8 100644 --- a/docs/CreatingClientInstance.md +++ b/docs/CreatingClientInstance.md @@ -33,7 +33,7 @@ const client = Client.initWithMiddleware(clientOptions); The Microsoft Graph JavaScript Client Library has an adapter implementation for the following - -- ([TokenCredentialAuthenticationProvider](../src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts)) to support [Azure Identity TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) (Azure Identity client library for JavaScript) which takes care of getting the `accessToken`. @azure/identity library does not ship with this library, user has to include it externally (For including @azure/identity, refer [this](https://www.npmjs.com/package/@azure/identity)). +- ([TokenCredentialAuthenticationProvider](../src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts)) to support [Azure Identity TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) (Azure Identity client library for JavaScript) which takes care of getting the `accessToken`. @azure/identity library does not ship with this library, user has to include it externally (For including @azure/identity, refer [this](https://www.npmjs.com/package/@azure/identity)). > Learn how to [create an instance of TokenCredentialAuthenticationProvider](./TokenCredentialAuthenticationProvider.md). diff --git a/docs/TokenCredentialAuthenticationProvider.md b/docs/TokenCredentialAuthenticationProvider.md index f48394460..bf0306cf5 100644 --- a/docs/TokenCredentialAuthenticationProvider.md +++ b/docs/TokenCredentialAuthenticationProvider.md @@ -4,7 +4,7 @@ ###### Links for more information - -- [GitHub - Azure Identity client library for JavaScript ](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) +- [GitHub - Azure Identity client library for JavaScript ](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md) - [npm - Azure Identity client library for JavaScript](https://www.npmjs.com/package/@azure/identity) @@ -22,7 +22,7 @@ import { TokenCredentialAuthenticationProvider, TokenCredentialAuthenticationPro // Create an instance of the TokenCredential class that is imported const tokenCredential = new ClientSecretCredential("your_tenantId", "your_clientId", "your_clientSecret"); -// Set your scopes and options for TokenCredential.getToken (Check the ` interface GetTokenOptions` in (TokenCredential Implementation)[https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/src/tokenCredential.ts]) +// Set your scopes and options for TokenCredential.getToken (Check the ` interface GetTokenOptions` in (TokenCredential Implementation)[https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/src/tokenCredential.ts]) const options: TokenCredentialAuthenticationProviderOptions = { scopes: [scopes], getTokenOptions }; @@ -45,7 +45,7 @@ const { TokenCredentialAuthenticationProvider } = require("@microsoft/microsoft- // Create an instance of the TokenCredential class that is imported const credential = new ClientSecretCredential(tenantId, clientId, clientSecret); -// Set your scopes and options for TokenCredential.getToken (Check the ` interface GetTokenOptions` in (TokenCredential Implementation)[https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/src/tokenCredential.ts]) +// Set your scopes and options for TokenCredential.getToken (Check the ` interface GetTokenOptions` in (TokenCredential Implementation)[https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/src/tokenCredential.ts]) const authProvider = new TokenCredentialAuthenticationProvider(credential, { scopes: [scopes] }); diff --git a/scripts/src/MergeChangesTillLastestRelease.ps1 b/scripts/src/MergeChangesTillLastestRelease.ps1 index 14aae487b..0fea898b1 100644 --- a/scripts/src/MergeChangesTillLastestRelease.ps1 +++ b/scripts/src/MergeChangesTillLastestRelease.ps1 @@ -7,11 +7,11 @@ Param( Write-Host "Merge and Commit the changes into '$($branchName)' till last release:" -ForegroundColor Magenta; Write-Host "Checking out '$($branchName)'" -ForegroundColor Blue; -git checkout master | Write-Host; +git checkout main | Write-Host; Write-Host "Checked out" -ForegroundColor Green; Write-Host "Pulling '$($branchName)'" -ForegroundColor Blue; -git pull origin master --allow-unrelated-histories | Write-Host; +git pull origin main --allow-unrelated-histories | Write-Host; Write-Host "Pulled '$($branchName)'" -ForegroundColor Green; Write-Host "Getting SHA for last commit in the latest release" -ForegroundColor Blue; diff --git a/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts b/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts index 9e4b63bf5..5e70ebc77 100644 --- a/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts +++ b/src/authentication/azureTokenCredentials/TokenCredentialAuthenticationProvider.ts @@ -20,7 +20,7 @@ import { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredential * Class representing TokenCredentialAuthenticationProvider * This feature is introduced in Version 3.0.0 * @extends AuthenticationProvider - * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md + * Reference - https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/README.md */ export class TokenCredentialAuthenticationProvider implements AuthenticationProvider { /** diff --git a/src/content/BatchRequestContent.ts b/src/content/BatchRequestContent.ts index c633c1e33..de30a5c4f 100644 --- a/src/content/BatchRequestContent.ts +++ b/src/content/BatchRequestContent.ts @@ -44,7 +44,7 @@ export interface BatchRequestStep { * @interface * Signature representing single request in a Batching * @extends RequestInit - * @see {@link https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L1337} and {@link https://fetch.spec.whatwg.org/#requestinit} + * @see {@link https://github.com/Microsoft/TypeScript/blob/main/lib/lib.dom.d.ts#L1337} and {@link https://fetch.spec.whatwg.org/#requestinit} * * @property {string} url - The url value of the request */