fastlane/github-actions

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

benwinding opened this issue ยท 4 comments

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

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: ''

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? ๐Ÿ˜Š

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

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