File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
bots/merge/src/main/java/org/openjdk/skara/bots/merge Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,11 @@ public void run(Path scratchPath) {
251
251
// Must fetch once to update refs/heads
252
252
repo .fetchAll ();
253
253
254
- var prs = target .pullRequests ();
255
- var currentUser = target .forge ().currentUser ();
254
+ var prTarget = fork .forge ().repository (target .name ()).orElseThrow (() ->
255
+ new IllegalStateException ("Can't get well-known repository " + target .name ())
256
+ );
257
+ var prs = prTarget .pullRequests ();
258
+ var currentUser = prTarget .forge ().currentUser ();
256
259
257
260
for (var spec : specs ) {
258
261
var toBranch = spec .toBranch ();
@@ -441,9 +444,6 @@ public void run(Path scratchPath) {
441
444
message .add ("" );
442
445
message .add ("This pull request will be closed automatically by a bot once " +
443
446
"the merge conflicts have been resolved." );
444
- var prTarget = fork .forge ().repository (target .name ()).orElseThrow (() ->
445
- new IllegalStateException ("Can't get well-known repository " + target .name ())
446
- );
447
447
fork .createPullRequest (prTarget ,
448
448
toBranch .name (),
449
449
branchDesc ,
You can’t perform that action at this time.
0 commit comments