From c3a203b8bbfd459b0315edda776eb7df6f46d677 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 29 Oct 2021 15:51:15 +0200 Subject: [PATCH] PR Bot improved to check for lowerCase --- Platform/Client/githubServer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index 96d8dcf6e..6b497c568 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -420,7 +420,7 @@ exports.newGithubServer = function newGithubServer() { */ let config = JSON.parse(userProfile.config) let messageSigned = config.signature.message - if (messageSigned !== githubUsername) { + if (messageSigned.toLowerCase() !== githubUsername.toLowerCase()) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #4 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the Message Signed at the User Profile. -> Github Username = ' + githubUsername + '-> messageSigned = ' + messageSigned) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) @@ -480,7 +480,7 @@ exports.newGithubServer = function newGithubServer() { /* Validation #6: The name of the User Profile node is not the Github Username. */ - if (userProfile.name !== githubUsername) { + if (userProfile.name.toLowerCase() !== githubUsername.toLowerCase()) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME) @@ -628,7 +628,7 @@ exports.newGithubServer = function newGithubServer() { */ let messageSigned = config.signature.message - if (messageSigned !== githubUsername) { + if (messageSigned.toLowerCase() !== githubUsername.toLowerCase()) { console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #9 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername) await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)