Skip to content

Commit

Permalink
Update references from master to main (#1739)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Jun 25, 2021
1 parent 1c889f5 commit 9717e57
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This repository contains useful tools that the Azure SDK team utilizes across th
| Package or Intent | Path | Description | Status |
| ------------------------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Check Enforcer | [Readme](tools/check-enforcer/README.md) | Manage GitHub check-runs in a mono-repo. | Not Yet Enabled |
| doc-warden | [Readme](packages/python-packages/doc-warden/README.md) | A tool used to enforce readme standards across Azure SDK Repos. | [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/108?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=108&branchName=master) |
| http-fault-injector | [Readme](tools/http-fault-injector/README.md) | HTTP proxy server for testing HTTP clients during "faults" like "connection closed in middle of body". | [![Build Status](https://dev.azure.com/azure-sdk/internal/_apis/build/status/tools/tools%20-%20http-fault-injector?branchName=master)](https://dev.azure.com/azure-sdk/internal/_build/latest?definitionId=2340&branchName=master) |
| doc-warden | [Readme](packages/python-packages/doc-warden/README.md) | A tool used to enforce readme standards across Azure SDK Repos. | [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/108?branchName=main)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=108&branchName=main) |
| http-fault-injector | [Readme](tools/http-fault-injector/README.md) | HTTP proxy server for testing HTTP clients during "faults" like "connection closed in middle of body". | [![Build Status](https://dev.azure.com/azure-sdk/internal/_apis/build/status/tools/tools%20-%20http-fault-injector?branchName=main)](https://dev.azure.com/azure-sdk/internal/_build/latest?definitionId=2340&branchName=main) |
| Maven Plugin for Snippets | [Readme](packages/java-packages/snippet-replacer-maven-plugin/README.md) | A Maven plugin that that updates code snippets referenced from javadoc comments. | Not Yet Enabled |
| pixel insertion tool | [Readme](scripts/python/readme_tracking/readme.md) | A tool used to insert the requests for images served by `pixel server`. | Not Yet Enabled |
| pixel-server | [Readme](web/pixel-server/README.md) | A tiny ASP.NET Core site used to serve a pixel and record impressions. | Not Yet Enabled |
Expand All @@ -27,6 +27,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

[![Azure DevOps builds](https://img.shields.io/azure-devops/build/azure-sdk/internal/1372?label=eng%2Fcommon%20sync)](https://dev.azure.com/azure-sdk/internal/_build/latest?definitionId=1372&branchName=master)
[![Azure DevOps builds](https://img.shields.io/azure-devops/build/azure-sdk/internal/1372?label=eng%2Fcommon%20sync)](https://dev.azure.com/azure-sdk/internal/_build/latest?definitionId=1372&branchName=main)

C:/repo/sdk-tools/packages/java-packages/snippet-replacer-maven-plugin
2 changes: 1 addition & 1 deletion eng/common/scripts/Verify-Links.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
List of http status codes that count as broken links. Defaults to 400, 401, 404, SocketError.HostNotFound = 11001, SocketError.NoData = 11004.
.PARAMETER branchReplaceRegex
Regex to check if the link needs to be replaced. E.g. ^(https://github.com/.*/(?:blob|tree)/)master(/.*)$
Regex to check if the link needs to be replaced. E.g. ^(https://github.com/.*/(?:blob|tree)/)main(/.*)$
.PARAMETER branchReplacementName
The substitute branch name or SHA commit.
Expand Down
10 changes: 5 additions & 5 deletions eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ function GetAdjustedReadmeContent($pkgInfo){
$fileContent = $fileContent -replace $titleRegex, "`${0} - Version $($pkgInfo.PackageVersion) `n"
$foundTitle = $matches["filetitle"]
}
# Replace github master link with release tag.
# Replace github main link with release tag.
$ReplacementPattern = "`${1}$($pkgInfo.Tag)"
$fileContent = $fileContent -replace $releaseReplaceRegex, $ReplacementPattern

$header = "---`ntitle: $foundTitle`nkeywords: Azure, $Language, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $Language`nms.service: $service`n---`n"

if ($fileContent) {
Expand Down Expand Up @@ -101,7 +101,7 @@ foreach ($config in $targets) {
if ($pkgsFiltered) {
Write-Host "Given the visible artifacts, $($config.mode) Readme updates against $($config.path_to_config) will be processed for the following packages."
Write-Host ($pkgsFiltered | % { $_.PackageId + " " + $_.PackageVersion })

foreach ($packageInfo in $pkgsFiltered) {
$readmeName = "$($packageInfo.DocsReadMeName.ToLower())-readme${suffix}.md"
$readmeFolder = Join-Path $DocRepoLocation $config.content_folder
Expand All @@ -115,12 +115,12 @@ foreach ($config in $targets) {
if ($packageInfo.ReadmeContent) {
$adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo
}

if ($adjustedContent) {
try {
Push-Location $DocRepoLocation
Set-Content -Path $readmeLocation -Value $adjustedContent -Force

Write-Host "Updated readme for $readmeName."
} catch {
Write-Host $_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public GitHubService(ILogger<GitHubService> logger)
}

/// <summary>
/// Looks for CODEOWNERS in the master branch of the given repo URL using cache
/// Looks for CODEOWNERS in the main branch of the given repo URL using cache
/// </summary>
/// <param name="repoUrl">GitHub repository URL</param>
/// <returns>Contents fo the located CODEOWNERS file</returns>
Expand All @@ -36,7 +36,7 @@ public async Task<string> GetCodeownersFile(Uri repoUrl)
string result;
if (codeownersFileCache.TryGetValue(repoUrl.ToString(), out result))
{
return result;
return result;
}

result = await GetCodeownersFileImpl(repoUrl);
Expand All @@ -45,7 +45,7 @@ public async Task<string> GetCodeownersFile(Uri repoUrl)
}

/// <summary>
/// Looks for CODEOWNERS in the master branch of the given repo URL
/// Looks for CODEOWNERS in the main branch of the given repo URL
/// </summary>
/// <param name="repoUrl"></param>
/// <returns></returns>
Expand All @@ -55,7 +55,7 @@ private async Task<string> GetCodeownersFileImpl(Uri repoUrl)
var relevantPathParts = repoUrl.Segments.Skip(1).Take(2);
var repoPath = string.Join("", relevantPathParts);

var codeOwnersUrl = $"https://raw.githubusercontent.com/{repoPath}/master/.github/CODEOWNERS";
var codeOwnersUrl = $"https://raw.githubusercontent.com/{repoPath}/main/.github/CODEOWNERS";
var result = await httpClient.GetAsync(codeOwnersUrl);
if (result.IsSuccessStatusCode)
{
Expand Down

0 comments on commit 9717e57

Please sign in to comment.