From 53b960b54673be99bec1566ca0d669d14b552e6c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 7 Aug 2021 13:57:18 +0200 Subject: [PATCH] Governance Bug Fixed gov.prs command --- Client/httpInterface.js | 13 ++++++------- .../UI/Spaces/Reports-Space/ReportsSpace.js | 9 +++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 0abf1ffa5..ac7638269 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1238,9 +1238,9 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE async function doGithub() { try { - + const repo = repository + const owner = 'Superalgos' const { Octokit } = require("@octokit/rest") - const octokit = new Octokit({ auth: token, userAgent: 'Superalgos Beta 11' @@ -1249,8 +1249,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE await mergePrs() async function getPrList() { - const repo = repository - const owner = 'Superalgos' + const per_page = 100 // Max let page = 0 let lastPage = false @@ -1258,7 +1257,7 @@ 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) + console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Requesting Page = ' + page) await sleep(GITHUB_API_WAITING_TIME) let listResponse = await octokit.rest.pulls.list({ @@ -1276,13 +1275,13 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE if (listResponse.data.length < 100) { lastPage = true } - console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Receiving Page = ' + page) + console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Receiving Page = ' + page) for (let i = 0; i < listResponse.data.length; i++) { let pullRequest = listResponse.data[i] console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Pull Request "' + pullRequest.title + '" found and added to the list to validate. ') githubPrListArray.push(pullRequest) } - console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Received = ' + listResponse.data.length) + console.log('[INFO] httpInterface -> Gov -> mergeGithubPullRequests -> doGithub -> getPrList -> Received = ' + listResponse.data.length) } catch (err) { console.log(err) diff --git a/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js b/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js index 3487a3c57..5790330d2 100644 --- a/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js +++ b/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js @@ -231,6 +231,15 @@ function newGobernanceReportsSpace() { 'width: ' + thisObject.container.frame.width + 'px;' + 'height: ' + thisObject.container.frame.height + 'px' } + + /* + Monitor the Docs Space to see if its tab is opened, to close this space tab. + */ + if (UI.projects.education.spaces.docsSpace.sidePanelTab.isOpen === true && + thisObject.sidePanelTab.isOpen === true + ) { + thisObject.sidePanelTab.close() + } } function getContainer(point, purpose) {