-
Notifications
You must be signed in to change notification settings - Fork 70
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
Closes #894 - Enhance the endpoint to list files with the possibility to specify a version #905
Conversation
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.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @fylip97)
a discussion (no related file):
Please add some unit or integration tests where you add some files and then fetch the latest and a specific version to verify your code.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/file/FileManager.java, line 86 at r1 (raw file):
/** * Returns the commit with the given id.
Can you format the file. It should add an empty line after this one.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 28 at r1 (raw file):
if(commitId == null){ return fileManager.getWorkingDirectory().listConfigurationFiles(path); }else if(commitId.equals("live")){
Please format the file.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 32 at r1 (raw file):
} else{ return fileManager.getCommitWithId(commitId).listConfigurationFiles(path);
Imo it is easier to read and more maintainable when you store the access object in a local variable and use this for listing the files instead of writing the action multiple times.
RevisionAccess revision;
if ( ... ) {
revision = ....;
} else {
revision = ....;
}
revision.listConfiguratuinFiles(path);
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.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @fylip97)
a discussion (no related file):
The DirectoryControllerTest
is not working anymore.
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.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @mariusoe)
a discussion (no related file):
Previously, mariusoe (Marius Oehler) wrote…
Please add some unit or integration tests where you add some files and then fetch the latest and a specific version to verify your code.
Done.
a discussion (no related file):
Previously, mariusoe (Marius Oehler) wrote…
The
DirectoryControllerTest
is not working anymore.
Done.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/file/FileManager.java, line 86 at r1 (raw file):
Previously, mariusoe (Marius Oehler) wrote…
Can you format the file. It should add an empty line after this one.
Done.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 28 at r1 (raw file):
Previously, mariusoe (Marius Oehler) wrote…
Please format the file.
Done.
components/inspectit-ocelot-configurationserver/src/main/java/rocks/inspectit/ocelot/rest/file/DirectoryController.java, line 32 at r1 (raw file):
Previously, mariusoe (Marius Oehler) wrote…
Imo it is easier to read and more maintainable when you store the access object in a local variable and use this for listing the files instead of writing the action multiple times.
RevisionAccess revision; if ( ... ) { revision = ....; } else { revision = ....; } revision.listConfiguratuinFiles(path);
Done.
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.
Reviewed 4 of 4 files at r2, 4 of 4 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @mariusoe)
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.
Reviewable status: complete! all files reviewed, all discussions resolved
This change is