Skip to content

Commit

Permalink
Merge pull request #167 from maciejwalkowiak/master
Browse files Browse the repository at this point in the history
Fix migrating issues between repositories with the same name.
  • Loading branch information
johnmurphy01 authored Feb 9, 2021
2 parents fcfa204 + c9260ea commit 7fc4ac1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,7 @@ function compileRepositoryList(list, searchTerm) {
}

mostUsed.forEach((repoFull) => {
// remove organization
var repo = repoFull.substring(repoFull.indexOf('/') + 1)

addRepoToList(repoFull, repo, 'used')
addRepoToList(repoFull, 'used')

// remove the item from the main repos list
list = list.filter((i) => {
Expand All @@ -277,7 +274,7 @@ function compileRepositoryList(list, searchTerm) {
}

list.forEach((repo) => {
addRepoToList(repo.full_name, repo.name)
addRepoToList(repo.full_name)
})
}
)
Expand Down Expand Up @@ -452,9 +449,9 @@ function ajaxRequest(type, data, url) {
})
}

function addRepoToList(repoFullName, repo, section) {
function addRepoToList(repoFullName, section) {
// add the repo to the list
const periodReplace = repo.replace(/\./g, '_')
const periodReplace = repoFullName.replace(/\./g, '_').replace(/\//g, '_')

// determine where the item needs to go
if (section === 'used') {
Expand Down

0 comments on commit 7fc4ac1

Please sign in to comment.