Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error]Could not find exactly one of the appropriate labels on the PR. #9

Closed
larryjoelane opened this issue Jun 3, 2020 · 4 comments

Comments

@larryjoelane
Copy link

larryjoelane commented Jun 3, 2020

I have added a label to a pr named patch and I receive the following error output.

output from action run:

Run zwaldowski/match-label-action@v1
  with:
    allowed: major minor patch
  
  env:
    SOLUTION_FILE: MySolution-Main.sln
    NUGET: C:\hostedtoolcache\windows\nuget.exe\5.4.0\x64/nuget.exe
##[error]Could not find exactly one of the appropriate labels on the PR.

steps from workflow:

     - name: bump version
        id: bump
        uses: zwaldowski/match-label-action@v1
        with:
          allowed: >
            major
            minor
            patch
      - name: output version
        id: next_version
        uses: zwaldowski/semver-release-action@v1
        with:
          bump: ${{ steps.bump.outputs.match }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
@crazy4pi314
Copy link

I'm having exactly the same issue, any ideas?
qsharp-community/qram#50

@zwaldowski
Copy link
Owner

As this is simply a composition on @actions/github, it’s not clear whether the action is being given the right context from the PR.

@crazy4pi314, would you mind changing your uses to zwaldowski/match-label-action@zwaldowski/debug-issue-9 and turning on debug logs as described here? That should give me a quick path to triaging. Thanks for your patience!

unitario added a commit to unitario/match-label-action that referenced this issue Jul 17, 2021
…gered by a pull request that had already been merged (since the payload property is missing)
@unitario
Copy link

I'm having this issue as well. The problem is that new lines \n are stripped out (only tested in ubuntu-latest) causing the parseAllowed function to yield incorrect result.

To get around this issue, you need to organize the allowed labels in a comma separated list as opposed to using new lines as illustrated in the documentation.

Correct

uses: zwaldowski/match-label-action@v2
with:
  allowed: major, minor, patch

Incorrect

uses: zwaldowski/match-label-action@v2
with:
  allowed: >
    major
    minor
    patch

@zwaldowski
Copy link
Owner

Ah, yes, thanks @unitario. It seems like GitHub's runner doesn't enjoy the > syntax. I've updated the README and will investigate on making that syntax work later without regressing #7.

@larryjoelane please see @unitario's note (if you still care about using this of course lol, if not that's fine) and reopen if it's still giving issues. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants