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

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

Open
kikito opened this issue May 8, 2023 · 4 comments
Open

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

kikito opened this issue May 8, 2023 · 4 comments
Assignees

Comments

@kikito
Copy link

kikito commented May 8, 2023

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
Copy link
Owner

tibdex commented May 8, 2023

Hi, the label part can already be done with:

backport/action.yml

Lines 32 to 39 in b1bb2aa

labels_template:
description: >
Lodash template compiling to a JSON array of labels to add to the backport PR.
The data properties are:
- base: backport PR's base branch
- labels: array containing the original PR's labels, excluding those matching `label_pattern`.
default: "[]"

right?

would a similar input for milestones work for you too?

@tvdeyen
Copy link

tvdeyen commented Aug 15, 2023

@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
Copy link

tvdeyen commented Aug 15, 2023

@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 added a commit to tvdeyen/alchemy_cms that referenced this issue Aug 15, 2023
@tvdeyen
Copy link

tvdeyen commented Aug 15, 2023

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

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

3 participants