KnpLabs / KnpLabs/php-github-api
Error when adding a label to an issue
Nessuno ha ancora preso questa issue.
- Lingua principale
- PHP
- Stelle
- 2.2k
- Fork
- 585
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello,
I have an error when I try to add a label on an issue, following this documentation.
Here is how I do it:
$labels = $client->api('issue')->labels()->add('matthieu-rolland', 'test-issuebot', 51, 'Fixed');
And here is what I get:
PHP Fatal error: Uncaught Github\Exception\RuntimeException: Invalid request.
No subschema in "anyOf" matched.
When I debug I see that the response I get is actually:
ERROR 422 Unprocessable Entity
I didn't manage to identify the cause of this problem...
Some more information:
- It does work when I call github's API directly via postman with the same github token
- While debugging I saw that the URI and HTTP methods seem correct (but maybe not until the end?)
- I'm not sure about the request's body
- VERSION 2.12.1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Direzione di ricerca
Inizia con l'esempio add-a-label nella documentazione issue-labels collegata e con la chiamata PHP mostrata per la versione 2.12.1. Confronta il corpo della richiesta e la gestione della risposta con la richiesta Postman riuscita; il lavoro è terminato quando l'aggiunta dell'etichetta non produce più l'errore 422 Invalid request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github, php
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100