Skip to content

does not support "[WIP]"? (update: it of course does!) #97

Closed

Description

@myakura

I see a lot of issues using wip keywords wrapped in brackets (e.g "[WIP]"). However, the current code to check whether the issue is a work in progress it does not support that pattern.

function containsWIP (string) {
return /\b(wip|do not merge|work in progress)\b/i.test(string)
}

Notice the leading \b. It doesn't treat brackets as word boundaries so it fails to catch issues titled "[WIP] blah".

Activity

  1. gr2m commented on Jun 26, 2018

    @gr2m
    Collaborator

    Hi @myakura, I’m pretty sure that it will it supports having "[WIP]" in the title. You can run this code in your browser console to check:

    /\b(wip|do not merge|work in progress)\b/i.test('[WIP]') // returns true

    I also tested it here and it works as expected: gr2m/sandbox#41

  2. gr2m commented on Jun 26, 2018

    @gr2m
    Collaborator

    Do you have a pull request in a public repository where it does not work? Can you give me a link to it?

  3. myakura commented on Jun 26, 2018

    @myakura
    Author

    @gr2m oops. lemme double check!

  4. myakura commented on Jun 26, 2018

    @myakura
    Author

    hmm. so I checked again with some repos (public & private in different orgs) and this time it worked...!
    I dunno what happened. Perhaps I tested right after installing the app but it hadn't deployed yet.

    Anyways, sorry for confusion. apologies.

    Oh. I should've said this in the very first. Thanks for the app! This is really useful :-)

  5. changed the title [-]does not support "[WIP]"[/-] [+]does not support "[WIP]"? (update: it of course does!)[/+] on Jun 26, 2018
  6. myakura commented on Jun 26, 2018

    @myakura
    Author

    Okay, it looks like the bot doesn't work on PRs that already have the keywords before installing the app. Is that an intended behavior?

  7. gr2m commented on Jun 26, 2018

    @gr2m
    Collaborator

    The app only sets the status when a PR gets changed. It doesn’t check existinf PRs. But that might be a good idea :)

  8. myakura commented on Jun 27, 2018

    @myakura
    Author

    @gr2m thanks!

  9. gr2m commented on Jun 27, 2018

    @gr2m
    Collaborator

    closing in favor of #98

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions