fix: improve blog publishing workflow - #342
Conversation
|
@AgnibhaDebnath is attempting to deploy a commit to the PhysicsHub's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for this! Can you test it to see if works fine? |
|
Nice! I saw the test and it's cool, can you add a prettier automation or something like that for the auto formatting before sending the PR? And please can you add also the header for the metadata on the blog file, like that for example: `import TAGS from "../tags.js"; export const ballFreeFallBlog = { |
|
Thanks! I'm glad the workflow is working. Both suggestions make sense. Auto-formatting the generated blog file would prevent contributors from running into formatting issues, and adding the metadata header would make the generated blogs consistent with the existing blog structure. I'm a bit busy with exams at the moment, but I should be able to work on these improvements in the next 4–5 days. |
|
Oh I forgot also, what is the limit of request that can support this github API? No problem, no need to rush, let me know when it's finished |
|
Regarding the GitHub API limits, my understanding is that once GitHub OAuth is implemented, the workflow would use each contributor's GitHub access token rather than a single shared token. In that case, the rate limits would apply per authenticated user, so requests would be distributed across contributors instead of all blog submissions sharing the same API quota. For authenticated requests, GitHub's REST API generally allows up to 5,000 requests per hour per user/token, and the current publishing workflow only performs a small number of API calls per submission (creating a branch, creating the file, opening the PR, etc.), so I don't expect rate limits to be a significant issue. |
|
Oh ok alright, will you implement also the Github Auth system? If not can you please create an issue with the details of how should be created this thing please? |
|
I'd like to work on it, but I'm currently preparing for exams and probably won't be able to start before mid-July. The GitHub OAuth implementation would also require some maintainer-side configuration, such as setting up the GitHub OAuth App, configuring the callback URL, and providing the required environment variables. If you're okay with that timeline, I'd be happy to pick it up after my exams. |
I found the blog metadata structure. For fields such as For Also, how would you like the |
|
i'd love to have more input fields for these values, so if you can add them would be awesome. For the id, I' not completely sure of what to do, maybe it's better generate them automatically, but honestly you are free to find the right solution |
|
Nice! Only one thing, for the tags there is a component called Tag that have all the style and features integrated. And idk if you have already done it but use the list of tags original in tags.js |
|
Than i will check that the PR for the blog proposal works and if so i'll merge this pr |
|
For the tags list i will put like a scrolling frame or just like in /simulations the filter menu, cause there are too much tags and it risks to be too long |
|
Can you use please the Tag component (in (core)/components/Tag.jsx) so the style is uniform? |
|
thank you! |
|
Can you see please if the Test Blog is working properly please? If so everything it's good! |
|
I tested the workflow and everything seems to be working correctly. The blog proposal branch was created, the generated JSON includes the metadata and formatting as expected, and the PR was opened successfully. |
|
Good! Thank you for this! Can you please create the issue for completing the system with the auth? |
|
🎉 This PR is included in version 3.29.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |



🔍 Description
This PR fixes several issues in the blog publishing workflow.
Changes
dataContent→jsonContent).Closes #322
✅ Checklist
npm run dev)🎨 Visual Changes (if UI-related)
No significant UI changes.
📂 Type of Change
🧩 Additional Notes for Reviewers
Current Limitation
The contributor-fork workflow has been validated locally, but the fork owner is currently hardcoded for testing purposes.
A future authentication mechanism (e.g. GitHub OAuth) will be required to:
ESLint
I was unable to run the repository lint checks successfully because
npm run lintcurrently fails with:TypeError: Converting circular structure to JSONThe error appears to originate from the ESLint configuration and is reproducible independently of the changes in this PR.