Skip to content

Add discussion-links-on-repo-lists feature - #2981

Merged
fregante merged 24 commits into
refined-github:masterfrom
yakov116:issue-pr-llink
Apr 12, 2020
Merged

fregante merged 24 commits into
refined-github:masterfrom
yakov116:issue-pr-llink

Conversation

@yakov116

@yakov116 yakov116 commented Apr 7, 2020 •

Copy link
Copy Markdown
Member

Closes #1130

image

I followed #1130 (comment)

Honestly I think we can just replace that X issues need help and display it there instead. It's not a very useful copy now that everyone uses the label as "up for grabs" rather than "we actually need someone who knows more than us to fix it".

Plus I'd stick to the just show the icons, no counts. If anyone wants the counts, you can use Mottie's userscript.

Test

https://github.com/sindresorhus?tab=repositories&type=source
https://github.com/search?q=user%3Asindresorhus+something

@yakov116

This comment has been minimized.

@fregante

fregante commented Apr 7, 2020

Copy link
Copy Markdown
Member

One issue. If the query changes then the feature is dropped

Which query?

I dont know what to call the feature and can use some help. (Will add to readme once I have the name)

Maybe discussion-links-on-repo-lists, it can also apply to global searches https://github.com/search?q=xo+eslint

@yakov116

This comment has been minimized.

@yakov116

yakov116 commented Apr 7, 2020 •

Copy link
Copy Markdown
Member Author

Maybe discussion-links-on-repo-lists, it can also apply to global searches github.com/search?q=xo+eslint

Added

@yakov116
yakov116 requested a review from fregante April 7, 2020 19:50
@yakov116
yakov116 requested a review from fregante April 7, 2020 23:45
@yakov116 yakov116 changed the title Add issue pr link to repository tab Add discussion-links-on-repo-lists Apr 8, 2020
@fregante fregante changed the title Add discussion-links-on-repo-lists Add discussion-links-on-repo-lists feature Apr 8, 2020
Comment thread source/libs/page-detect.ts Resolved
Comment thread source/libs/page-detect.ts Resolved
Comment thread source/libs/page-detect.ts Outdated

export const isUserProfileRepoTab = (): boolean => isUserProfile() &&
new URLSearchParams(location.search).get('tab') === 'repositories' &&
location.pathname !== '/'; // Gotcha for 'https://github.com/?tab=repositories'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

?

This is already covered by isUserProfile

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I know. My AVA is not working locally (And my computer is doing funny things) I Forgot to remove it

@fregante fregante Apr 12, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's not working? Make sure you test this on Node 12.15. You can use n or nvm to switch between versions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

'TS_NODE_FILES' is not recognized as an internal or external command

@fregante fregante Apr 12, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Are you on Windows 10? It should work on bash

Yes. Let me try

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or, more easily for now, first set the TS_NODE_FILES environment variable and then just run npx ava directly, not npm run test:js

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ava

  
  × Timed out while running tests

  × No tests found in test\search-query.ts
  × No tests found in test\page-detect.ts
  × No tests found in test\utils.ts

Give on trying to fix it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This happens to me sometimes too, it's because ava tries to run all the tests in parallel and times out. Sometimes I just try again and it works.

Try ava --serial.

@yakov116

Copy link
Copy Markdown
Member Author

What is wrong? Why does the test not pass?

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was wondering myself.

And, yeah, isUserProfile is DOM-based so that makes this test DOM-based as well.

Comment thread source/libs/page-detect.ts Resolved
Comment thread source/libs/page-detect.ts Resolved
yakov116 and others added 2 commits April 12, 2020 10:05
Co-Authored-By: Federico Brigante <[email protected]>
Co-Authored-By: Federico Brigante <[email protected]>
@yakov116

Copy link
Copy Markdown
Member Author

I was wondering myself.

And, yeah, isUserProfile is DOM-based so that makes this test DOM-based as well.

I should have explained better here. #2981 (comment)

@fregante
fregante merged commit ed2dc7b into refined-github:master Apr 12, 2020
@yakov116
yakov116 deleted the issue-pr-llink branch April 12, 2020 22:54
yakov116 added a commit to yakov116/refined-github that referenced this pull request Apr 13, 2020
@fregante fregante mentioned this pull request Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Add links to issues and pull requests next to repo title

2 participants