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

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

Open
scamden opened this issue May 2, 2024 · 3 comments · May be fixed by #542
Open

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

scamden opened this issue May 2, 2024 · 3 comments · May be fixed by #542

Comments

@scamden
Copy link

scamden commented May 2, 2024

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 scamden changed the title excludes are droped between validating the rule and printing that it was loaded excludes are dropped between validating the rule and printing that it was loaded May 3, 2024
@scamden
Copy link
Author

scamden commented May 3, 2024

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

@gagoar
Copy link
Owner

gagoar commented May 3, 2024

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

@scamden scamden linked a pull request May 3, 2024 that will close this issue
@scamden
Copy link
Author

scamden commented May 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants