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

Detect isRepoRoot on branches with slashes #16

Merged
merged 1 commit into from
Jul 1, 2020
Merged

Detect isRepoRoot on branches with slashes #16

merged 1 commit into from
Jul 1, 2020

Conversation

FloEdelmann
Copy link
Member

Closes #15.

@@ -462,8 +464,12 @@ const getRepoPath = (url: URL | Location = location): string | undefined => {
return undefined;
};

/** 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