Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migrating issues between repositories with the same name. #167

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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