Skip to content

Conversation

@FloEdelmann
Copy link
Member

Closes #15.


/** Get the 'user/repo' part from an URL */
const getRepoURL = (url: URL | Location = location): string => url.pathname.slice(1).split('/', 2).join('/');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you import the tests for this function from refined GitHub as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any (or I missed them) 🙁

@fregante fregante added the enhancement New feature or request label Jul 1, 2020
@fregante
Copy link
Member

fregante commented Jul 1, 2020

Tested, it works!

@fregante fregante merged commit 4ff46aa into refined-github:master Jul 1, 2020
@fregante
Copy link
Member

fregante commented Jul 1, 2020

v2 has been published

@FloEdelmann FloEdelmann deleted the is-repo-root branch July 1, 2020 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

isRepoRoot doesn't work on branches with slashes

2 participants