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

refactor(shortcodes): update contributors grid to use v2 API #17

Conversation

belloibrahv
Copy link
Contributor

@belloibrahv belloibrahv commented Oct 19, 2024

Update Hugo Shortcodes to use V2 API

Description
This PR updates the Hugo shortcodes to use the new V2 API endpoints, replacing the deprecated API calls. The changes improve the functionality and maintainability of the website's dynamic content loading.

Changes Made

  • Contributors Grid (contributorsGrid.html):
    • Updated to use /api/v2/contributors endpoint
    • Added default endpoint configuration
    • Improved error handling
    • Maintained existing frontend rendering

Usage Examples

Contributors Grid:

{{< contributorsGrid endpoint="https://hedera-issues.koyeb.app/api/v2/contributors" >}}

Implementation Challenges with V2 API Endpoint

Current Status & Challenges

1. API Endpoint Issues

When attempting to access the v2 API endpoint https://hedera-issues.koyeb.app/api/v2/issues, I encountered several issues:

Error Response

When accessing the endpoint directly, I receive a 500 Internal Server Error:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Oct 19 22:25:41 UTC 2024
There was an unexpected error (type=Internal Server Error, status=500).

Code vs Reality Mismatch

2. Implementation Decisions

In light of the challenges encountered, I have made the following decisions:

  • I opted to leave the existing issueList codebase snippet unchanged to ensure stability and prevent any unintended side effects.

🔍 Current Issues Identified

  1. V2 API endpoint returns 500 Internal Server Error
  2. Existing endpoint (/api/hacktoberfest-issues) remains the only working solution
  3. Discrepancy between API implementation in code and actual deployment

🔗 Related Links

Copy link

netlify bot commented Oct 19, 2024

Deploy Preview for hiero-open-source ready!

Name Link
🔨 Latest commit c65cf34
🔍 Latest deploy log https://app.netlify.com/sites/hiero-open-source/deploys/67143f810949950008dfd5ef
😎 Deploy Preview https://deploy-preview-17--hiero-open-source.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hendrikebbers
Copy link
Contributor

@belloibrahv thank you so much for your work and the really great documentation. That is really awesome!!! May I ask you to create an issue at https://github.com/OpenElements/good-first-issue-provider/issues for the broken endpoint?

@hendrikebbers hendrikebbers merged commit 5b0a356 into hiero-ledger:main Oct 22, 2024
6 checks passed
@belloibrahv
Copy link
Contributor Author

@Hendrik Ebbers Thank you for reviewing and merging my PR! As requested, I've created a detailed issue for the broken V2 API endpoint at: OpenElements/good-first-issue-provider#10

The issue includes comprehensive documentation of the error, steps to reproduce, and relevant technical details that should help in addressing the problem. Please let me know if you need any additional information or clarification.

Thank you for the opportunity to contribute to this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants