-
-
Notifications
You must be signed in to change notification settings - Fork 41
feat(snippets): add alias support; refactor permission checks #807
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
Conversation
Reviewer's Guide by SourceryThis pull request introduces snippet alias support and refactors permission checks for snippet management commands. It also improves error handling and user feedback. Snippet aliases allow users to create snippets that point to other snippets, simplifying snippet management and reducing redundancy. The permission check refactoring consolidates all permission checks into a single function, improving code maintainability and reducing code duplication. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- prisma/schema/commands/snippets.prisma: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @electron271 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the permission check logic into a decorator to reduce code duplication.
- The snippet alias functionality is a nice addition, but ensure that there are no potential infinite recursion issues.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Description
add snippet alias support by creating a snippet with the content being the name of another snippet and refactor some stuff
Guidelines
My code follows the style guidelines of this project (formatted with Ruff)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation if needed
My changes generate no new warnings
I have tested this change
Any dependent changes have been merged and published in downstream modules
I have added all appropriate labels to this PR
I have followed all of these guidelines.
How Has This Been Tested? (if applicable)
tested in dev tux instance
Screenshots (if applicable)
Please add screenshots to help explain your changes.
Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Enhance snippet functionality by adding alias support and refactoring permission checks for snippet management
New Features:
Enhancements:
Chores: