Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Whitelist labels #22

Closed
Leland opened this issue May 2, 2017 · 13 comments · Fixed by #169
Closed

Whitelist labels #22

Leland opened this issue May 2, 2017 · 13 comments · Fixed by #169
Labels

Comments

@Leland
Copy link

Leland commented May 2, 2017

It'd be great to have the ability to run this bot only against certain labels – to whitelist labels, rather than blacklist all labels but those few we want.

@bkeepers
Copy link
Contributor

bkeepers commented May 2, 2017

@Leland that sounds like a good idea. What do you think about adding onlyLabels, and if it's set, it will only search issues with those labels? Otherwise, it will search all issues.

onlyLabels:
- question
- feature-request

One issue is that GitHub search won't properly handle ORing labels. It's not a deal breaker, but will probably just require a little refactoring and multiple API calls to get all of the issues.

@Leland
Copy link
Author

Leland commented May 2, 2017

@bkeepers love it.

@stkent
Copy link
Contributor

stkent commented May 21, 2017

@Leland @bkeepers I'm curious if either of you are working on this (couldn't tell from the discussion)? If not, I may give it a shot, but be warned I'm not a JS dev :P

@bkeepers
Copy link
Contributor

@stkent I'm not, but would be happy to help you with it!

@stkent
Copy link
Contributor

stkent commented May 21, 2017

Awesome! Assuming @Leland isn't either, I'll start tomorrow and put up a PR that includes progress and questions at the end of the day :)

@Leland
Copy link
Author

Leland commented May 22, 2017

@stkent go for it!

@stkent
Copy link
Contributor

stkent commented May 22, 2017

First implementation question: what should the new defaults look like? We already have:

exemptLabels: ['pinned', 'security']

so I'm imagining something like

onlyLabels: []
exemptLabels: ['pinned', 'security']

for backwards compatibility. Then we run into the following question: do we allow folks to specify both non-empty onlyLabels and non-empty exemptLabels in the same configuration?

  • If no, users who wish to use non-empty onlyLabels will also have to specify exemptLabels: [] explicitly in their config files;
  • If yes, we'll have to decide if onlyLabels trumps exemptLabels, or if we combine the two somehow (by defining the behavior for a label appearing in both).

The path of least resistance would seem to be having onlyLabels trump exemptLabels whenever it is non-empty. Thoughts?

@boneskull
Copy link

boneskull commented May 24, 2017

Mocha could use this behavior. @stkent I will happily pick this PR up if you don't want to follow through for whatever reason.

Insofar as "operator precedence", cron will ignore "deny" if "allow" is specified. This seems reasonable to me (since there's a precedent, though it's not necessarily the source of truth!).

@stkent
Copy link
Contributor

stkent commented May 24, 2017

@boneskull excellent information, thanks! Given your 👍 and that precedent, I think proceeding down the path I outlined is indeed reasonable.

I'm going to be traveling through the weekend and will be unable to work on an implementation before Monday, so by all means pick up and run with this if you have the bandwidth! (If you do, please post back to confirm to head off any double-dipping.) I went through the project/plugin development setup process already and fixed rough patches that slowed me down in PRs, so you should be able to get up and running pretty quickly if you so choose!

@stkent
Copy link
Contributor

stkent commented May 30, 2017

Picking this up again today!

@stale
Copy link

stale bot commented Apr 5, 2018

Is this still relevant? If so, please comment with any updates or addition details.

@stale stale bot added the wontfix label Apr 5, 2018
@humitos
Copy link

humitos commented Apr 5, 2018

Haha! The stale probot will close his own issues :)

It's still relevant to us at Read the Docs, we are waiting for this feature to be implemented some day so we can start using this amazing bot.

Hopefully, some caritative soul will do it :D

@stale stale bot removed the wontfix label Apr 5, 2018
@stale
Copy link

stale bot commented Jun 4, 2018

Is this still relevant? If so, please comment with any updates or addition details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants