Skip to content
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

merge-bot: use correct credentials for listing PRs #410

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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,