Skip to content

Commit

Permalink
fix: Updated RepoChecker to allow all types of repos (#202)
Browse files Browse the repository at this point in the history
* issue#112 resolved. submitting for review

* issue#112 resolved.
submitting for review

* profile.tsx added line 59

* shifted the function & interface to dateUtils.ts

* shited the function to getContributedRepos.ts

* Update src/popup/pages/profile.tsx

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* Update src/utils/getContributedRepos.ts

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* Update src/utils/getContributedRepos.ts

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* Update src/utils/getContributedRepos.ts

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* Update src/popup/pages/profile.tsx

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* Update src/utils/getContributedRepos.ts

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>

* removed eslint from the loop

* add semicolon to pass lint check

* made the Tools conditional

* added trailing comma to home.txt 37 35

* ran "npm run format"
(i hate lint)

* added useRef and made suitable changes

* removed the dollar sign

* Changed github repo pattern

* changes the urlmatcherstest file

---------

Co-authored-by: Brian Douglas <bdougie@users.noreply.github.com>
Co-authored-by: Divyansh Singh <divyanshanandsingh@gmail.com>
  • Loading branch information
3 people committed Jul 11, 2023
1 parent 50e0812 commit 2161918
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/urlMatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const isGithubProfilePage = (url: string) => {
};

export const isGithubRepoPage = (url: string) => {
const githubRepoPattern = /github\.com\/[^/]+\/[^/]+$/;
const githubRepoPattern = /github\.com\/[^/]+\/[^/]+\/?$/;

return githubRepoPattern.test(url);
};
Expand Down
2 changes: 1 addition & 1 deletion test/utils/urlMatcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test('isGithubRepoPage', () => {
expect(isGithubRepoPage('https://www.github.com/')).toBe(false)
expect(isGithubRepoPage('https://www.github.com/username/')).toBe(false)
expect(isGithubRepoPage('https://www.github.com/username/repo')).toBe(true)
expect(isGithubRepoPage('https://www.github.com/username/repo/')).toBe(false)
expect(isGithubRepoPage('https://www.github.com/username/repo/')).toBe(true)
expect(isGithubRepoPage('https://www.github.com/username/repo/https://google.com/')).toBe(false)
expect(isGithubRepoPage('www.github.com/username/repo')).toBe(true)
expect(isGithubRepoPage('github.com/username/repo')).toBe(true)
Expand Down

0 comments on commit 2161918

Please sign in to comment.