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

Use empty string as label-prefix input #15

Open
nyjr10025 opened this issue Jan 30, 2023 · 0 comments
Open

Use empty string as label-prefix input #15

nyjr10025 opened this issue Jan 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@nyjr10025
Copy link

What happened

Trying to use the action with no prefix. I want to use the simple labels of patch, minor, and major instead of prefixing them with release/ on my PR's.

The action ran without issue but output no level after putting an empty string for label_prefix instead of using the release/ default prefix. The debug logs showed no release label after running.

What you expected to happen

the action to output a level associated with one of the follow PR tags: patch, minor, and major as inputs

How to reproduce it

name: Test Repro

on:
  pull_request:
    types:
      - closed
    branches: 
      - 'main'

jobs:
  build:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - uses: actions-ecosystem/action-get-merged-pull-request@v1
        id: get-merged-pull-request
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

      - uses: actions-ecosystem/action-release-label@v1
        id: release-label
        if: ${{ steps.get-merged-pull-request.outputs.title != null }}
        with:
          label_prefix: ""
          labels: ${{ steps.get-merged-pull-request.outputs.labels }}

      - uses: actions-ecosystem/action-get-latest-tag@v1
        id: get-latest-tag
        if: ${{ steps.release-label.outputs.level != null }}
        with:
          semver_only: true
...

The last step will be skipped since steps.release-label.outputs.level == null

Environment

Not sure what is meant here. As in like what environment in GitHub Actions?

@nyjr10025 nyjr10025 added the bug Something isn't working label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant