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

Added bot trigger to add Product-Workspaces label to new issues-bugs #34819

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

plante-msft
Copy link
Contributor

Added new policy bot trigger to recognize new Workspaces bugs and label them with Product-Workspaces label. Will expand this to all modules if it works properly.

- isAction:
action: Opened
- bodyContains:
pattern: ### Area\(s\) with issue\?\s*\nWorkspaces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# is interpreted as a comment in YAML, i'm worried if the pattern may fail because of that? Having it without ### would still be a confident match I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could escape with '' but I agree that removing the markdown characters suffices for the pattern. If it over-triggers, we can add the escaped ###

@Trenly
Copy link

Trenly commented Sep 11, 2024

Looking at the size of your policy file, it may also be beneficial to start splitting the triggers into their own files.

winget-pkgs is a great example of how multiple files can be used for policies.

This really helps when trying to identify what rules are already existing or when debugging why a certain rule is either failing or being triggered too often.

For example - you can have one file that contains all the rules for when an issue is opened, another file for the auto-close scheduled searches, and one that handles whenever someone comments.

@ethanfangg ethanfangg merged commit 7e99389 into main Sep 11, 2024
16 checks passed
@plante-msft plante-msft deleted the connor/add_auto_label_regex branch September 12, 2024 01:12
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 this pull request may close these issues.

5 participants