Skip to content
Permalink
Browse files
merge-bot: use correct credentials for listing PRs
Reviewed-by: rwestberg
  • Loading branch information
edvbld committed Feb 7, 2020
1 parent c3359ef commit 099d7153ada0bd6a8cc4969dbe3e801d52243d29
Showing with 5 additions and 5 deletions.
  1. +5 −5 bots/merge/src/main/java/org/openjdk/skara/bots/merge/MergeBot.java
@@ -251,8 +251,11 @@ public void run(Path scratchPath) {
// Must fetch once to update refs/heads
repo.fetchAll();

var prs = target.pullRequests();
var currentUser = target.forge().currentUser();
var prTarget = fork.forge().repository(target.name()).orElseThrow(() ->
new IllegalStateException("Can't get well-known repository " + target.name())
);
var prs = prTarget.pullRequests();
var currentUser = prTarget.forge().currentUser();

for (var spec : specs) {
var toBranch = spec.toBranch();
@@ -441,9 +444,6 @@ public void run(Path scratchPath) {
message.add("");
message.add("This pull request will be closed automatically by a bot once " +
"the merge conflicts have been resolved.");
var prTarget = fork.forge().repository(target.name()).orElseThrow(() ->
new IllegalStateException("Can't get well-known repository " + target.name())
);
fork.createPullRequest(prTarget,
toBranch.name(),
branchDesc,

0 comments on commit 099d715

Please sign in to comment.