1024pix / pix-bot

Automatisation de développement
GNU General Public License v3.0
10 stars 3 forks source link

[FEATURE] Clôturer les review apps depuis Pix Bot (PIX-14712) #449

Closed MathieuGilet closed 7 hours ago

MathieuGilet commented 8 hours ago

:unicorn: Problème

Scalingo ne clôture pas automatiquement toutes les reviews apps lorsqu'une PR est clôturée/mergée.

:robot: Proposition

Ajouter dans Pix Bot la capacité de clôturer une review app.

:100: Pour tester

curl -X POST -H "x-github-event: pull_request" -H "content-type: application/json" http://localhost:3000/github/webhook -d '{"action":"closed","number":83,"pull_request":{"state":"closed","head":{"repo":{"name":"pix-tutos","fork":false}}}}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:3000...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> POST /github/webhook HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.81.0
> Accept: */*
> x-github-event: pull_request
> content-type: application/json
> Content-Length: 115
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-type: text/html; charset=utf-8
< cache-control: no-cache
< content-length: 44
< Date: Wed, 09 Oct 2024 14:38:00 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< 
* Connection #0 to host localhost left intact
Closed RA for PR 83 : pix-tutos-review-pr83.%
pix-bot-github commented 8 hours ago

Une fois l'application déployée, elle sera accessible à cette adresse https://bot-pr449.review.pix.fr Les variables d'environnement seront accessibles sur scalingo https://dashboard.scalingo.com/apps/osc-fr1/pix-bot-review-pr449/environment