-
-
Notifications
You must be signed in to change notification settings - Fork 681
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 #3300 BUG: Mis-linked page #3303
Conversation
WalkthroughThe changes involve an update to the Changes
Possibly related issues
Suggested labels
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
We require all PRs to follow Conventional Commits specification.
|
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-3303--asyncapi-website.netlify.app/ |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
scripts/dashboard/build-dashboard.js (3)
48-50
: Improved error logging ingetHotDiscussions
.The use of template literals enhances the readability of the error message. This change will make debugging easier.
Consider adding more context to the error message, such as:
console.error( `Error parsing discussion in getHotDiscussions: ${e.message}\nDiscussion: ${JSON.stringify( discussion )}` );This would provide more information about where the error occurred and include the error message.
94-94
: Added clarifying comment inmonthsSince
function.The comment explaining the calculation of seconds in a month improves code readability.
Consider using a named constant for better maintainability:
const SECONDS_IN_MONTH = 2592000; const months = seconds / SECONDS_IN_MONTH;This would make the code more self-documenting and easier to update if needed.
155-155
: Improved error handling and code structure instart
function and module exports.The changes enhance the script's reliability and readability:
- Proper awaiting of file writing operation in the
start
function.- Improved error handling with more informative error messages.
- Better formatting of module exports.
These improvements contribute to a more robust and maintainable codebase.
Consider adding a more descriptive error message in the
start
function:console.log('Error occurred while building the dashboard:'); console.error(e);This would provide more context about where the error occurred in the script.
Also applies to: 161-162, 164-166, 172-172
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- scripts/dashboard/build-dashboard.js (6 hunks)
🧰 Additional context used
🔇 Additional comments (5)
scripts/dashboard/build-dashboard.js (5)
26-30
: Improved interaction count calculation for pull requests.The addition of review counts and review comment counts to the total interactions for pull requests enhances the accuracy of the "hot discussions" calculation. This change ensures that pull requests are more fairly represented in the dashboard.
115-115
: Improved rate limit warning log ingetDiscussions
.The formatting changes to the rate limit warning log enhance readability and make it easier to monitor API usage. This is a good practice for preventing rate limit issues.
128-129
: Enhanced error handling ingetDiscussions
.The addition of error logging before re-throwing the error improves error traceability while maintaining the error propagation. This change will make debugging easier and ensure that errors are not silently caught.
140-140
: Improved error handling ingetDiscussionByID
.The changes enhance error handling by:
- Adding more context to the error message (including the discussion ID).
- Ensuring that errors are both logged and propagated.
These improvements are consistent with the error handling enhancements made elsewhere in the file and will aid in debugging and error tracing.
Also applies to: 143-144
Line range hint
1-172
: Overall assessment of changes inbuild-dashboard.js
The modifications in this file significantly enhance its robustness and maintainability:
- Improved error handling across multiple functions, providing more context in error messages.
- Enhanced calculation of interaction counts for pull requests, leading to more accurate "hot discussions" rankings.
- Better code clarity through added comments and improved formatting.
- More reliable asynchronous operations, particularly in the
start
function.These changes collectively contribute to a more reliable dashboard building process and easier debugging. The consistency in error handling improvements across different functions is particularly commendable.
The "Edit this Page" button on the Welcome | AsyncAPI Initiative for event-driven APIs page currently leads to a 404 error. The button's link is supposed to direct users to the source code for the documentation page but instead points to a broken URL.
Current broken link:
https://github.com/asyncapi/website/blob/master/pages/docs/index.md
Expected behavior:
The link should return a 200 response and display the source code for the documentation, allowing users to contribute edits directly via GitHub.
Changes made:
Updated the "Edit this page" button's URL to point to the correct path for contributing to the documentation.
Fixed link:
https://github.com/asyncapi/website/blob/master/markdown/docs/index.md
Summary by CodeRabbit