Skip to content

Commit

Permalink
fix tako not finding repo details
Browse files Browse the repository at this point in the history
seems like github removed that atom feed, oh well.
  • Loading branch information
brumm committed Apr 1, 2021
1 parent 861f165 commit e26b5e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ export const sortContents = contents =>

export const getRepoDetails = () => {
const [, user, repo, branch] = document
.querySelector('link[type="application/atom+xml"]')
.querySelector('[data-open-app="link"]')
?.href.replace('https://github.com/', '')
.replace('.atom', '')
.replace(/\?token=.*/, '')
.match(
/([a-z\d](?:[a-z\d]|-(?=[a-z\d])?){0,38})\/([a-z0-9]+(?:[._-][a-z0-9]+)*)\/commits\/(.*)/i
/^([a-z\d](?:[a-z\d]|-(?=[a-z\d])?){0,38})\/([a-z0-9]+(?:[._-][a-z0-9]+)*)\/archive\/refs\/heads\/(.*)\.zip$/i
)

const [, path] = window.location.href
Expand Down

0 comments on commit e26b5e1

Please sign in to comment.