From 3d14b0b766002c66afc17bcbd40a1266e93d9b3b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 9 Aug 2021 18:43:35 +0200 Subject: [PATCH] Goverance Github Server Bug Fixed --- Client/githubServer.js | 6 ++++-- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Client/githubServer.js b/Client/githubServer.js index 7b18d2c95..e905c84e1 100644 --- a/Client/githubServer.js +++ b/Client/githubServer.js @@ -295,6 +295,8 @@ exports.newGithubServer = function newGithubServer() { let fileContentUrl // URL to the only file at the PR let fileContent // File content of the only file at the PR let userProfile // User Profile Object + let githubUsername // The Github user name of who is submitting the Pull Request + let mergeResponse // The response received from the call to Gihub to merge the Pull Request if (await validatePrHasMoreThanOneFile() === false) { continue } if (await validateFileNameEqualsGithubUsername() === false) { continue } @@ -372,7 +374,7 @@ exports.newGithubServer = function newGithubServer() { let fileName = splittedURL[splittedURL.length - 1] let splittedFileName = fileName.split('.') fileName = splittedFileName[0] - let githubUsername = pullRequest.user.login + githubUsername = pullRequest.user.login if (githubUsername !== fileName) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the File Name. -> Github Username = ' + githubUsername + '-> fileName = ' + fileName) @@ -517,7 +519,7 @@ exports.newGithubServer = function newGithubServer() { All validations passed, we will proceed an merge this Pull Request. */ await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) - let mergeResponse = await octokit.rest.pulls.merge({ + mergeResponse = await octokit.rest.pulls.merge({ owner: owner, repo: repo, pull_number: pullRequest.number, diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 1c52d84f1..13e4c12ea 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13774,7 +13774,7 @@ } } }, - "id": "1fd95e41-4b22-48d5-be3a-904c37afcb11", + "id": "148911b3-b2f3-44fb-8cb4-017991789132", "savedPayload": { "position": { "x": 30316,