Closed NicholasMy closed 6 months ago
[!WARNING]
Rate Limit Exceeded
@KesterTan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 42 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between d8cf8752eba0a1c4b9e1ef1200a0c5474697ef15 and 29e23a948658d18a7103efe2fb7131d936386489.
The update to the AssessmentsController
's create
method introduces a more robust approach to handling the display_name
input. Previously, the system directly applied a regex pattern to validate the display_name
. Now, it first sanitizes the input by replacing any invalid characters with dashes and consolidates consecutive dashes into single ones. This preprocessing step ensures that the display_name
adheres to a cleaner, more consistent format before it undergoes regex pattern validation.
File | Change Summary |
---|---|
.../controllers/assessments_controller.rb .../controllers/assessments_controller_spec.rb .../features/assessment_spec.rb |
Updated AssessmentsController to sanitize display_name by replacing invalid characters and handling consecutive dashes before regex validation. Corrected comparison in expectation statement in assessments_controller_spec.rb . Updated assessment_name and removed flash_error validation expectation in assessment_spec.rb . |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Unique assessment names (used for URLs) are generated more intelligently. E.g., "Lab 1: Intro to Git (practice)" will become "Lab-1-Intro-to-Git-practice" instead of "Lab"
Description
Instead of taking the first section that matches the valid assessment name RegEx pattern, invalid characters will be replaced with dashes to create a more unique name.
Motivation and Context
Instructors may create assessments named "lab 1", "lab 1" etc, and then Autolab complains about the assessment already existing because it's using "lab" as the name. It's tedious to manually pick a longer unique name and then change the displayname afterwards.
How Has This Been Tested?
I created a variety of very complex assessment names and verified they get reasonable unique URLs.
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting