Skip to content

Commit

Permalink
Update builder
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKitsune committed Jul 13, 2022
1 parent a43aa38 commit 9a140a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/Octopus.Cli/Commands/Releases/ReleasePlanBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async Task<ReleasePlan> Build(IOctopusAsyncRepository repository,
async Task<Dictionary<string, FeedResource>> LoadFeedsForSteps(IOctopusAsyncRepository repository, ProjectResource project, IEnumerable<ReleasePlanItem> steps)
{
// PackageFeedId can be an id or a name
var allRelevantFeedIdOrName = steps.Select(step => step.PackageFeedId).ToArray();
var allRelevantFeedIds = steps.Select(step => step.PackageFeedId).Distinct().ToArray();

var isVersionControlled = project.IsVersionControlled;
var useIdsForConfigAsCode = (await repository.LoadRootDocument().ConfigureAwait(false)).UseIdsForConfigAsCode();
Expand All @@ -213,8 +213,8 @@ async Task<Dictionary<string, FeedResource>> LoadFeedsForSteps(IOctopusAsyncRepo
}

var allRelevantFeeds = lookupByName
? (await repository.Feeds.FindByNames(allRelevantFeedIdOrName).ConfigureAwait(false)).ToDictionary(feed => feed.Name)
: (await repository.Feeds.Get(allRelevantFeedIdOrName).ConfigureAwait(false)).ToDictionary(feed => feed.Id);
? (await repository.Feeds.FindByNames(allRelevantFeedIds).ConfigureAwait(false)).ToDictionary(feed => feed.Name)
: (await repository.Feeds.Get(allRelevantFeedIds).ConfigureAwait(false)).ToDictionary(feed => feed.Id);

return allRelevantFeeds;
}
Expand Down

0 comments on commit 9a140a6

Please sign in to comment.