Skip to content

label input is parsed incorrectly when labels contain "/" characters #335

Description

@dwydler

After upgrading devops-infra/action-pull-request from v1.2.1 to v1.3.0, creating pull requests fails when using labels containing /.

Workflow example

- name: Create pull request
  id: pullrequest
  uses: devops-infra/action-pull-request@v1.3.0
  with:
    github_token: ${{ steps.generate-token.outputs.token }}
    source_branch: test1/test2/test3
    target_branch: master
    title: test1
    label: OS: test5,OS: test1,test2/test3
    assignee: test4

Expected behavior
The pull request should be created with these labels:

  • OS: test5
  • OS: test1
  • test2/test3

Actual behavior
The action fails with:

Running: gh pr create --repo org/test5 --base master --head org:test1/test2/test3...
could not add label: 'test2/test3' not found

The label value is interpreted incorrectly. It looks like the branch name suffix is being passed as a label.

Additional information
The action output shows that the input is received correctly:
label: OS: Ubuntu,OS: test1,test2/test3

Environment

  • GitHub Actions runner
  • GitHub CLI version: 2.95.0
  • devops-infra/action-pull-request@v1.3.0

The issue only happens with v1.3.0. The identical workflow succeeds with v1.2.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions