action-remove-labels icon indicating copy to clipboard operation
action-remove-labels copied to clipboard

failed to remove label if it's not exist

Open dirablue opened this issue 4 years ago • 4 comments

What happened

when I tried to remove all labels set with "labels" options, the error occurred for removing 'stg' label, and 'prd' label which exists was not removed.

  • these are labels status before run dev: exists stg: NOT exists prd: exists
labels: |
  dev
  stg
  prd

in this case, 'dev' label is removed but 'prd' label is not removed because the error of removing 'stg' label.

Run actions-ecosystem/action-remove-labels@v1
Error: HttpError: Label does not exist

What you expected to happen

run a process successfully even if an error occur of removing labels

dirablue avatar Aug 10 '21 03:08 dirablue

You encountered the issue even if fail_on_error is set false?

https://github.com/actions-ecosystem/action-remove-labels#inputs

micnncim avatar Aug 10 '21 05:08 micnncim

@micnncim hi, yes it occurred even if I set fail_on_error = false

dirablue avatar Aug 13 '21 00:08 dirablue

I'm also running into this issue. While it's not a breaking change (it reports an error, but doesn't fail the workflow step) it does record an error against the workflow run.

I'm using this to remove a build-failed label at the start of the workflow run (it's added at the end if needed) but obviously a lot of the time this label doesn't already exist and getting an error reported is irritating.

I'm happy to attempt a PR to fix this unless it's already being worked on by anyone?

egmacke avatar Oct 11 '21 11:10 egmacke

I met this error too, for a workaround I am looking for a github action to check if label is exists before removing, but it is great if this issue could be fixed.

litaocdl avatar Jul 14 '22 03:07 litaocdl