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

Meta: Fix isMilestone's test url #184

Merged
merged 2 commits into from
Aug 19, 2023

Conversation

134130
Copy link
Contributor

@134130 134130 commented Aug 19, 2023

No description provided.

index.ts Outdated
@@ -149,7 +149,7 @@ addTests('isLabelList', [

export const isMilestone = (url: URL | HTMLAnchorElement | Location = location): boolean => /^milestone\/\d+/.test(getRepo(url)?.path!);
addTests('isMilestone', [
'https://github.com/sindresorhus/refined-github/milestone/12',
'https://github.com/sindresorhus/refined-github/milestones/12',
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kang8 Oops, I thought issue page with milestone filter is milestones page.
I'll change this url as you suggenstioned. Thank you!

Copy link
Contributor Author

@134130 134130 Aug 19, 2023

Choose a reason for hiding this comment

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

You can check the url on example is 404 page.
https://github.com/refined-github/refined-github/milestone/12

Copy link
Contributor Author

@134130 134130 Aug 19, 2023

Choose a reason for hiding this comment

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

Out of conversation, why GH is using resources path messy?
for example, issue's path is (issues) refined-github/refined-github#6000 but pr is (pull) refined-github/refined-github#100

Copy link
Member

Choose a reason for hiding this comment

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

why GH is using resources path messy?

Consistency is hard on large projects 😃

Copy link
Contributor

@kang8 kang8 left a comment

Choose a reason for hiding this comment

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

LGTM

@fregante fregante changed the title Fix isMilestone's test url Meta: Fix isMilestone's test url Aug 19, 2023
@fregante fregante added the meta label Aug 19, 2023
@fregante fregante merged commit 61be460 into refined-github:main Aug 19, 2023
14 checks passed
@fregante
Copy link
Member

fregante commented Aug 19, 2023

Note that these URLs are not expected to exist so I'm sure there are dozens of such examples, it's not worth fixing them unless we're updating a detection

@134130
Copy link
Contributor Author

134130 commented Aug 19, 2023

Aha...
It was a bit of a hassle to find a sample page to verify that the feature works

@fregante
Copy link
Member

It was a bit of a hassle to find a sample page to verify that the feature works

Indeed, that's why we've been adding "Test URLs" at the bottom of each feature. For older features you might find the test URLs in their old PRs.

@134130 134130 deleted the fix/milestone-test branch August 20, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants