Closed toreilly718 closed 2 years ago
Hey @toreilly718 ! Thanks for opening the issue. I will take a look asap.
Hey @toreilly718, Gago's sidekick here.
I looked into PR #519 (the one you linked), and it is actually working correctly. The rule will pass if either:
Issue Reference:
isn't present at all in the PR descriptionIssue Reference:
is present, followed by an issue number or some other textSo, #519's "valid issue present" rule passes because (1) is satisfied. On the other hand, see #521, which has Issue Reference:
present, but it is not followed by an issue number or some other text. Note that the "valid issue present" rule fails for that PR.
I'd suggest you maybe double-check your workflow's JsonPath expression, since they can get really hairy :P
Or, if you can show us how to reproduce your issue, we can help debug your expression and/or use-herald-action
's JsonPath rule matcher.
Closing this because inactivity + it seems to be a user issue more than the lib. Happy to open this up again cc @toreilly718 !
After having some issues with this in my own workflow- I traced it back to see if the
eventJsonPath
filters worked here, and found that it wasn't.Example PR: https://github.com/gagoar/use-herald-action/pull/519 Rule: https://github.com/gagoar/use-herald-action/blob/master/herald_rules/validate_issue_is_present.json
I think the issue is happening here : https://github.com/gagoar/use-herald-action/blob/master/src/rules.ts#L167
I am not a javascript expert but I did some debugging
It seemed like using the
apply
method instead ofquery
returned the expected result.