com web/qa: Require comment also for labels: pulls/api.php

From: Date: Fri, 11 Nov 2016 20:03:12 +0000
Subject: com web/qa: Require comment also for labels: pulls/api.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-67847@lists.php.net to get a copy of this message
Commit: 9c528404b8d0ca4d92224ed282a5741ad35b53c1 Author: Anatol Belski <ab@php.net> Fri, 11 Nov 2016 21:03:12 +0100 Parents: 7a51e67974f415bfd5295d81b29bfdb206d7ee9f Branches: master Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=9c528404b8d0ca4d92224ed282a5741ad35b53c1 Log: Require comment also for labels As the pulls user is used, a comment might reveal more on the dev intentions. Whereby principally, the labels updating could be separated from the status change. Anyway, the basic labels funtionality is there, so it can be reworked later on. Changed paths: M pulls/api.php Diff: diff --git a/pulls/api.php b/pulls/api.php index 1b11d50..6f25d72 100644 --- a/pulls/api.php +++ b/pulls/api.php @@ -218,12 +218,10 @@ function ghupdate() $comment = @get_magic_quotes_gpc() ? stripslashes($_POST['comment']) : $_POST['comment']; - if (!is_array($_POST['labels'])) { - if (!ghpostcomment($pull, $comment)) { - header('500 Internal Server Error'); - $errors[] = "Failed to add comment on GitHub"; - die(json_encode(array('success' => false, 'errors' => $errors))); - } + if (!ghpostcomment($pull, $comment)) { + header('500 Internal Server Error'); + $errors[] = "Failed to add comment on GitHub"; + die(json_encode(array('success' => false, 'errors' => $errors))); } if (!empty($_POST['state'])) {

« previous php.qa (#67847) next »