Skip to content

Commit eaf231f

Browse files
committed
Fixed pull request target branch name issue
1 parent 2960dd4 commit eaf231f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ static async Task<int> Main(string[] args)
4848

4949
foreach (PullRequest pr in pull_requests)
5050
{
51-
if(pr.State.Value == ItemState.Open && pr.Labels.Any(label => label.Name == pr_label_name) && pr.Base.Ref == current_repo_head_name)
51+
if(pr.State.Value == ItemState.Open && pr.Labels.Any(label => label.Name == pr_label_name) && pr.Base.Ref == current_branch_name)
5252
{
5353
Console.WriteLine($"Triggering rebase workflow for Pull Request #{pr.Number}");
5454

55-
DispatchPostBody request_data = new DispatchPostBody(pr.Base.Ref, new DispatchInputs(pr.Number.ToString()));
55+
DispatchPostBody request_data = new DispatchPostBody(current_branch_name, new DispatchInputs(pr.Number.ToString()));
5656

5757
byte[] request_bytes = JsonSerializer.SerializeToUtf8Bytes<DispatchPostBody>(request_data);
5858

0 commit comments

Comments
 (0)