diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs index 200b8adcbe3..58efcc50e38 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs @@ -55,7 +55,9 @@ public AzureDevOpsArtifactFeed(string name, string organization, string project) } break; default: - throw new NotImplementedException($"Organization '{organization}' contains no feed permissions information."); + // Use the default permissions + Permissions = null; + break; } } diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/CreateAzureDevOpsFeed.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/CreateAzureDevOpsFeed.cs index 49032c55350..3c53d6da07f 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/CreateAzureDevOpsFeed.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/CreateAzureDevOpsFeed.cs @@ -104,9 +104,8 @@ private async Task ExecuteAsync() // 1. In nuget.config files (and elsewhere), the name at a glance can identify its visibility // 2. Existing automation has knowledge of "darc-int" and "darc-pub" for purposes of injecting authentication for internal builds // and managing the isolated feeds within the NuGet.config files. - string accessTag = GetFeedVisibilityTag(AzureDevOpsOrg, AzureDevOpsProject); string extraContentInfo = !string.IsNullOrEmpty(ContentIdentifier) ? $"-{ContentIdentifier}" : ""; - string baseFeedName = FeedName ?? $"darc-{accessTag}{extraContentInfo}-{feedCompatibleRepositoryName}-{CommitSha.Substring(0, ShaUsableLength)}"; + string baseFeedName = FeedName ?? $"darc-{GetFeedVisibilityTag(AzureDevOpsOrg, AzureDevOpsProject)}{extraContentInfo}-{feedCompatibleRepositoryName}-{CommitSha.Substring(0, ShaUsableLength)}"; string versionedFeedName = baseFeedName; bool needsUniqueName = false; int subVersion = 0; @@ -204,7 +203,7 @@ private string GetFeedVisibilityTag(string organization, string project) throw new NotImplementedException($"Project '{project}' within organization '{organization}' has no visibility mapping."); } default: - throw new NotImplementedException($"Organization '{organization}' has no visibility mapping."); + return project.Substring(0, Math.Min(3, project.Length)); } } }