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

Fix validation of block-list when used without policy #222

Merged
merged 1 commit into from
May 2, 2023

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented May 2, 2023

When block-list isn't set in the workflow file and policy isn't used. Validation will fail because the block list is [''] when undefined.

This commit is a nasty hack and should be replaced with proper validation using zod library.

When `block-list` isn't set in the workflow file and policy isn't used.
Validation will fail because the block list is `['']` when undefined.

This commit is a nasty hack and should be replaced with proper validation
using zod library.
@jamacku jamacku self-assigned this May 2, 2023
@jamacku jamacku linked an issue May 2, 2023 that may be closed by this pull request
@jamacku jamacku marked this pull request as draft May 2, 2023 08:52
@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #222 (ee0bae6) into main (ae11cc5) will decrease coverage by 0.19%.
The diff coverage is 81.25%.

@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   84.06%   83.88%   -0.19%     
==========================================
  Files           5        5              
  Lines         502      515      +13     
  Branches       97       99       +2     
==========================================
+ Hits          422      432      +10     
- Misses         80       83       +3     
Impacted Files Coverage Δ
src/labeler.ts 66.83% <81.25%> (+0.69%) ⬆️

@jamacku jamacku changed the title fix: validation on block-list when used without policy Fix validation of block-list when used without policy May 2, 2023
@jamacku jamacku marked this pull request as ready for review May 2, 2023 10:42
@jamacku jamacku merged commit 50fa7ab into redhat-plumbers-in-action:main May 2, 2023
@jamacku jamacku deleted the fix-validation branch May 2, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validation fails when block-list input is undefined
1 participant