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

Missing detection for creating new files #68

Closed
darkred opened this issue Apr 19, 2021 · 3 comments · Fixed by #70
Closed

Missing detection for creating new files #68

darkred opened this issue Apr 19, 2021 · 3 comments · Fixed by #70
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@darkred
Copy link
Contributor

darkred commented Apr 19, 2021

Per refined-github/refined-github#4252 (comment)

In the PR above I want to match patterns of both these URL examples:

- Create new file:         https://github.com/sindresorhus/refined-github/new/main
- Modify an existing file: https://github.com/sindresorhus/refined-github/edit/main/readme.md

Checking them via https://fregante.github.io/github-url-detection/ I see that :
2021-04-19_184538
2021-04-19_190318

So I have in the PR the following:

	include: [
		...
		pageDetect.isRepo,
		pageDetect.isEditingFile
	],

But, as mentioned by @yakov116:

Adding isRepo will add it to all repo pages (PR's Issues etc)

@yakov116
Copy link
Member

Maybe it should be a new option isCreatingNewFile ?

@yakov116 yakov116 added enhancement New feature or request help wanted Extra attention is needed labels Apr 19, 2021
@yakov116 yakov116 changed the title isEditingFile doesn't include /user/repo/new/branch (for creating new files) Missing detection for creating new files Apr 19, 2021
@fregante
Copy link
Member

isNewFile 👍

@darkred darkred mentioned this issue Apr 21, 2021
@darkred
Copy link
Contributor Author

darkred commented Apr 21, 2021

I made PR #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

3 participants