Skip to content

Add PR filtration by source branch#15355

Merged
mmitche merged 1 commit intodotnet:mainfrom
f-alizada:dev/falizada/filter-by-source-branch
Dec 19, 2024
Merged

Add PR filtration by source branch#15355
mmitche merged 1 commit intodotnet:mainfrom
f-alizada:dev/falizada/filter-by-source-branch

Conversation

@f-alizada
Copy link
Copy Markdown
Contributor

Fixes #15352
Add additional filter for fetching already existing PRs.

Context

Current filtration:
https://github.com/dotnet/arcade/blob/110ba755f2b00749b230e7f61c791f90047e170b/.github/workflows/scripts/inter-branch-merge.ps1#L158C5-L177C1

Includes every PR which is open to the destination branch and limits the results by 100. (The limit is the maximum allowed by api)
So in dotnet/sdk#45547 the logic didn't find the existing PR and force-pushed to the branch. (Force push happens if there are no open PRs and we can safely override the code, but it should not be the case with open PR )

What is changed

Adding filtration to the query (headRefName, the source branch name from where the PR is created) leaving the PR results only the list with specified branch .

The rest of the logic does not change.
Ownership of the branch will be still verified:
https://github.com/dotnet/arcade/blob/110ba755f2b00749b230e7f61c791f90047e170b/.github/workflows/scripts/inter-branch-merge.ps1#L193C4-L195C26

@f-alizada f-alizada requested a review from mmitche December 19, 2024 19:22
@f-alizada f-alizada self-assigned this Dec 19, 2024
@mmitche mmitche merged commit 8911092 into dotnet:main Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The inter branch merge flow in sdk repo force-pushes the changes

2 participants