mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-20 14:45:05 +00:00
Clear out some random errors in github webhook processor (#76232)
subrequests failing randomly was triggering invalid key errors later on down the line needlessly.
This commit is contained in:
committed by
GitHub
parent
a5c32321ab
commit
0772ff423f
@@ -236,11 +236,15 @@ function set_labels($payload, $labels, $remove) {
|
||||
function tag_pr($payload, $opened) {
|
||||
//get the mergeable state
|
||||
$url = $payload['pull_request']['url'];
|
||||
$payload['pull_request'] = json_decode(github_apisend($url), TRUE);
|
||||
$new_pull_request_payload = json_decode(github_apisend($url), TRUE);
|
||||
if (isset($new_pull_request_payload['id']))
|
||||
$payload['pull_request'] = $new_pull_request_payload;
|
||||
if($payload['pull_request']['mergeable'] == null) {
|
||||
//STILL not ready. Give it a bit, then try one more time
|
||||
sleep(10);
|
||||
$payload['pull_request'] = json_decode(github_apisend($url), TRUE);
|
||||
$new_pull_request_payload = json_decode(github_apisend($url), TRUE);
|
||||
if (isset($new_pull_request_payload['id']))
|
||||
$payload['pull_request'] = $new_pull_request_payload;
|
||||
}
|
||||
|
||||
$tags = array();
|
||||
@@ -642,10 +646,10 @@ $no_changelog = false;
|
||||
function checkchangelog($payload) {
|
||||
global $no_changelog;
|
||||
if (!isset($payload['pull_request']) || !isset($payload['pull_request']['body'])) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
if (!isset($payload['pull_request']['user']) || !isset($payload['pull_request']['user']['login'])) {
|
||||
return;
|
||||
return array();
|
||||
}
|
||||
$body = $payload['pull_request']['body'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user