Skip to content

Commit

Permalink
Fix url (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco authored Feb 18, 2024
1 parent 1b2e152 commit 8a2f1f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
10 changes: 0 additions & 10 deletions Src/lib/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@

function sendQueue($queueName, $headers, $data)
{
global $config;
global $rabbitMqHost, $rabbitMqPort, $rabbitMqUser, $rabbitMqPassword, $rabbitMqVhost;

if (!$config->queue->enabled) {
return false;
}

$payload = array(time(), $headers, $data);
$payload = json_encode($payload);

Expand Down Expand Up @@ -44,13 +39,8 @@ function sendByLib($queueName, $payload)

function receiveQueue($queueName, $callback)
{
global $config;
global $rabbitMqHost, $rabbitMqPort, $rabbitMqUser, $rabbitMqPassword, $rabbitMqVhost;

if (!$config->queue->enabled) {
return false;
}

receiveByLib($queueName, $callback);
}

Expand Down
5 changes: 2 additions & 3 deletions Src/pullRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ function handlePullRequest($pullRequest)
"assigneesUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/issues/" . $pullRequest->Number . "/assignees",
"collaboratorsUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/collaborators",
"requestReviewUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/issues/" . $pullRequest->Number . "/requested_reviewers",
"issuesUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/issues",
"prLabelsUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/issues/" . $pullRequest->Number . "/labels"
"issuesUrl" => "repos/" . $pullRequest->RepositoryOwner . "/" . $pullRequest->RepositoryName . "/issues"
);

$pullRequestResponse = requestGitHub($metadata["token"], $metadata["pullRequestUrl"]);
Expand Down Expand Up @@ -94,7 +93,7 @@ function handlePullRequest($pullRequest)
$body = array("labels" => array("WIP"));
requestGitHub($metadata["token"], $metadata["issuesUrl"] . "/" . $issueNumber . "/labels", $body);
$body = array("labels" => $labels);
requestGitHub($metadata["token"], $metadata["prLabelsUrl"] . "/labels", $body);
requestGitHub($metadata["token"], $metadata["issuesUrl"] . "/" . $pullRequest->Number . "/labels", $body);
}

if (!$botReviewed) {
Expand Down

0 comments on commit 8a2f1f9

Please sign in to comment.