Closed lakshaydewan closed 2 weeks ago
Built without sensitive environment variables
Name | Link |
---|---|
Latest commit | b8392778bb6f244a473d7107cf0c19c3efa096da |
Latest deploy log | https://app.netlify.com/sites/asyncapi-website/deploys/67250e7c2add3a00083200f4 |
Attention: Patch coverage is 25.00000%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 49.68%. Comparing base (
551c47a
) to head (b839277
). Report is 5 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
scripts/build-rss.js | 25.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The changes introduce a new constant MIME_TYPES
in scripts/build-rss.js
, which maps file extensions to their corresponding MIME types. A new function, getMimeType(url)
, is added to determine the MIME type based on the file extension from a provided URL. The rssFeed
function is updated to use getMimeType
for setting the MIME type of the enclosure object, simplifying the code by removing manual checks for specific file types.
File | Change Summary |
---|---|
scripts/build-rss.js | Added constant MIME_TYPES for MIME type mapping and function getMimeType(url) for MIME type determination. Updated rssFeed function to utilize getMimeType for setting the enclosure's MIME type. |
build-rss.js
, addressing the need to enhance maintainability and handle more image formats as discussed in the issue.🐰 In the land of code, where rabbits play,
New MIME types hop in, brightening the day.
WithgetMimeType
, we simplify our quest,
Enclosures now gleam, they’re truly the best!
So here’s to the changes, let’s cheer and rejoice,
For clearer, cleaner code, let’s raise our voice! 🎉
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?
Improved the image type detection logic in the build-rss.js file by adding a new function to get the image's MIME type from its url rather than going over each if-checks improving the maintainability and readability of the code
Summary by CodeRabbit
New Features
Bug Fixes