Skip to content

Commit

Permalink
Debug (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Feb 18, 2024
1 parent 1b39e03 commit 5d889f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/pullRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function handlePullRequest($pullRequest)

$referencedIssueResponse = requestGitHub($metadata["token"], "graphql", $referencedIssueQuery);
$referencedIssue = json_decode($referencedIssueResponse["body"]);
print_r($referencedIssue);
if (count($referencedIssue->data->repository->pullRequest->closingIssuesReferences->nodes) > 0) {
$issueNumber = $referencedIssue->data->repository->pullRequest->closingIssuesReferences->nodes[0]->number;
$issueResponse = requestGitHub($metadata["token"], $metadata["issuesUrl"] . "/" . $issueNumber);
Expand All @@ -96,7 +97,6 @@ function handlePullRequest($pullRequest)
requestGitHub($metadata["token"], $metadata["prLabelsUrl"] . "/labels", $labels);
}


if (!$botReviewed) {
$body = array("event" => "APPROVE");
requestGitHub($metadata["token"], $metadata["reviewsUrl"], $body);
Expand Down

0 comments on commit 5d889f0

Please sign in to comment.