UserProfileViaGithubApiv2 Tentacule23

This commit is contained in:
Tentacule23 committed 2021-10-25 23:18:19 -04:00
1 parent 99dd678173
commit a9641e3f54
2 files changed
+4 -6

No files matched your search

+3 -5
View File
@@ -979,7 +979,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
async function getSHA(path, octokit) {
let sha = ''
try{
const result = await octokit.repos.getContent({
owner: username,
@@ -987,13 +987,12 @@ exports.newHttpInterface = function newHttpInterface() {
path,
ref: currentBranch
});
const sha = result?.data?.sha
sha = result?.data?.sha
return sha
} catch (err) {
if (err.message = 'Not Found') {
if (err.message === 'Not Found') {
console.log("[User Not Found] -> Creating new user")
const sha = ''
return sha
} else {
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> Method call produced an error.')
@@ -1004,7 +1003,6 @@ exports.newHttpInterface = function newHttpInterface() {
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token ends with = ' + '...' + token.substring(token.length - 10))
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> currentBranch = ' + currentBranch)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> contributionsBranch = ' + contributionsBranch)
const sha = ''
return sha
}
}
@@ -108,7 +108,7 @@ function newFoundationsDocsCommmandInterface() {
/* Set up the commit message */
let message = UI.projects.education.spaces.docsSpace.commandInterface.command.trim().substring(UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.education.spaces.docsSpace.commandInterface.command.length)
if (message.toLowerCase() === 'app.UserUpdate') {
if (message.toLowerCase() === 'app.userupdate') {
message = 'This is my UserUpdate to Superalgos'
}