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

Adds label ''status: included-in-next-release" by default #33

Open
benwinding opened this issue Apr 17, 2020 · 4 comments
Open

Adds label ''status: included-in-next-release" by default #33

benwinding opened this issue Apr 17, 2020 · 4 comments
Assignees

Comments

@benwinding
Copy link
Contributor

Hey guys,

It's weird this seems to the label status: included-in-next-release to my PR by default. How do I prevent that? (it's not applicable to me)

Details:

The PR:
benwinding/firecache#2
image

The run
https://github.com/benwinding/firecache/runs/593964258
Looks like this is where the defaults are added?
image

How can I stop that?

Thanks for open-sourcing your project, works really well 👌

Cheers,
Ben

@benwinding
Copy link
Contributor Author

Looks like this is the culprit.

pr-label-to-remove:
description: 'The label to remove when a pull request is released'
default: 'status: included-in-next-release'

Should I just pass in nothing to this parameter?
Maybe pr-label-to-add: ''

@mollyIV
Copy link
Member

mollyIV commented Apr 18, 2020

Hello @benwinding 👋

Unfortunately, there's no way to skip adding the label for now. If you set pr-label-to-add: '', you'd get the error:

##[error]Validation Failed: {"value":"","resource":"Label","field":"name","code":"invalid"}
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Communicate on PR merged

However, I think that making adding / removing labels optional for this action could be a great addition. The implementation should be fairly simple - we'd need to check if a label to add has any value:

// main.ts 

export async function run() {
...

  const labelToAdd = core.getInput('pr-label-to-add');
    if (labelToAdd) {
      await addLabels(client, prNumber, [labelToAdd]);
  }

...

We could apply similar logic for a pr-label-to-remove.

Would you like to give the implementation a try? 😊

@benwinding
Copy link
Contributor Author

Hi @mollyIV,

Thanks for getting back to me, yes that sounds like a reasonable approach.

Would you like to give the implementation a try?

How should I go about trying that implementation? Should I fork this repo and try it like that?

Cheers,
Ben

@janpio
Copy link
Member

janpio commented Apr 19, 2020

Yes, forking and then creating a PR to this repository would be the way to go.

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