From c7488b91554448aabb8fd2d08874879546737d27 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 17:54:01 +0200 Subject: [PATCH] Governance Update Testing gov.prs 16 --- Client/httpInterface.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index b93c97662..e6623b2be 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1334,13 +1334,14 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE */ for (j = 0; j < listResponse.data.length; j++) { let pullRequestFile = listResponse.data[j] - if (pullRequestFile.indexOf('Governance/Plugins/User-Profiles') >= 0) { + let fileContentUrl = pullRequestFile.raw_url + if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') >= 0) { await sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that a User Profile file "' + pullRequestFile + '" was submitted it together with ' + listResponse.data.length + ' other files. User Profiles files as per the Governance System rules, must be the only file present at a Pull Request in order to pass all the validations and be automatically merged.' + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that a User Profile file... \n\n' + fileContentUrl + '\n\n...was submitted together with ' + (listResponse.data.length - 1)+ ' other file/s. User Profiles files as per the Governance System rules, must be the only file present at a Pull Request in order to pass all the validations and be automatically merged.' }); await sleep(GITHUB_API_WAITING_TIME)