Merge pull request #1500 from Luis-Fernando-Molina/develop

Contribution: Governance Bug Fixed without Github Credentials
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-08-21 09:40:32 -04:00
commit 93ad473a7d
1 file changed
+26 -26
@@ -40,32 +40,6 @@ function newGovernanceUserProfileSpace() {
let resultsArary = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile')
if (resultsArary.length === 0) { return }
/* Find the Username and Password */
let apisNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs')
if (apisNode === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
if (apisNode.githubAPI === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
let config = JSON.parse(apisNode.githubAPI.config)
if (config.username === undefined || config.username === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
if (config.token === undefined || config.token === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
/*
Here we will setup the Reputation for each profile.
*/
@@ -104,6 +78,32 @@ function newGovernanceUserProfileSpace() {
waitingForResponses--
});
}
/* Find the Github Username and Token in order to activate the Github Program */
let apisNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs')
if (apisNode === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
if (apisNode.githubAPI === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
let config = JSON.parse(apisNode.githubAPI.config)
if (config.username === undefined || config.username === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
if (config.token === undefined || config.token === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
UI.projects.education.spaces.docsSpace.sidePanelTab.open()
return
}
/*
Here we will help setup the Github Programs...
*/