Skip to content

Commit

Permalink
Add pull request creation link
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro committed Mar 7, 2025
1 parent e1a3a8e commit 0a58b92
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,15 @@ private void createPullRequest(Map<PullRequestInfo, Object> info) {
InteractiveTaskUtils.printUserInfo("Committing changes");
invokeCommand("git", List.of("commit", "-m", "Add metadata for " + coordinates), "Cannot commit changes", null);

// InteractiveTaskUtils.printUserInfo("Pushing changes");
// String output = invokeCommand("git push origin " + branch, "Cannot push to origin");
//
// List<String> outputLines = List.of(output.split("\n"));
// for (var line : outputLines) {
//
// }
InteractiveTaskUtils.printUserInfo("Pushing changes");
String output = invokeCommand("git push origin " + branch, "Cannot push to origin");

String pullRequestCreateLink = "https://github.com/oracle/graalvm-reachability-metadata/pull/new/" + branch;
if (!output.contains(pullRequestCreateLink)) {
throw new RuntimeException("Cannot find link for pull request creation");
}

InteractiveTaskUtils.printUserInfo("Complete generating your pull request on GitHub: " + pullRequestCreateLink);
}

private void writeToFile(Path path, String content, StandardOpenOption writeOption) throws IOException {
Expand Down

0 comments on commit 0a58b92

Please sign in to comment.