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

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

Closed
myakura opened this issue Jun 26, 2018 · 8 comments
Closed

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

myakura opened this issue Jun 26, 2018 · 8 comments

Comments

@myakura
Copy link

myakura commented Jun 26, 2018

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".

@gr2m
Copy link
Collaborator

gr2m commented Jun 26, 2018

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

@gr2m
Copy link
Collaborator

gr2m commented Jun 26, 2018

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

@myakura
Copy link
Author

myakura commented Jun 26, 2018

@gr2m oops. lemme double check!

@myakura
Copy link
Author

myakura commented Jun 26, 2018

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 :-)

@myakura myakura changed the title does not support "[WIP]" does not support "[WIP]"? (update: it of course does!) Jun 26, 2018
@myakura
Copy link
Author

myakura commented Jun 26, 2018

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?

@gr2m
Copy link
Collaborator

gr2m commented Jun 26, 2018

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

@myakura
Copy link
Author

myakura commented Jun 27, 2018

@gr2m thanks!

@gr2m
Copy link
Collaborator

gr2m commented Jun 27, 2018

closing in favor of #98

@gr2m gr2m closed this as completed Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants