From 52555fc7a9bc402c233c5e04fa7397fef3fc3bb6 Mon Sep 17 00:00:00 2001 From: Tom Pallister Date: Thu, 20 Jan 2022 09:10:44 +0000 Subject: [PATCH] switch to main for default branch (#1559) --- .circleci/config.yml | 8 ++++---- README.md | 4 ++-- build.cake | 10 +++++----- docs/building/releaseprocess.rst | 6 +++--- docs/features/caching.rst | 2 +- docs/features/configuration.rst | 2 +- docs/features/graphql.rst | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17196a4f8..256bb0bad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,17 +16,17 @@ jobs: - run: dotnet tool restore && dotnet cake --target=Release workflows: version: 2 - master: + main: jobs: - queue/block_workflow: time: "20" - only-on-branch: master + only-on-branch: main - release: requires: - queue/block_workflow filters: branches: - only: master + only: main develop: jobs: - build: @@ -39,5 +39,5 @@ workflows: filters: branches: ignore: - - master + - main - develop diff --git a/README.md b/README.md index cf4c860a1..959c788d8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![Ocelot Logo](/images/ocelot_logo.png) -[![CircleCI](https://circleci.com/gh/ThreeMammals/Ocelot/tree/master.svg?style=svg)](https://circleci.com/gh/ThreeMammals/Ocelot/tree/master) +[![CircleCI](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main.svg?style=svg)](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main) -[![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=master)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=main)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=main) [Slack](https://threemammals.slack.com) diff --git a/build.cake b/build.cake index 88832358d..f4ad12125 100644 --- a/build.cake +++ b/build.cake @@ -200,7 +200,7 @@ Task("RunUnitTests") // ReportGenerator(coverageSummaryFile, artifactsForUnitTestsDir); // https://github.com/danielpalme/ReportGenerator - if (IsRunningOnCircleCI() && IsMaster()) + if (IsRunningOnCircleCI() && IsMain()) { var repoToken = EnvironmentVariable(coverallsRepoToken); if (string.IsNullOrEmpty(repoToken)) @@ -431,7 +431,7 @@ private void PublishPackages(ConvertableDirectoryPath packagesDir, ConvertableFi private void CreateGitHubRelease() { - var json = $"{{ \"tag_name\": \"{versioning.NuGetVersion}\", \"target_commitish\": \"master\", \"name\": \"{versioning.NuGetVersion}\", \"body\": \"{ReleaseNotesAsJson()}\", \"draft\": true, \"prerelease\": true }}"; + var json = $"{{ \"tag_name\": \"{versioning.NuGetVersion}\", \"target_commitish\": \"main\", \"name\": \"{versioning.NuGetVersion}\", \"body\": \"{ReleaseNotesAsJson()}\", \"draft\": true, \"prerelease\": true }}"; var content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, "application/json"); @@ -487,7 +487,7 @@ private void UploadFileToGitHubRelease(FilePath file) private void CompleteGitHubRelease() { - var json = $"{{ \"tag_name\": \"{versioning.NuGetVersion}\", \"target_commitish\": \"master\", \"name\": \"{versioning.NuGetVersion}\", \"body\": \"{ReleaseNotesAsJson()}\", \"draft\": false, \"prerelease\": false }}"; + var json = $"{{ \"tag_name\": \"{versioning.NuGetVersion}\", \"target_commitish\": \"main\", \"name\": \"{versioning.NuGetVersion}\", \"body\": \"{ReleaseNotesAsJson()}\", \"draft\": false, \"prerelease\": false }}"; var request = new System.Net.Http.HttpRequestMessage(new System.Net.Http.HttpMethod("Patch"), $"https://api.github.com/repos/ThreeMammals/Ocelot/releases/{releaseId}"); request.Content = new System.Net.Http.StringContent(json, System.Text.Encoding.UTF8, "application/json"); @@ -545,7 +545,7 @@ private bool IsRunningOnCircleCI() return !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("CIRCLECI")); } -private bool IsMaster() +private bool IsMain() { - return Environment.GetEnvironmentVariable("CIRCLE_BRANCH").ToLower() == "master"; + return Environment.GetEnvironmentVariable("CIRCLE_BRANCH").ToLower() == "main"; } \ No newline at end of file diff --git a/docs/building/releaseprocess.rst b/docs/building/releaseprocess.rst index 7a89a1f07..40da81567 100644 --- a/docs/building/releaseprocess.rst +++ b/docs/building/releaseprocess.rst @@ -2,7 +2,7 @@ Release process =============== * The release process works best with Git Flow branching. -* Contributors can do whatever they want on PRs and merges to master will result in packages being released to GitHub and NuGet. +* Contributors can do whatever they want on PRs and merges to main will result in packages being released to GitHub and NuGet. Ocelot uses the following process to accept work into the NuGet packages. @@ -25,7 +25,7 @@ In order for a PR to be merged the following must have occured. 5. After the PR is merged to develop the Ocelot NuGet packages will not be updated until a release is created. -6. When enough work has been completed to justify a new release. Develop will be merged into master the release process will begin which builds the code, versions it, pushes artifacts to GitHub and NuGet packages to NuGet. +6. When enough work has been completed to justify a new release. Develop will be merged into main the release process will begin which builds the code, versions it, pushes artifacts to GitHub and NuGet packages to NuGet. 7. The final step is to go back to GitHub and close any issues that are now fixed. You should see something like this in`GitHub `_ and this in `NuGet `_. @@ -34,4 +34,4 @@ Notes All NuGet package builds & releases are done with CircleCI `here _` and all releases are done from `here _`. -Only TomPallister can merge releases into master at the moment. This is to ensure there is a final quality gate in place. Tom is mainly looking for security issues on the final merge. +Only TomPallister can merge releases into main at the moment. This is to ensure there is a final quality gate in place. Tom is mainly looking for security issues on the final merge. diff --git a/docs/features/caching.rst b/docs/features/caching.rst index 9f3368a63..f6c2a7fd2 100644 --- a/docs/features/caching.rst +++ b/docs/features/caching.rst @@ -29,7 +29,7 @@ Finally in order to use caching on a route in your Route configuration add this In this example ttl seconds is set to 15 which means the cache will expire after 15 seconds. -If you look at the example `here `_ you can see how the cache manager is setup and then passed into the Ocelot AddCacheManager configuration method. You can use any settings supported by the CacheManager package and just pass them in. +If you look at the example `here `_ you can see how the cache manager is setup and then passed into the Ocelot AddCacheManager configuration method. You can use any settings supported by the CacheManager package and just pass them in. Anyway Ocelot currently supports caching on the URL of the downstream service and setting a TTL in seconds to expire the cache. You can also clear the cache for a region by calling Ocelot's administration API. diff --git a/docs/features/configuration.rst b/docs/features/configuration.rst index b931032ac..d41b05a88 100644 --- a/docs/features/configuration.rst +++ b/docs/features/configuration.rst @@ -1,7 +1,7 @@ Configuration ============ -An example configuration can be found `here `_. There are two sections to the configuration. An array of Routes and a GlobalConfiguration. The Routes are the objects that tell Ocelot how to treat an upstream request. The Global configuration is a bit hacky and allows overrides of Route specific settings. It's useful if you don't want to manage lots of Route specific settings. +An example configuration can be found `here `_. There are two sections to the configuration. An array of Routes and a GlobalConfiguration. The Routes are the objects that tell Ocelot how to treat an upstream request. The Global configuration is a bit hacky and allows overrides of Route specific settings. It's useful if you don't want to manage lots of Route specific settings. .. code-block:: json diff --git a/docs/features/graphql.rst b/docs/features/graphql.rst index df0b2b00a..5c74c0564 100644 --- a/docs/features/graphql.rst +++ b/docs/features/graphql.rst @@ -4,7 +4,7 @@ GraphQL OK you got me Ocelot doesn't directly support GraphQL but so many people have asked about it I wanted to show how easy it is to integrate the `graphql-dotnet `_ library. -Please see the sample project `OcelotGraphQL `_. Using a combination of the graphql-dotnet project and Ocelot's DelegatingHandler features this is pretty easy to do. +Please see the sample project `OcelotGraphQL `_. Using a combination of the graphql-dotnet project and Ocelot's DelegatingHandler features this is pretty easy to do. However I do not intend to integrate more closely with GraphQL at the moment. Check out the samples readme and that should give you enough instruction on how to do this! Good luck and have fun :>