From 621a72c3339d994cea3be984a35f7d0bd80429c3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 14:51:11 +0200 Subject: [PATCH 01/28] Governance Update Testing gov.prs 5 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index b670c14c0..4d906dba0 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\"tokens\":10000000,\"signature\":{\"message\":\"Luis-Fernando-Molina\",\"messageHash\":\"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\"v\":\"0x1b\",\"r\":\"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\"s\":\"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\"signature\":\"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"},\"codeName\":\"Luis-Fernando-Molina\"}", + "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From d9026e75051ecfe59ef31456fdcdd180f18d8e36 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 14:52:38 +0200 Subject: [PATCH 02/28] Governance Update Testing gov.prs 5 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 4d906dba0..16c1698d0 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From 1a01996ff4ebb4d5ab131fbb766829e07a539f98 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:05:51 +0200 Subject: [PATCH 03/28] Governance Update Testing gov.prs 6 --- Client/httpInterface.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 7f4cf06bf..91a5ff9b7 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1256,7 +1256,6 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE while (lastPage === false) { try { page++ - console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Requesting Page = ' + page) await sleep(GITHUB_API_WAITING_TIME) let listResponse = await octokit.rest.pulls.list({ @@ -1382,6 +1381,14 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE continue } else { console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message) + await sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.createReviewComment({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + body: 'This Pull Request was automatically merged by Superalgos because it was detected that a Github Username modified its own User Profile plugin file and nothning else but that file. All validations ran were successfull.' + }); + continue } } } From d9e6df8251acac05e8fcdb5e0383d0ed9a0b0a8a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:07:25 +0200 Subject: [PATCH 04/28] Governance Update Testing gov.prs 7 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 16c1698d0..53710724b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13333,7 +13333,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From 974112e6192f01094763783a0bafd9d0c1cf701d Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:13:17 +0200 Subject: [PATCH 05/28] Governance Update Testing gov.prs 8 --- Client/httpInterface.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 91a5ff9b7..4e753bc4d 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1382,10 +1382,10 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE } else { console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message) await sleep(GITHUB_API_WAITING_TIME) - await octokit.rest.pulls.createReviewComment({ + await octokit.rest.issues.createComment({ owner: owner, repo: repo, - pull_number: pullRequest.number, + issue_number: pullRequest.number, body: 'This Pull Request was automatically merged by Superalgos because it was detected that a Github Username modified its own User Profile plugin file and nothning else but that file. All validations ran were successfull.' }); continue From 1caa07032e15582ef7266153efa9d6d9803ac608 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:14:57 +0200 Subject: [PATCH 06/28] Governance Update Testing gov.prs 9 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 53710724b..6a96f898c 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From a6014ebc7964057ba7bcf12f1880067c7c079fd9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:27:27 +0200 Subject: [PATCH 07/28] Governance Update Testing gov.prs 10 --- Client/httpInterface.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 4e753bc4d..90ccb6f35 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1362,7 +1362,23 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let config = JSON.parse(userProfile.config) let messageSigned = config.signature.message if (messageSigned !== githubUsername) { - console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #4 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the Messaged Signed at the User Profile. -> Github Username = ' + githubUsername + '-> messageSigned = ' + messageSigned) + console.log('[INFO] httpInterface -> Gov -> 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 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 by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile. messageSigned = "' + messageSigned + '"' + }); + + await sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); continue } /* @@ -1386,7 +1402,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request was automatically merged by Superalgos because it was detected that a Github Username modified its own User Profile plugin file and nothning else but that file. All validations ran were successfull.' + body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that a Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.' }); continue } From 5c13d0bc55491c89ef485afa2d983b75ca63de64 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:29:05 +0200 Subject: [PATCH 08/28] Governance Update Testing gov.prs 11 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 6a96f898c..53710724b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From e515d88a0bfd7c9db0545a7af8eccbf376c432ae Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:32:13 +0200 Subject: [PATCH 09/28] Governance Update Testing gov.prs 12 --- Client/httpInterface.js | 2 +- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 90ccb6f35..331f6ca66 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1402,7 +1402,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that a Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.' + body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.' }); continue } diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 53710724b..374c6f5f5 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From 7f23ed50f6193efdafb0827edc16a09780f8ffcb Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:33:27 +0200 Subject: [PATCH 10/28] Governance Update Testing gov.prs 13 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 374c6f5f5..73d2f4ac7 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXYYYLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From 5cb1e63e69dbb74091f6a4ec92aac70a8540b6fa Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 15:36:35 +0200 Subject: [PATCH 11/28] Governance Update Testing gov.prs 14 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 73d2f4ac7..53710724b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"XXXYYYLuis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", From 8f2caba4a5a51448730c77ac1e7db5ed47999318 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 17:46:29 +0200 Subject: [PATCH 12/28] Governance Update Testing gov.prs 15 --- Client/httpInterface.js | 35 ++++++++++++++++--- .../User-Profiles/Luis-Fernando-Molina.json | 2 +- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 331f6ca66..b93c97662 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1328,6 +1328,31 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE */ if (listResponse.data.length !== 1) { console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #1 Failed -> Pull Request "' + pullRequest.title + '" not merged because it contains more than 1 file. -> fileCount = ' + listResponse.data.length) + /* + We will close PRs that contains any User Profile file together with other files in the same Pull Request. + This will avoid manual merges to include User Profile files. + */ + for (j = 0; j < listResponse.data.length; j++) { + let pullRequestFile = listResponse.data[j] + if (pullRequestFile.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.' + }); + + await sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); + break + } + } continue } let pullRequestFile = listResponse.data[0] @@ -1363,14 +1388,14 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let messageSigned = config.signature.message if (messageSigned !== githubUsername) { console.log('[INFO] httpInterface -> Gov -> 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 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 by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile. messageSigned = "' + messageSigned + '"' - }); + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile. messageSigned = "' + messageSigned + '"' + }); await sleep(GITHUB_API_WAITING_TIME) await octokit.rest.pulls.update({ @@ -1402,8 +1427,8 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE owner: owner, repo: repo, issue_number: pullRequest.number, - body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.' - }); + body: 'This Pull Request was automatically merged by the Superalgos Governance System because it was detected that the Github User " ' + githubUsername + '" who submitted it, modified its own User Profile Plugin File and nothning else but that file. All validations were successfull.' + }); continue } } diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 53710724b..6a96f898c 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From c7488b91554448aabb8fd2d08874879546737d27 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 17:54:01 +0200 Subject: [PATCH 13/28] 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) From e7cd1702cc0d6006d6aaaa8ce3095d4468d5331a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:00:57 +0200 Subject: [PATCH 14/28] Governance Update Testing gov.prs 17 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 6a96f898c..53710724b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From c40f42579790f5ce73547b398bd1e5586a67711c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:02:42 +0200 Subject: [PATCH 15/28] Governance Update Testing gov.prs 18 --- .../Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 53710724b..6a96f898c 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From c990670bbbfafa1cdb27eaf0b38cda8c9c0ddb95 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:05:29 +0200 Subject: [PATCH 16/28] Changes in Marina User Profile --- .../Plugins/User-Profiles/MarinitaMarina.json | 180 +----------------- 1 file changed, 1 insertion(+), 179 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json index 9d0159c15..99b9cd2dc 100644 --- a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json +++ b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json @@ -9,184 +9,6 @@ "config": "{}", "project": "Governance", "tokenPowerSwitch": [], - "githubProgram": { - "type": "Github Program", - "name": "New Github Program", - "config": "{}", - "project": "Governance", - "tokensAwarded": { - "type": "Tokens Awarded", - "name": "New Tokens Awarded", - "project": "Governance", - "id": "3c7c14f1-ff7a-4d50-9178-5887e35d3c96", - "savedPayload": { - "position": { - "x": 13875, - "y": 26618.115242270665 - }, - "targetPosition": { - "x": 13725, - "y": 26358.307621135333 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "4064a67f-7169-476b-a3fc-1265482099d3", - "savedPayload": { - "position": { - "x": 13725, - "y": 26358.307621135333 - }, - "targetPosition": { - "x": 13575, - "y": 26098.5 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "referralProgram": { - "type": "Referral Program", - "name": "New Referral Program", - "config": "{}", - "project": "Governance", - "userReferrers": [ - { - "type": "User Referrer", - "name": "Luis-Fernando-Molina", - "config": "{}", - "project": "Governance", - "id": "299528a7-3d40-4818-a4c3-43c70ced1d77", - "savedPayload": { - "position": { - "x": 13502.645713530756, - "y": 26648.085369022054 - }, - "targetPosition": { - "x": 13425, - "y": 26358.307621135333 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - }, - "referenceParent": { - "type": "User Profile", - "name": "Luis-Fernando-Molina", - "id": "148911b3-b2f3-44fb-8cb4-017991789132" - }, - "referenceParentCombinedNodePath": [ - [ - "Luis-Fernando-Molina", - "User Profile" - ] - ] - } - } - ], - "tokensAwarded": { - "type": "Tokens Awarded", - "name": "New Tokens Awarded", - "project": "Governance", - "id": "f39667c5-7c43-4f8f-b97b-86f07c9b49a6", - "savedPayload": { - "position": { - "x": 13275, - "y": 26618.115242270665 - }, - "targetPosition": { - "x": 13425, - "y": 26358.307621135333 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "tokensBonus": { - "type": "Tokens Bonus", - "name": "New Tokens Bonus", - "project": "Governance", - "id": "04456e5c-121f-4f34-9853-e55d2739b978", - "savedPayload": { - "position": { - "x": 13135.222252113279, - "y": 26435.95333466609 - }, - "targetPosition": { - "x": 13425, - "y": 26358.307621135333 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "4db2f276-f06f-4fd5-8041-e6172efdf3a5", - "savedPayload": { - "position": { - "x": 13425, - "y": 26358.307621135333 - }, - "targetPosition": { - "x": 13575, - "y": 26098.5 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, "id": "eef4e172-d7db-421d-8881-9ae4dc6bd35d", "savedPayload": { "position": { @@ -250,7 +72,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 43a396e471a31a43e09d37cddb8b4dea91023dbc Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:15:35 +0200 Subject: [PATCH 17/28] Governance: Automatic Merging of PRs for User Profiles changes. --- Client/httpInterface.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index e6623b2be..2a92f8c29 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1369,6 +1369,22 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE if (githubUsername !== fileName) { console.log('[INFO] httpInterface -> Gov -> 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) + + 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 the Github User "' + githubUsername + '" who submitted it, is not equal to the name of the User Profile Plugin File.\n\n File Name = "' + fileName + '"' + }); + + await sleep(GITHUB_API_WAITING_TIME) + await octokit.rest.pulls.update({ + owner: owner, + repo: repo, + pull_number: pullRequest.number, + state: 'closed' + }); continue } await sleep(GITHUB_API_WAITING_TIME) @@ -1395,7 +1411,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE 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 the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile. messageSigned = "' + messageSigned + '"' + body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile.\n\n Message Signed = "' + messageSigned + '"' }); await sleep(GITHUB_API_WAITING_TIME) From 4f56770b566c47afb4338a8a8e40fef6921a9f77 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:16:49 +0200 Subject: [PATCH 18/28] Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed. --- Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json index 99b9cd2dc..fa62ec7f5 100644 --- a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json +++ b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json @@ -72,7 +72,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 0f71e715e9024f6fca9ff808df6b4f917199a117 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:18:28 +0200 Subject: [PATCH 19/28] Revert "Changes in Marina User Profile" This reverts commit c990670bbbfafa1cdb27eaf0b38cda8c9c0ddb95. --- .../Plugins/User-Profiles/MarinitaMarina.json | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json index fa62ec7f5..9d0159c15 100644 --- a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json +++ b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json @@ -9,6 +9,184 @@ "config": "{}", "project": "Governance", "tokenPowerSwitch": [], + "githubProgram": { + "type": "Github Program", + "name": "New Github Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "3c7c14f1-ff7a-4d50-9178-5887e35d3c96", + "savedPayload": { + "position": { + "x": 13875, + "y": 26618.115242270665 + }, + "targetPosition": { + "x": 13725, + "y": 26358.307621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "4064a67f-7169-476b-a3fc-1265482099d3", + "savedPayload": { + "position": { + "x": 13725, + "y": 26358.307621135333 + }, + "targetPosition": { + "x": 13575, + "y": 26098.5 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "referralProgram": { + "type": "Referral Program", + "name": "New Referral Program", + "config": "{}", + "project": "Governance", + "userReferrers": [ + { + "type": "User Referrer", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "299528a7-3d40-4818-a4c3-43c70ced1d77", + "savedPayload": { + "position": { + "x": 13502.645713530756, + "y": 26648.085369022054 + }, + "targetPosition": { + "x": 13425, + "y": 26358.307621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "148911b3-b2f3-44fb-8cb4-017991789132" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "f39667c5-7c43-4f8f-b97b-86f07c9b49a6", + "savedPayload": { + "position": { + "x": 13275, + "y": 26618.115242270665 + }, + "targetPosition": { + "x": 13425, + "y": 26358.307621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "04456e5c-121f-4f34-9853-e55d2739b978", + "savedPayload": { + "position": { + "x": 13135.222252113279, + "y": 26435.95333466609 + }, + "targetPosition": { + "x": 13425, + "y": 26358.307621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "4db2f276-f06f-4fd5-8041-e6172efdf3a5", + "savedPayload": { + "position": { + "x": 13425, + "y": 26358.307621135333 + }, + "targetPosition": { + "x": 13575, + "y": 26098.5 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "eef4e172-d7db-421d-8881-9ae4dc6bd35d", "savedPayload": { "position": { From ddf24dcc8723473140dd7990b2a22c10c7b01cb7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:18:48 +0200 Subject: [PATCH 20/28] Revert "Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed." This reverts commit 4f56770b566c47afb4338a8a8e40fef6921a9f77. --- Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json index 9d0159c15..974350330 100644 --- a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json +++ b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json @@ -250,7 +250,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 23fa8cd9326610247307732693d1c1ed530eec8e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:21:21 +0200 Subject: [PATCH 21/28] Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed. 2 --- Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json index 974350330..9d0159c15 100644 --- a/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json +++ b/Projects/Governance/Plugins/User-Profiles/MarinitaMarina.json @@ -250,7 +250,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 1ce7a69bbced80f55c398329f55c170e9dc28288 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:31:26 +0200 Subject: [PATCH 22/28] Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed.3 --- Client/httpInterface.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 2a92f8c29..c156dcf06 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1361,6 +1361,12 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE Validation #2: File Name must be the same to the Github Username of the PR owner. */ let fileContentUrl = pullRequestFile.raw_url + + if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') < 0) { + console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request it not a User Profile file. -> fileContentUrl = ' + fileContentUrl) + continue + } + let splittedURL = fileContentUrl.split('/') let fileName = splittedURL[splittedURL.length - 1] let splittedFileName = fileName.split('.') From ef859348fb2aa0f07cbb13fa791923850521acd5 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:33:25 +0200 Subject: [PATCH 23/28] Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed.4 --- Client/httpInterface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index c156dcf06..ebf8e9ea4 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1365,7 +1365,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') < 0) { console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request it not a User Profile file. -> fileContentUrl = ' + fileContentUrl) continue - } + } let splittedURL = fileContentUrl.split('/') let fileName = splittedURL[splittedURL.length - 1] From 3f13b84a79aef1eb10e0ae583ec5aea7dc4d89cf Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:35:08 +0200 Subject: [PATCH 24/28] Governance: Automatic Merging of PRs for User Profiles changes. Bug Fixed.5 --- .../Plugins/User-Profiles/Luis-Fernando-Molina.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 6a96f898c..245c7569a 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Luis-Fernando-Molina", - "config": "{\n \"tokens\": 10000000,\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\n \"s\": \"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\n \"signature\": \"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"\n },\n \"codeName\": \"Luis-Fernando-Molina\"\n}", + "config": "{\"tokens\":10000000,\"signature\":{\"message\":\"Luis-Fernando-Molina\",\"messageHash\":\"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\"v\":\"0x1b\",\"r\":\"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb0\",\"s\":\"0x42abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e3\",\"signature\":\"0x90293b042c180aa21b05f0356f31688c597be4ff2df136f63a2b8a899c658eb042abf909024d34217430e42ebadc96b7834218cc86a4c295a2ae419ff2fca6e31b\"},\"codeName\":\"Luis-Fernando-Molina\"}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", @@ -137,7 +137,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 From 998d630b4ba8da97edcab07abf7dfedf1397701e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:39:55 +0200 Subject: [PATCH 25/28] Governance: Test Contributing to Plugins Docs --- Client/httpInterface.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index ebf8e9ea4..78a4e6f16 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1341,7 +1341,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE 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... \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.' + 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) @@ -1365,7 +1365,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') < 0) { console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request it not a User Profile file. -> fileContentUrl = ' + fileContentUrl) continue - } + } let splittedURL = fileContentUrl.split('/') let fileName = splittedURL[splittedURL.length - 1] @@ -1375,7 +1375,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE if (githubUsername !== fileName) { console.log('[INFO] httpInterface -> Gov -> 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) - + await sleep(GITHUB_API_WAITING_TIME) await octokit.rest.issues.createComment({ owner: owner, @@ -1432,6 +1432,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE /* All validations passed, we will proceed an merge this Pull Request. */ + continue await sleep(GITHUB_API_WAITING_TIME) let mergeResponse = await octokit.rest.pulls.merge({ owner: owner, From 36e0d763f5d28937b08020b9e586b596c353227f Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:45:53 +0200 Subject: [PATCH 26/28] Governance: Bug Fixed on auto merging from other branches different to develop --- Client/httpInterface.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 78a4e6f16..a1ff41918 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1263,7 +1263,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE repo: repo, state: 'open', head: 'develop', - base: undefined, + base: 'develop', sort: undefined, direction: undefined, per_page: per_page, @@ -1432,7 +1432,6 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE /* All validations passed, we will proceed an merge this Pull Request. */ - continue await sleep(GITHUB_API_WAITING_TIME) let mergeResponse = await octokit.rest.pulls.merge({ owner: owner, From 256a412b7c7d1af8ce2ee2db03f8c1e1e993b3c4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:46:48 +0200 Subject: [PATCH 27/28] Governance: Bug Fixed on auto merging from other branches different to develop --- Client/httpInterface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index a1ff41918..e8a50a177 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1363,7 +1363,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let fileContentUrl = pullRequestFile.raw_url if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') < 0) { - console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request it not a User Profile file. -> fileContentUrl = ' + fileContentUrl) + console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request is not a User Profile file. -> fileContentUrl = ' + fileContentUrl) continue } From 6774e7b3591eb024bfe4b1a102ef43e0510c167e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:50:22 +0200 Subject: [PATCH 28/28] Governance: Bug Fixed on auto merging from other branches different to develop 2 --- Client/httpInterface.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index e8a50a177..2389e5f7e 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1363,6 +1363,9 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let fileContentUrl = pullRequestFile.raw_url if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') < 0) { + /* + If it is not a user profile then there is no need to auto merge. + */ console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the file modified at the Pull Request is not a User Profile file. -> fileContentUrl = ' + fileContentUrl) continue }