Modernizing the project
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, javascript, nodejs
Direzione di ricerca
Inizia esaminando la configurazione dello sviluppo e scripts/node-subsystem-label.js, quindi analizza i punti di ingresso del webhook e di Jenkins-hook menzionati nell’issue. Il lavoro proposto comprende la sostituzione delle dipendenze, l’infrastruttura di test, repository configurabili ed eventualmente un relay di Actions. Per considerarlo completato sarebbe necessario un piano di modernizzazione circoscritto e un’implementazione coordinata, anziché una singola modifica isolata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
First of, I love our GitHub bot. It's an essential piece of our infrastructure, and it can fill the gaps where GitHub Actions don't work well (the whole read-only, no secrets situation with forked PRs). With that being said, I have been trying to contribute to the project and the entry barrier seems somewhat high:
- Getting the development environment working on my machine took between one and two hours
- There's no way (afaik) to properly test Jenkins hooks
- Some of the dependencies we use are deprecate (
github,request, there might be others too) githubis not only deprecated, it lacks documentation. To find out which method to use, developers need to look into the TypeScript definition and then figure out which GitHub API is being called to read the documentation on https://developer.github.com/v3/- Some parts of the code have hardcoded
nodejsas org andnodeas repository, which makes it impossible for users to test without finding these conditionals and changing them/commenting those out
The project is also heavily callback-oriented, some parts would probably benefit from changing to an async/await-oriented implementation (I know this is more controversial, so I won't push too much on it).
Based on the points above, I have some suggestions to modernize the project:
- To improve the development experience, we could set up our own relay, which would essentially be a multiplexer receiving webhook calls from
nodejs/node-auto-test. Anyone who wants to collaborate would connect to that relay, and they would receive the appropriate tokens needed for testing. We could add checks so that only certain teams are allowed to request access. We can also have a separate user with permissions limited tonodejs/node-auto-test, to prevent folks from mistakenly affecting other repositories. The same relay could be used for Jenkins hooks. - To avoid hardcoded repositories and orgs, we could move some of the logic to the repositories. For example, labeling is only enabled on
nodejs/node, if we moved the labels definition tonodejs/node(so that the bot loads the definition when needed), it would be easier for collaborators to include/remove definitions for new files, and it would also allow the bot to detect if that repository supports labeling or not. - Replacing deprecated dependencies and potentially moving more towards
async/awaitAPI might be harder. We could either start a new branch from scratch, or try to modernize different pieces individually. Either way it will need some coordination efforts as well as a lot of work to get it working properly.
As an alternative, we could turn the github-bot into an Actions relay: it would receive events from GitHub and Jenkins, and would forward those events to the repository dispatch API. This way, we could define everything as Actions on the respective repositories, circumventing the gaps with Actions on forked PRs and being able to define Actions for Jenkins events.
What do folks think? cc @nodejs/github-bot
- Lingua principale
- JavaScript
- Stelle
- 305
- Fork
- 148
- Merge medio
- 9h 2m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nodejs/github-bot
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
nodejs/github-bot#308 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
nodejs/github-bot#283 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
nodejs/github-bot#262 · 2 commenti ·
-
Bot comment on build failure Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
nodejs/github-bot#251 · 5 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
nodejs/github-bot#233 · 1 commento ·
Tutte le issue di nodejs/github-bot
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Seeed-Studio/wiki-documents#5655 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
capricorn86/happy-dom#2435 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Edit: CW+ Apertachannels:edit check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100