Skip to content

Commit 7fc4ac1

Browse files
authored
Merge pull request #167 from maciejwalkowiak/master
Fix migrating issues between repositories with the same name.
2 parents fcfa204 + c9260ea commit 7fc4ac1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,7 @@ function compileRepositoryList(list, searchTerm) {
254254
}
255255

256256
mostUsed.forEach((repoFull) => {
257-
// remove organization
258-
var repo = repoFull.substring(repoFull.indexOf('/') + 1)
259-
260-
addRepoToList(repoFull, repo, 'used')
257+
addRepoToList(repoFull, 'used')
261258

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

279276
list.forEach((repo) => {
280-
addRepoToList(repo.full_name, repo.name)
277+
addRepoToList(repo.full_name)
281278
})
282279
}
283280
)
@@ -452,9 +449,9 @@ function ajaxRequest(type, data, url) {
452449
})
453450
}
454451

455-
function addRepoToList(repoFullName, repo, section) {
452+
function addRepoToList(repoFullName, section) {
456453
// add the repo to the list
457-
const periodReplace = repo.replace(/\./g, '_')
454+
const periodReplace = repoFullName.replace(/\./g, '_').replace(/\//g, '_')
458455

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

0 commit comments

Comments
 (0)