diff --git a/Client/test.js b/Client/test.js deleted file mode 100644 index 36fefed10..000000000 --- a/Client/test.js +++ /dev/null @@ -1,69 +0,0 @@ -//const commitMessage = unescape(requestParameters[3]) -const commitMessage = 'My Message' - -contribute() - -async function contribute() { - await doGit() - await doGithub() - console.log('Finished') -} - -async function doGit() { - const simpleGit = require('simple-git'); - const options = { - baseDir: process.cwd(), - binary: 'git', - maxConcurrentProcesses: 6, - } - const git = simpleGit(options) - - await git.add('./*') - await git.commit(commitMessage) - await git.push('origin', 'in-app-documentation') -} - -async function doGithub() { - - const token = "" - const { Octokit } = require("@octokit/rest") - - const octokit = new Octokit({ - auth: token, - userAgent: 'Superalgos Beta 8' - }) - - const repo = 'Superalgos' - const owner = 'Superalgos' - const head = 'Luis-Fernando-Molina:in-app-documentation' - const base = 'in-app-documentation' - const title = 'My Contribution to Superalgos' - - await octokit.pulls.create({ - owner, - repo, - title, - head, - base, - }); -} - - - - -async function gitTest() { - const simpleGit = require('simple-git'); - const options = { - baseDir: process.cwd(), - binary: 'git', - maxConcurrentProcesses: 6, - } - const git = simpleGit(options) - - let remotes = await git.getRemotes(true) - - - - console.log('JSON remotes list: ', JSON.stringify(remotes)) - console.log('remotes list: ', remotes) -} diff --git a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute.json b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute-command.json similarity index 82% rename from Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute.json rename to Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute-command.json index 03c361758..e60df3651 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-001-app-contribute-command.json @@ -1,7 +1,7 @@ { "topic": "App Commands", "pageNumber": "1", - "type": "App Contribute", + "type": "App Contribute Command", "definition": { "text": "This command allows you to contribute the changes you have made to the Docs, code, plugins, etc. to the Superalgos main repository so that all other users can enjoy those contributions once they update their installation.", "updated": 1609943282530 @@ -65,13 +65,19 @@ "text": "github.createPullRequest: It will create a Pull Request at the Superalgos/Superalgos repository, or it will add the commit to an already open Pull Request.", "updated": 1609944217509 }, + { + "style": "Block", + "text": "Block Authentication", + "updated": 1609945385299 + }, { "style": "Title", "text": "Authentication" }, { "style": "Text", - "text": "In order for this command to run, two things need to happen:" + "text": "In order for the App Contribute Command to run, two things need to happen:", + "updated": 1609945880855 }, { "style": "List", @@ -108,6 +114,24 @@ "text": "{\n \"username\": \"\",\n \"token\": \"\"\n}", "updated": 1609944956313 }, + { + "style": "Text", + "text": "If you can't find the node it is because it is not there. We only include it at the Getting Started Workspace. Don't worry you can create it. Just do this:", + "updated": 1609946259572 + }, + { + "style": "List", + "text": "Superalgos Project: Find this node." + }, + { + "style": "List", + "text": "Other Hierarchies: You can use this to create the APIs node.", + "updated": 1609946284646 + }, + { + "style": "List", + "text": "APIs: Use it to creat Github API" + }, { "style": "Subtitle", "text": "Properties" diff --git a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json index 958c6ee9a..5688aad8e 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json @@ -3,8 +3,8 @@ "pageNumber": "2", "type": "App Error Github Credentials Missing", "definition": { - "text": "In order to manage contributions from within the app, you first need to provide your Github.com credentials so that we can get authenticated when pushing your changes to the remote repository. 6", - "updated": 1609940654049 + "text": "In order to manage contributions from within the app, you first need to provide your Github.com credentials so that we can get you authenticated when pushing your changes to the remote repository.", + "updated": 1609945324462 }, "paragraphs": [ { @@ -18,53 +18,13 @@ }, { "style": "Text", - "text": "At the root folder of Superalgos, you will need to create a JSON file called Github.json. Use simple text editor like notepad and configure there your Github credentials. You can copy and paste the following template, replacing the dummy strings with your actual user name and password.", - "updated": 1609856366366 + "text": "To solve this issue follow the following instructions on how to set up your GitHub.com credentials so that the system can automate the tasks needed to submit your contributions to the main repository of the Superalgos project.", + "updated": 1609945787577 }, { - "style": "Title", - "text": "Github File Template", - "updated": 1609856386094 - }, - { - "style": "Javascript", - "text": "{\n \"user\": \"Your Github.com Username\",\n \"password\": \"Your Github.com Password\"\n \"repository\": \"\"\n }", - "updated": 1609857106444 - }, - { - "style": "Title", - "text": "Properties", - "updated": 1609857199167 - }, - { - "style": "List", - "text": "user: Your Github.com Username." - }, - { - "style": "List", - "text": "parrword: Your Github.com Password." - }, - { - "style": "List", - "text": "repository: The URL of your Superalgos fork." - }, - { - "style": "Title", - "text": "Example" - }, - { - "style": "Javascript", - "text": "{\n \"user\": \"john-smith\",\n \"password\": \"john123$\"\n \"repository\": \"github.com/john-smith/Superalgos\"\n }", - "updated": 1609857447825 - }, - { - "style": "Note", - "text": "Don't worry, your crendentials will not be uploaded to the repository because the file Github.json is listed at the .gitignore file, so it will be ignored and will only be at your local computer." - }, - { - "style": "Important", - "text": "The system will use your credentials only to execute a git push command pointing to your Superalgos repository fork, in order to upload all the changes you made to Docs Pages.", - "updated": 1609856824492 + "style": "Include", + "text": "Superalgos->Topic->App Contribute Command->Block Authentication", + "updated": 1609945833844 } ] } \ No newline at end of file