From c990670bbbfafa1cdb27eaf0b38cda8c9c0ddb95 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 18:05:29 +0200 Subject: [PATCH 1/8] 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 2/8] 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 3/8] 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 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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]