sorenlouv / backport-github-action

Backport CLI tool as a Github Action
https://github.com/sqren/backport
26 stars 19 forks source link

backport:skip label no longer works in recent version #8

Closed Universal-Omega closed 2 years ago

Universal-Omega commented 2 years ago

The title of this issue is self explanatory, but in recent versions of this action the backport:skip label no longer applies, and causes this to always fail the workflow, at least if it isn't being backported. Can this functionality please be readded?

For reference:

{
  "status": "failure",
  "commits": [],
  "error": {
    "name": "HandledError"
  },
  "errorMessage": "Please specify a target branch: \"--branch 6.1\".\n\nRead more: https://github.com/sqren/backport/blob/main/docs/configuration.md#project-config-backportrcjson"
}
Universal-Omega commented 2 years ago

It actually worked once I added:

    if: |
      github.event.pull_request.merged == true
      && contains(github.event.pull_request.labels.*.name, 'auto-backport')
      && (
        (github.event.action == 'labeled' && github.event.label.name == 'auto-backport')
        || (github.event.action == 'closed')
      )

As well as:

auto_backport_label_prefix: backport-to-

And replaced the backport:skip label with auto-backport, using that instead when I do want to backport.