Skip to content

String with colon is loaded as object #118

@robingenz

Description

@robingenz

First of all, thanks for this helpful GitHub action!

I want to use this action to delete a specific label whenever a comment is created on an issue.
The label is: needs: reply.

This is my workflow:

name: Remove needs-reply label

on:
  issue_comment:
    types:
      - created

jobs:
  needs-reply:
    runs-on: ubuntu-latest
    steps:
      - name: Remove needs-reply label
        uses: octokit/request-action@v2.x
        continue-on-error: true
        with:
          route: DELETE /repos/:repository/issues/:issue/labels/:label
          repository: ${{ github.repository }}
          issue: ${{ github.event.issue.number }}
          label: 'needs: reply'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I get the following error when running the action:

Error: Label does not exist

(see this example)

The following request works:

curl --location --request DELETE 'https://api.github.com/repos/{user}/{repo}/issues/{issue}/labels/needs: reply' \
--header 'Authorization: token {token}'

For this reason, I assume that the error lies with the action.
Please let me know if you need more information.
Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: SupportAny questions, information, or general needs around the SDK or GitHub APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions