Skip to content

Commit

Permalink
2210: Use authenticatedUrl instead of webUrl in MergeBot
Browse files Browse the repository at this point in the history
Reviewed-by: erikj
  • Loading branch information
zhaosongzs committed Mar 25, 2024
1 parent 42bfbed commit 7fbecfa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -491,9 +491,7 @@ public Collection<WorkItem> run(Path scratchPath) {
var status = repo.status();
repo.abortMerge();

var fromRepoName = Path.of(fromRepo.webUrl().getPath()).getFileName();

var numBranchesInFork = repo.remoteBranches(fork.webUrl().toString()).size();
var numBranchesInFork = repo.remoteBranches(fork.authenticatedUrl().toString()).size();
var branchDesc = Integer.toString(numBranchesInFork + 1);
repo.push(fetchHead, fork.authenticatedUrl(), branchDesc);

Expand Down

1 comment on commit 7fbecfa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.