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

noop-labels not working #49

Open
dza89 opened this issue Aug 4, 2023 · 7 comments
Open

noop-labels not working #49

dza89 opened this issue Aug 4, 2023 · 7 comments
Labels

Comments

@dza89
Copy link

dza89 commented Aug 4, 2023

Noob labels don't seem to work, config:

            - uses: jefflinse/pr-semver-bump@v1.6.0
              name: labels
              with:
                  mode: validate
                  repo-token: ${{ secrets.GITHUB_TOKEN }}
                  major-label: major
                  minor-label: minor
                  noop-labels:
                    - documentation change
                  patch-label: patch

Results in a:
The workflow is not valid. .github/workflows/pull_request.yaml (Line: 110, Col: 21): A sequence was not expected

When I remove noop-labels it works fine.

The default in action.yaml is also an empty string, so something is up.

Edit: it works as a string.

@jefflinse
Copy link
Owner

@dza89 When you said it works as a string, do you mean that it works (and only works) when quoting the value? E.g.

noop-labels:
  - "documentation change"

@jefflinse jefflinse added the bug label Aug 17, 2023
@dza89
Copy link
Author

dza89 commented Aug 18, 2023

No, it works only as

noop-labels: "documentation change"

@AbstractVersion
Copy link

No, it works only as

noop-labels: "documentation change"

is it comma seperated eg. "documentation change, another label, etc" ?

@rtizzy
Copy link

rtizzy commented Mar 25, 2024

@jefflinse

I can confirm the syntax is correct when passed in as a string as dza89 mentions.

Unfortunately the "no-op" still does not work.

As an example:

jobs:
  check-pr:
    name: Validate Release Label and Notes
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jefflinse/pr-semver-bump@v1.6.0
        name: Validate Pull Request Metadata
        with:
          mode: validate
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          major-label: major
          minor-label: minor
          patch-label: patch
          # NOTE: Fix this when it's handled upstream
          noop-labels: nobump

Adding the nobump label to the PR still results in the following error

  with:
    mode: validate
    repo-token: ***
    major-label: major
    minor-label: minor
    patch-label: patch
    require-release-notes: false
    with-v: false
    base-branch: false
Error: PR validation failed: no release label specified on PR

@rtizzy
Copy link

rtizzy commented Mar 25, 2024

For some additional context, this still does not work but it will at least be fed into the with

jobs:
  check-pr:
    name: Validate Release Label and Notes
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jefflinse/pr-semver-bump@v1.6.0
        name: Validate Pull Request Metadata
        with:
          mode: validate
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          major-label: major
          minor-label: minor
          patch-label: patch
          # NOTE: Fix this when it's handled upstream
          noop-labels: 
            nobump
            testing
Run jefflinse/pr-semver-bump@v1.6.0
  with:
    mode: validate
    repo-token: ***
    major-label: major
    minor-label: minor
    patch-label: patch
    noop-labels: nobump testing
    require-release-notes: false
    with-v: false
    base-branch: false

@rtizzy
Copy link

rtizzy commented Mar 25, 2024

@jefflinse

I figured out what will probably help you solve this

In my above example there are two tags specified for noop-labels, nobump and testing.

Tagging with either nobump or testing alone or together will still fail the job

Tagging it with nobump testing will allow the job to pass as expected.

You likely want to manage this by using some other type of list and ensuring that you're iterating over that list, don't think that is happening currently and it's instead seeing the space delimited tags as a single tag.

@rtizzy
Copy link

rtizzy commented Mar 25, 2024

It's also worth noting that this will work

          noop-labels: 
            "nobump"

I believe this will also work

          noop-labels: 
            nobump

This WILL NOT work

          noop-labels:  "nobump"

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

No branches or pull requests

4 participants