Add ability to use check for multiple labels#11
Open
ricardoboss wants to merge 2 commits into
Open
Conversation
Leonidas-from-XIV
requested changes
Feb 2, 2026
Leonidas-from-XIV
left a comment
Member
There was a problem hiding this comment.
Thanks, this is a good idea. I was reading through the source code and I think it would be nice to improve these two things, besides that it is good to go.
| IFS=',' read -ra WANT <<< "${{ inputs.labels }}" | ||
| PR_LABELS="${{ join(github.event.pull_request.labels.*.name, ' ') }}" | ||
| for w in "${WANT[@]}"; do | ||
| if [[ " $PR_LABELS " == *" $w "* ]]; then |
Member
There was a problem hiding this comment.
Instead of this, I'd suggest iterating over PR_LABELS without joining them.
| # fail if the diff is empty | ||
| if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then | ||
| echo >&2 "User-visible changes should come with an entry in the changelog. This behavior | ||
| can be overridden by using the \"no changelog\" label, which is used for changes |
Member
There was a problem hiding this comment.
This is incorrect at this point, would need to specify the right labels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to set a
labelsinput, which can override the default "no changelog" label to check.It accepts a string with labels, separated by commas. I amended the full example in the README.
Since the step that checks runs the bash script is now skipped, I removed the handling for checking whether to skip or not from it.