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

Add isPRCommit404 detection #12

Merged
merged 4 commits into from
Jun 18, 2020
Merged

Add isPRCommit404 detection #12

merged 4 commits into from
Jun 18, 2020

Conversation

FloEdelmann
Copy link
Member

test.ts Outdated Show resolved Hide resolved
@fregante fregante added the enhancement New feature or request label Jun 18, 2020
test.ts Outdated Show resolved Hide resolved
@fregante fregante merged commit 014d27b into refined-github:master Jun 18, 2020
@fregante
Copy link
Member

🎉

@FloEdelmann FloEdelmann deleted the is-pr-commit-404 branch June 18, 2020 21:17
@fregante
Copy link
Member

fregante commented Jun 18, 2020

https://github.com/fregante/github-url-detection/releases/tag/v1.2.2

Also if you see any others that can be moved out of RGH let me know or send a PR (as long as the conditions aren't super specific like for is single html file or has breadcrumb)

Better to just suggest them here first just in case.

@FloEdelmann
Copy link
Member Author

It seems like all custom includes/excludes we currently have in RGH don't make sense here (I've searched for the regex (in|ex)clude: \[\n\t\t\():

source/features/comments-time-machine-links.tsx:
  120: 	exclude: [
  121: 		() => !new URLSearchParams(location.search).has('rgh-link-date')

source/features/first-published-tag-for-merged-pr.tsx:
  57: 	exclude: [
  58: 		() => !select.exists('#partial-discussion-header [title="Status: Merged"]')

source/features/fork-source-link-same-view.tsx:
  32: 	exclude: [
  33: 		() => !pageDetect.isForkedRepo(),

source/features/preserve-whitespace-option-in-nav.tsx:
  22: 	exclude: [
  23: 		() => new URLSearchParams(location.search).get('w') !== '1'

source/features/quick-mention.tsx:
  58: 	exclude: [
  59: 		() => select.exists('.conversation-limited') // Discussion is locked

source/features/repo-wide-file-finder.tsx:
  30: 	exclude: [
  31: 		() => select.exists('[data-hotkey="t"]')

source/features/show-associated-branch-prs-on-fork.tsx:
  114: 	exclude: [
  115: 		() => !pageDetect.isForkedRepo()

source/features/show-open-prs-of-forks.tsx:
   96: 	exclude: [
   97: 		() => !pageDetect.isForkedRepo()
  105: 	exclude: [
  106: 		() => !pageDetect.isForkedRepo()

source/features/view-markdown-source.tsx:
  112: 	exclude: [
  113: 		() => !select.exists('.blob .markdown-body')

@fregante
Copy link
Member

Thanks for checking!

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.

None yet

2 participants