gagoar / use-herald-action

GitHub action to add reviewers, subscribers, labels, and assignees to your PR. You can validate your PR template as well.
https://gagoar.github.io/use-herald-action/
MIT License
53 stars 7 forks source link

excludes are dropped between validating the rule and printing that it was loaded #541

Open scamden opened 1 month ago

scamden commented 1 month ago

I somehow go from having a valid rule with excludes to a rule with no excludes. Any help would be very appreciated.

2024-05-02T23:39:13.227Z use-herald-action:isValidRawRule validation: { rule: { name: 'This is a rule to add @scamden as a assignee when bi code changes', includes: [ 'workspaces/app-dashboard/components/bi//*', 'workspaces/shared-universal/bi/*/' ], excludes: [ 'workspaces/app-dashboard/components/bi/dataLineage//*', 'workspaces/app-dashboard/components/bi/BiAnomalyDetection.tsx', 'workspaces/app-dashboard/components/bi/atoms/anomalyAtoms.ts' ], action: 'comment', customMessage: 'blocking r? @scamden }, hasActors: true, hasValidActionValues: true, matchers: true }

2024-05-02T23:39:13.228Z use-herald-action:index loaded rules and locations { rules: Rules(2) [ { name: 'This is a rule to add @scamden as a assignee when bi code changes', action: 'comment', includes: [Array], customMessage: 'blocking r? @scamden --', users: [], teams: [], excludes: [], includesInPatch: [], eventJsonPath: [], path: '/home/runner/work/ghg/ghg/herald-rules/bi-review.json' },

scamden commented 1 month ago

@gagoar this seems like a pretty basic feature, feel like i must be missing something..

gagoar commented 1 month ago

Hey @scamden, yeah. I'll debug this weekend. Could you share the rule you wrote with me? Not the AST of it. Thanks!

scamden commented 1 month ago

@gagoar thanks for the reply! Already found the issue and made a PR to fix, lemme know what you think :)