Closed jmuzina closed 1 week ago
Not sure if I understand what was wrong, and why changing array to JSON fixes it, but if that works I'm good.
Not sure if I understand what was wrong, and why changing array to JSON fixes it, but if that works I'm good.
@bartaz
It's not entirely clear to me either - from what I was seeing, this was working in initial tests of the PR, then stopped working when multiple labels were applied to real PRs. I whipped this up as a quick / heavy-handed fix so that our live PRs can get Percy tested, but it can get a more thorough re-look later if needed.
My current best guess is it's something to do with how the array of names is serialized with respect to contains()
, or maybe it's just that I quoted the label name with this PR and it wasn't quoted when using the variable. However contains() is supposed to work with arrays out of the box.
So this is converting the array of names into a string, and performing a substring match to find the quoted Percy label.
Changing label from Bug to Maintenance, as it's not a bug in Vanilla codebase (so doesn't need to be featured as a bugfix for consumers of Vanilla).
Done
Fixes Percy tests not being run properly against PRs with multiple labels.
The array of label names was being converted to "Array" and my if checks were failing. I quoted the conditionals on the jobs, converted them to JSON, and also removed the dependence on a repo variable for the label name.
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention: