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

Update usage of API to receive hacktoberfest issues and contributors #13

Open
11 tasks
hendrikebbers opened this issue Oct 16, 2024 · 4 comments
Open
11 tasks
Assignees
Labels
hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution.

Comments

@hendrikebbers
Copy link
Contributor

🆕🐥 First Timers Only

This issue is reserved for people who have never contributed to Hiero or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by 'Good First Issue' is to help you make your first contribution to Hiero.

👾 Description of the issue

Currently, the webpage contains dynamic parts to show all available issues for hacktoberfest and all contributors. You can find the usage at https://hiero.org/hacktoberfest/ and https://hiero.org/heros/.

To create those dynamic parts we use Hugo shortcuts that are defined here: https://github.com/LFDT-Hiero/website/tree/main/layouts/shortcodes

The shortcuts do not call GitHub directly but use an API facade that is defined by this project: https://github.com/OpenElements/good-first-issue-provider. That project is based on Spring boot and you can find the API endpoints here: https://github.com/OpenElements/good-first-issue-provider/blob/main/src/main/java/com/openelements/issues/ApiEndpoint.java

The shortcuts in the website still use old API calls that are already depreciated. The shortcuts should be refactored for us using the new API endpoints (v2).

📋 Step by step guide to do a contribution

If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. More information and concrete samples for shell commands for each step can be found in our CONTRIBUTING.md file.
A more detailed general documentation of the GitHub PR workflow can be found here.

  • Claim this issue: Comment below that you are interested in working on the issue
  • Wait for assignment: A community member with the given rights will add you as an assignee of the issue
  • Fork the repository: You can do that in GitHub (by simply clicking the 'fork' button).
  • Check out the forked repository
  • Create a feature branch for the issue. We do not have a hard naming definition for branches but it is best practice to prefix the branch name with the issue id.
  • Solve the issue in your branch.
  • Commit your changes: Here, it is needed to add sign-off information to the commit to accept the "Developer Certificate of Origin" (https://developercertificate.org). More details can be found in our CONTRIBUTING.md
  • Start a Pull Request (PR): We have a pattern for naming pull requests that a GitHub Action checks. We use that pattern to support the creation of automatic release notes.
  • Check GitHub Actions: Several GitHub Actions will be triggered automatically for each PR. If a GitHub Action fails and you do not understand the cause of that error do not hesitate to add a comment to the PR and ask the Hiero developer community for support.
  • Wait for reviews: Members of the Hiero developer community will review your PR. If a reviewer finds any missing pieces or a problem, he or she will start a discussion with you and describe the next steps for solving the problem.
  • You did it 🎉: We will merge the fix in the develop branch. Thanks for being part of the Hiero community as an open-source contributor ❤️

🎉 Contribute to Hacktoberfest

Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. 🎽

🤔 Additional Information

If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.

@hendrikebbers hendrikebbers added the hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution. label Oct 17, 2024
@belloibrahv
Copy link
Contributor

Request to Work on the Issue:

Hi, I'd love to contribute to this issue as part of Hacktoberfest. I’ve gone through the issue details and am looking forward to helping refactor the Hugo shortcuts to use the new API endpoints (v2).

Summary of My Understanding:
The website currently uses deprecated API calls in Hugo shortcuts to dynamically display Hacktoberfest issues and contributors. The task involves refactoring these shortcuts to call the new API endpoints provided by the good-first-issue-provider project.

Before I start, I’d appreciate some clarification on a few points to ensure I proceed in the right direction:

  1. Is the refactoring limited to the Hugo shortcuts, or should I also look into other areas of the project that might rely on the deprecated API?
  2. Are there any specific conventions or coding practices you’d like me to follow while modifying the Hugo shortcuts?
  3. Should I account for any differences in response structure between the old and new API endpoints?
  4. What is the preferred method for testing these updated Hugo shortcuts to ensure that the integration works as expected?
  5. Are there any API rate limits or restrictions we should be aware of while implementing these changes?

Thanks for your time! I look forward to your response and to being officially assigned to the issue.

@hendrikebbers
Copy link
Contributor Author

Hey @belloibrahv see my answers:

  • The refactoring is limited to the shortcuts
  • We do not have specific conventions so far
  • The api data has changed and the new structure must be used (repository in now a custom type instead of X params in an issue)
  • We do not have any automatic tests for the usecase. When you create a PR a temporary instance of the website will be hosted at netlify. When that websites shows the same data as the live page we are good
  • There are no API rate limits

@belloibrahv
Copy link
Contributor

Hi @hendrikebbers, @ryjones, @samswag, @giftkugel,

Could you kindly help review my PR #17? Any feedback or suggestions would be appreciated!

Thank you!

@hendrikebbers
Copy link
Contributor Author

50 % done but there is still https://github.com/hiero-ledger/hiero-website/blob/main/content/hacktoberfest/index.md that used the old API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution.
Projects
None yet
Development

No branches or pull requests

2 participants