backport icon indicating copy to clipboard operation
backport copied to clipboard

Feature request: copy milestone and/or labels from original PR

Open kikito opened this issue 2 years ago • 4 comments

Hi @tibdex, thank you for this github action, it is very useful.

One thing that would help my team would be that when the pull request that is being backported belongs to a github milestone, or has some labels, they get carried over to the backport.

If you are not able to provide this feature for free (which is understandable) would you be open to reviewing a pull request? If that's the case, would you prefer that that's controlled by a config setting, or would you be ok with this being always enabled?

kikito avatar May 08 '23 20:05 kikito

Hi, the label part can already be done with:

https://github.com/tibdex/backport/blob/b1bb2aaf611d9f2e5d1900c06493769b9f102a45/action.yml#L32-L39

right?

would a similar input for milestones work for you too?

tibdex avatar May 08 '23 22:05 tibdex

@tibdex This is a nice feature for this great action.

But how do we use this labels_template?

Is this correct?

labels_template: "<%= labels %>"

or how is it interpolated?

Some more documentation would be nice.

tvdeyen avatar Aug 15 '23 11:08 tvdeyen

@tibdex I tried

labels_template: "<%= labels %>"

and

labels_template: "[<%= labels %>]"

both give errors you can see here

  1. https://github.com/AlchemyCMS/alchemy_cms/actions/runs/5866754753/job/15906167771#step:2:19
  2. https://github.com/AlchemyCMS/alchemy_cms/actions/runs/5866816076/job/15906360766#step:2:19

I am not sure how to convert the labels via a lodash template string into a JSON Array. Any hints would be appreciated.

It would be great if you could provide some documentation, so that I do not need to create fake commits into my repo that I need to clean up later. Thanks 🙏🏻

tvdeyen avatar Aug 15 '23 12:08 tvdeyen

Never mind. Switched to https://github.com/sqren/backport

tvdeyen avatar Aug 15 '23 13:08 tvdeyen