PR Bot improved to check for lowerCase
This commit is contained in:
1 parent
592310c8ea
commit
c3a203b8bb
1 file changed
+3
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user