-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify Arduino libraries in Github repos' subfolders and more.. (no-html-encode) #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changed url validation in template Moved owner & repo identification to the backend
- The parsing of the Github url (owner/repo/folder) was moved to the backend and is now prformed by processGithubUrl function - The onwer & repo names are returned to the frontend after the pre-processing, along with the header names found in the repo
…would it be hardcoded to empty string?)
- Can now fetch a the list with the blobs and trees that belong to a provided folder. - Removed some unncessary else statements - Fixed brackets
- Use Github's tree API in order to get the complete list of the files under a provided repo or a repo directory - Include only blobs to the returned filelist - Does not work in current state (WIP)
Made the backend of the library manager capable of doing the following: - Fetch the whole tree structure of a Github repo using Github's tree API - Return the directory structure in a way that is understandable by the jsTree jQuery plugin (used by the frontend) - Provide useful metadata such as in-repo full path and sha hash for every node of the returned tree (will make directory selection easier) Also renamed some functions and removed some unused ones.
This reverts commit b6cda83.
…the jsTree structure
…one pointed by the url
…sitory's description
Updated the method that handles the response with the contents of the JStree: - Used early-return if's - Moved the code that updates the tree to a dedicated method.
…when fetching last commit
In some cases there are no route parameters in the request and this should be handled in the AuthListener of the application, otherwise an exception will be raised
…anager-updates-no-html-encode
Reviewed, all ok. |
fpapadopou
added a commit
that referenced
this pull request
Nov 30, 2015
…ml-encode Identify Arduino libraries in Github repos' subfolders and several updates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ChangeLog
ExternalLibrary
Doctrine entity. These are the branch, inRepoPath, sourceUrl and notes properties. That is, adoctrine:schema:update
will definitely be needed on the production server.Note for the author: Double check no other Entity properties will be affected before running the schema update
getLastCommit
functionality fetch the last commit, depending on the selected repo branch and subfolder (if any).Made all returned text files HTML encoded (usinghtmlspecialchars
), which should fix any issues with libraries containing HTML docs, and other such files that could break the JSON encoding.BC Break
ThefixedcheckGithubUpdates
method was not designed to work in this context (with more specific information about Github libraries), thus it will not return correct results, if it returns any. In fact, this method, is that it is unused and needed to be re-written.Merge process
composer.lock
filebuiltin_libraries
andexternal_libraries
. These two should point at the correct directories which contain the actual libraries files. Watch out for permissions issuesFor further investigation
Due to recursive calls to Github's API, adding a library from Github can take a long time. However, it's a pretty safe way of fetching code from Github. An example is UTFT library from (here)[https://github.com/mysensors/Arduino/tree/development/libraries/UTFT], which takes about 5 mins to get fetched on a local environment. Things could better though on an AWS server.
QA
Notes coming up