| 468 | } |
| 469 | |
| 470 | function updateRepo(repos) { |
| 471 | $('.repo-menu').empty().append('<div class="scm-new-repo scm-item MocG8c epDKCb LMgvRb" tabindex="0" role="option"><div class="kRoyt MbhUzd ziS7vd"></div><span class="vRMGwf oJeWuf">Create new repo</span></div>'); |
| 472 | if (scm.canUseGist) { |
| 473 | $('.repo-menu').append('<div class="scm-use-gist scm-item MocG8c epDKCb LMgvRb" tabindex="0" role="option" scm-content="repo" data="gist"><div class="kRoyt MbhUzd ziS7vd"></div><span class="vRMGwf oJeWuf">gist</span></div>'); |
| 474 | } |
| 475 | |
| 476 | repos.forEach((repo) => { |
| 477 | let content = `<div class="scm-item MocG8c epDKCb LMgvRb" tabindex="-1" role="option" scm-content="repo" data="${repo}"><div class="kRoyt MbhUzd ziS7vd"></div><span class="vRMGwf oJeWuf">${repo}</span></div>`; |
| 478 | $('.repo-menu').append(content); |
| 479 | }); |
| 480 | showLog("Repository updated"); |
| 481 | const repo = getRepo(); |
| 482 | if (repo) { |
| 483 | $('#scm-bind-repo').text(repo.fullName); |
| 484 | return repo.fullName; |
| 485 | } |
| 486 | return null; |
| 487 | } |
| 488 | |
| 489 | function updateGist() { |
| 490 | if (!isGist()) { |