labeler icon indicating copy to clipboard operation
labeler copied to clipboard

Different label based on new/changed/removed

Open ericcornelissen opened this issue 5 years ago • 5 comments

I was wondering if it is either possible or desired to have a feature to: configure a label based on whether a file was newly created vs. a file was changed (vs. a file was removed).

In configuration I would imagine this could be written as follows:

"label on add":
  - on: added
  - example/**/*

"label on change":
  - on: modified
  - example/**/*

"label on remove":
  - on: removed
  - example/**/*

"label on multiple":
  - on:
    - added
    - modified
    - removed
  - example/**/*

"or if you don't care":
  - example/**/*

"and even": example/**/*

I have a working prototype at ericcornelissen/labeler (example PR added, example PR modified) which I could turn into a Pull Request for this project if there is more interest in this 😄


In practice I want to use this in simple-icons/simple-icons to label Pull Requests with either new icon or icon outdated based on whether a new icon was added or an icon was updated (respectively)

ericcornelissen avatar Jan 20 '20 07:01 ericcornelissen

I would love to see this issue implemented because I'd like to remove the changes requested label whenever a commit is pushed to a PR I've reviewed.

SpencerKaiser avatar Apr 05 '20 17:04 SpencerKaiser

Thanks for showing your interested @SpencerKaiser, ~~I will try to work on getting a PR into this project as soon as possible.~~ Going to hold of on that given the discussion in #22.

In the meantime you can try my implementation by using ericcornelissen/labeler@master.

ericcornelissen avatar Apr 09 '20 08:04 ericcornelissen

@ericcornelissen Looks like #22 has been merged, can you make a pull for your implementation to this repo now?

ogtony avatar Jun 18 '20 22:06 ogtony

@SpencerKaiser and @ogtony, I opened a PR for this feature :+1:

ericcornelissen avatar Jun 21 '20 16:06 ericcornelissen

Hey folks - Any updates on this ? I'd really like to use this functionality but the linked PR has not been merged yet.

prakarshpandey avatar May 18 '22 22:05 prakarshpandey