Skip to content

Missing detection for creating new files #68

Closed

Description

@darkred

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)

Activity

  1. yakov116 commented on Apr 19, 2021

    @yakov116
    Member

    Maybe it should be a new option isCreatingNewFile ?

  2. added
    enhancement
    help wanted
    on Apr 19, 2021
  3. changed the title [-]`isEditingFile` doesn't include `/user/repo/new/branch` (for creating new files)[/-] [+]Missing detection for creating new files[/+] on Apr 19, 2021
  4. fregante commented on Apr 19, 2021

    @fregante
    Member

    isNewFile 👍

  5. darkred commented on Apr 21, 2021

    @darkred
    ContributorAuthor

    I made PR #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions