Skip to content

Commit

Permalink
Refactored code for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
yashkohli88 committed Jan 8, 2025
1 parent ac4ff44 commit f14fdb5
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ function isOriginWithRevisionsAllowed(coordinate) {
function getProviderType(type, provider) {
switch (type) {
case 'git':
return 'github'
case 'gem':
return 'rubygems'
return provider
case 'conda':
return `conda/${provider}`
case 'maven':
Expand Down Expand Up @@ -104,10 +103,10 @@ async function compareEndpoints(endpoint) {

async function compareOriginsWithRevisions(coordinates) {
const originUrl = buildOriginUrl(coordinates)
compareEndpoints(`${originUrl}/revisions`)
await compareEndpoints(`${originUrl}/revisions`)
}

async function compareOrigins(coordinates) {
const originUrl = coordinates.startsWith('conda/') ? buildCondaUrl(coordinates) : buildOriginUrl(coordinates)
compareEndpoints(`${originUrl}`)
await compareEndpoints(`${originUrl}`)
}

0 comments on commit f14fdb5

Please sign in to comment.