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

fix: name check bug #434

Merged
merged 1 commit into from
Aug 25, 2024
Merged

fix: name check bug #434

merged 1 commit into from
Aug 25, 2024

Conversation

dreamhunter2333
Copy link
Owner

@dreamhunter2333 dreamhunter2333 commented Aug 25, 2024

User description

#431


PR Type

Bug fix, Documentation, Enhancement


Description

  • Fixed the checkNameBlockList function to properly handle the block list by moving the block list initialization outside the try-catch block and improving error handling for blocked names.
  • Updated the version constant to v0.7.5 in worker/src/constants.ts.
  • Added a new entry for version v0.7.5 in CHANGELOG.md with a fix description.
  • Bumped the version to 0.7.5 in multiple package.json files (frontend, pages, vitepress-docs, worker).

Changes walkthrough 📝

Relevant files
Bug fix
common.ts
Fix and improve name block list check                                       

worker/src/common.ts

  • Fixed the checkNameBlockList function to properly handle the block
    list.
  • Moved the block list initialization outside the try-catch block.
  • Improved error handling for blocked names.
  • +5/-4     
    Enhancement
    constants.ts
    Update version constant to v0.7.5                                               

    worker/src/constants.ts

    • Updated the version constant to v0.7.5.
    +1/-1     
    package.json
    Bump frontend package version to 0.7.5                                     

    frontend/package.json

    • Bumped the version to 0.7.5.
    +1/-1     
    package.json
    Bump pages package version to 0.7.5                                           

    pages/package.json

    • Bumped the version to 0.7.5.
    +1/-1     
    package.json
    Bump vitepress-docs package version to 0.7.5                         

    vitepress-docs/package.json

    • Bumped the version to 0.7.5.
    +1/-1     
    package.json
    Bump worker package version to 0.7.5                                         

    worker/package.json

    • Bumped the version to 0.7.5.
    +1/-1     
    Documentation
    CHANGELOG.md
    Add changelog entry for v0.7.5                                                     

    CHANGELOG.md

    • Added a new entry for version v0.7.5 with a fix description.
    +4/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @dreamhunter2333 dreamhunter2333 merged commit a57a42b into main Aug 25, 2024
    1 check passed
    @dreamhunter2333 dreamhunter2333 deleted the feature/dev branch August 25, 2024 08:39
    @github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request Bug fix Review effort [1-5]: 2 labels Aug 25, 2024
    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🔒 No security concerns identified
    ⚡ Key issues to review

    Possible Bug
    The error message in the checkNameBlockList function does not have a space between the name and the message, making it less readable. Consider changing Name[${name}]is blocked to Name [${name}] is blocked.

    Copy link

    github-actions bot commented Aug 25, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Improve readability of the error message by adding a space

    Add a space between ] and is in the error message for better readability.

    worker/src/common.ts [145]

    -throw new Error(`Name[${name}]is blocked`);
    +throw new Error(`Name[${name}] is blocked`);
     
    Suggestion importance[1-10]: 8

    Why: The suggestion improves the readability of the error message by adding a space, making it clearer and more professional. This is a minor but useful enhancement.

    8

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Bug fix documentation Improvements or additions to documentation enhancement New feature or request Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant