Sync Issues: consolidate workflow using local action#18
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates the workflow that syncs GitHub Issues to public/data/issues.json by:
- Upgrading to Node 20 and using a local action for issue synchronization
- Adding conditional execution to only commit when the data file actually changes
- Streamlining the git operations for both main and gh-pages branches
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -2,7 +2,7 @@ name: Sync Issues to JSON | |||
|
|
|||
| on: | |||
| issues: | |||
There was a problem hiding this comment.
The addition of 'labeled' and 'reopened' trigger types is undocumented in the PR description. Consider documenting why these triggers were added to help future maintainers understand the complete scope of issue events that trigger synchronization.
| issues: | |
| issues: | |
| # The workflow is triggered on multiple issue events to ensure the JSON data stays in sync. | |
| # 'labeled' is included to capture changes in issue labels, which may affect downstream processing. | |
| # 'reopened' is included to handle issues that are reopened, ensuring their state is updated in the JSON. | |
| # Other events ('opened', 'edited', 'closed') are standard for issue lifecycle changes. |
| git fetch origin gh-pages || true | ||
| git checkout gh-pages || git switch -c gh-pages |
There was a problem hiding this comment.
The || true on line 68 silently ignores fetch errors, which could mask legitimate issues like network failures or repository access problems. Consider checking if gh-pages exists first with git ls-remote --heads origin gh-pages and handling the branch creation case explicitly rather than suppressing all errors.
| git fetch origin gh-pages || true | |
| git checkout gh-pages || git switch -c gh-pages | |
| if git ls-remote --exit-code --heads origin gh-pages; then | |
| git fetch origin gh-pages | |
| git checkout gh-pages | |
| else | |
| git switch --create gh-pages | |
| fi |
7dd5adb to
3dc2420
Compare
…ctions/sync-issue/lib/core.js
|
He eliminado el fichero |
fb5e47b to
a4dd9e5
Compare
Esta PR consolida el workflow que sincroniza Issues a
public/data/issues.json:\n\n- Usa Node 20 y hacenpm cienactions/sync-issue\n- Ejecuta la acción localactions/sync-issuepara transformar el Issue en JSON\n- Solo hace commit sipublic/data/issues.jsoncambia\n- Replica el archivo a la ramagh-pagescuando hay cambios\n\nRazón: eliminar fragmentos duplicados y asegurar un flujo mínimo y predecible.