-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix **partial** 578 - Git integration #10422
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.
Small comments.
I strongly do advice you use JUnit for development, too.
IntelliJ offers a play button at each test case. Thus, debugging is very easy!
String gitPassword = ""; | ||
|
||
if (dialogService != null) { | ||
gitUsername = dialogService.showInputDialogAndWait(Localization.lang("Git credentials"), Localization.lang("git username")).get(); |
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.
Please check how JabRef handles proxy credentials. Username/password stored in preferences. You should do that, too,
@@ -243,6 +243,11 @@ private boolean save(Path targetPath, SaveDatabaseMode mode) { | |||
libraryTab.resetChangedProperties(); | |||
} | |||
dialogService.notify(Localization.lang("Library saved")); | |||
|
|||
if (success) { | |||
SaveGitDatabaseAction saveGit = new SaveGitDatabaseAction(targetPath.getParent(), dialogService); |
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.
Please commit and push the current file only. Nothing else!
build.gradle
Outdated
@@ -128,7 +128,7 @@ dependencies { | |||
// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635 | |||
implementation 'org.bouncycastle:bcprov-jdk18on:1.76' | |||
|
|||
implementation 'commons-cli:commons-cli:1.5.0' | |||
implementation ('commons-cli:commons-cli:1.5.0') |
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.
Please keep the style of the build.gradle file. --> no braces here.
String gitUsername = Optional.ofNullable(System.getenv("GIT_EMAIL")).orElse(""); | ||
String gitPassword = Optional.ofNullable(System.getenv("GIT_PW")).orElse(""); | ||
final CredentialsProvider credentialsProvider = new UsernamePasswordCredentialsProvider(gitUsername, gitPassword); |
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.
This change will break the SLR feature, doesn't it?
Maybe, you can also rely that a user provided username and password in the environment variables GIT_EMAIL
and GIT_PW
.
} | ||
} | ||
} | ||
|
||
/** | ||
* Get currently checked out branch. | ||
* If checking out fails, it fails silently. |
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.
I don't see any checkout call there. -- Maybe you mean something else? Maybe demonstrate using a @Test
?
Why did you close the PR? |
This PR implements koppor#578 |
A new PR was submitted --> #10586 |
This is a partial pull request just to track down the development progress and to any suggestions.
Here we want to outline:
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)