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
Add API to fetch repository status via uhub #21
Conversation
* @param {Driver} driver | ||
* @return {Promise<List<LocalFile>>} | ||
*/ | ||
LocalFileUtils.status = function status(repoState, driver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name it simply "LocalUtils" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing
* } | ||
* } | ||
* | ||
* @param {String} opts.message List of files with name and status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"commit message" ?
If it is optional, you can put it between brackets [opts.message]
or indicate it is (optional)
as for opts.author
for example.
* "message": "Commit message", | ||
* "files": [{ | ||
* "name": "README.md", | ||
* "status": "modified" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the status
has a meaning here ? Should it be removed ? (i would guess it is of no use here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is used indeed in uhub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so we should mention that status
is useful. And as long as there is no documentation for Uhub, it's good to have it written somewhere, like here.
Added -> File will be added and committed
Copied -> ?
Deleted -> File will be removed
Modified -> Modification will be committed
Renamed -> ?
Unmodified -> Nothing
Untracked -> File will be added and committed
@@ -21,3 +21,23 @@ LocalFileUtils.status = function status(repoState, driver) { | |||
branch: branch | |||
}); | |||
}; | |||
|
|||
/** | |||
* Perform a git status on a given repository branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring needs to be updated
Hi!
This PR introduces new APIs to the driver, a new utility called
LocalFileUtils
and a new modelLocalFile
.It also update the uhub version we are using in tests to match 2.5.1 which includes the needed API to fetch the repository status.