tibdex / backport

🔙 GitHub Action to backport pull requests
MIT License
73 stars 66 forks source link

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

Open kikito opened 1 year ago

kikito commented 1 year ago

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?

tibdex commented 1 year ago

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?

tvdeyen commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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