Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .jbang/CheckoutPR.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
////usr/bin/env jbang "$0" "$@" ; exit $?

import java.io.File;
import java.util.List;
import java.util.Optional;
Expand All @@ -15,8 +17,6 @@
import org.kohsuke.github.GitHubBuilder;
import org.kohsuke.github.PagedIterator;

///usr/bin/env jbang "$0" "$@" ; exit $?

//JAVA 21+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

Expand Down Expand Up @@ -62,7 +62,7 @@ public static void main(String[] args) throws Exception {
while (prIterator.hasNext()) {
pr = prIterator.next();
if ((contributor.isEmpty() || pr.getHead().getUser().getLogin().equals(contributor)) &&
pr.getHead().getRef().equals(branchName)) {
pr.getHead().getRef().equals(branchName)) {
found = true;
System.out.println("Found pull request #" + pr.getNumber());
break;
Expand Down Expand Up @@ -165,9 +165,9 @@ private static void checkoutUpstreamMain() throws Exception {
// Check if a remote pointing to JabRef/jabref already exists
List<RemoteConfig> remotes = git.remoteList().call();
Optional<RemoteConfig> jabrefRemote = remotes.stream()
// We use "contains", because there could be SSH remote URLs
.filter(r -> r.getURIs().stream().anyMatch(uri -> uri.toString().contains("JabRef/jabref")))
.findFirst();
// We use "contains", because there could be SSH remote URLs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Eclipse did this I was hit by Olly and others to revert this...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koppor does this need revert?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - when touching the code, we can move remotes.stream() to the next line to have the dots properly aligned.

.filter(r -> r.getURIs().stream().anyMatch(uri -> uri.toString().contains("JabRef/jabref")))
.findFirst();

String remoteToUse;
if (jabrefRemote.isPresent()) {
Expand All @@ -176,9 +176,9 @@ private static void checkoutUpstreamMain() throws Exception {
} else {
System.out.println("Adding remote 'upstream' pointing to " + jabrefRepoUrl);
git.remoteAdd()
.setName(upstreamName)
.setUri(new URIish(jabrefRepoUrl))
.call();
.setName(upstreamName)
.setUri(new URIish(jabrefRepoUrl))
.call();
remoteToUse = upstreamName;
}

Expand Down
4 changes: 2 additions & 2 deletions .jbang/CloneJabRef.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
///usr/bin/env jbang "$0" "$@" ; exit $?

import java.nio.file.Files;
import java.nio.file.Path;

///usr/bin/env jbang "$0" "$@" ; exit $?

//JAVA 21+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

Expand Down
Empty file modified .jbang/JabKitLauncher.java
100644 → 100755
Empty file.
Empty file modified .jbang/JabLsLauncher.java
100644 → 100755
Empty file.
Empty file modified .jbang/JabSrvLauncher.java
100644 → 100755
Empty file.
Loading