-
Notifications
You must be signed in to change notification settings - Fork 9
ci(connectors-ddl): deliver drift as a stacked regen PR; retire the reminder #2133
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
Does GitHub retarget or close a pull request when its base branch is deleted after a merge?💡 Result:
No, GitHub does not automatically retarget (update the base branch of) an open pull request if its base branch is deleted [1][2]. Instead, if a pull request's base branch is deleted, the pull request is typically closed automatically [2]. It is important to distinguish this behavior from GitHub's automatic retargeting of "dependent" pull requests [1]: 1. Automatic Retargeting of Dependent Pull Requests: When a pull request is merged and its head branch is deleted, GitHub automatically checks for other open pull requests in the same repository that used that now-deleted branch as their base [3][4]. If it finds any, GitHub automatically updates their base branch to the merged pull request's new base branch [3][4]. This is a specific feature designed to maintain dependency chains [1][4]. 2. Deletion of a Base Branch: If you manually delete a branch that is currently serving as the base for an open pull request (not necessarily a head branch that was just merged), GitHub does not attempt to "guess" a new base and retarget the pull request [2]. Because the pull request no longer has a valid target branch, it is automatically closed [2]. If you find yourself in a situation where a pull request has been closed due to its base branch being deleted, you can restore the base branch, update the pull request's base to a different, active branch, and then re-open the pull request [2].
Citations:
gh pr merge --delete-branch: GitHub does not update base of dependent PRs cli/cli#1168🌐 Web query:
GitHub docs dependent pull requests automatically base updated when head branch merged deleted💡 Result:
Yes, when a pull request is merged and its head branch is deleted, GitHub automatically updates any open pull requests in the same repository that were using that deleted branch as their base [1]. In such cases, GitHub re-targets those dependent pull requests to the merged pull request's base branch [1]. This behavior occurs automatically when the deletion is performed via the GitHub website (for example, using the "Delete branch" button after merging) or if the repository is configured to automatically delete head branches upon merge [1][2]. However, there are important limitations and nuances to this process: 1. CLI and API behavior: If the branch is deleted via the Git command line or certain API methods (like manually calling a delete reference endpoint) rather than through GitHub's standard merge/delete UI, GitHub may close the dependent pull requests instead of re-targeting their base branch [3][2]. 2. Stacked Pull Requests: GitHub now has native support for stacked pull requests [4][5]. In a stack, when a middle pull request is merged, the pull requests above it are automatically updated and re-targeted to the stack's base branch [4]. 3. Manual intervention: If a dependent pull request is not automatically updated, you can manually change its base branch through the GitHub interface by selecting "Edit" next to the pull request title [6]. In summary, GitHub's automated base branch update is designed to keep dependent workflows intact when branches are removed during standard repository cleanup, provided the deletion is handled through GitHub's native tools [1][2].
Citations:
gh pr merge --delete-branch: GitHub does not update base of dependent PRs cli/cli#1168🌐 Web query:
GitHub dependent pull requests base branch automatically updated documentation💡 Result:
GitHub does not have a native feature that automatically updates standard pull request branches with changes from the base branch on a continuous, background basis [1][2]. While GitHub provides tools to manage synchronization, the action remains manual or triggered by specific workflow configurations [1][3]. Key mechanisms for keeping pull requests up to date include: 1. Manual Updates via UI: On a pull request page, if the branch is out of sync and there are no merge conflicts, users can click the Update branch button [1][2]. This performs either a traditional merge (merging the base branch into the head branch) or a rebase, depending on the user's choice [1][4]. 2. Repository Settings: Administrators can enable the Always suggest updating pull request branches setting [3][5]. When enabled, this ensures the Update branch button is always available on the pull request page whenever the branch is behind, rather than only when required by branch protection rules [3][5]. 3. Specialized Handling for Dependabot: Dependabot attempts to automatically rebase its pull requests when they become out of date, though this is a best-effort behavior and not guaranteed to be instantaneous [6][7]. 4. Stacked (Dependent) Pull Requests: GitHub now supports stacked pull requests [8]. When you merge a pull request at the bottom of a stack, the remaining branches are automatically rebased so that they target the updated base branch [8]. 5. Automated Workflows: For general pull requests, teams often implement custom automation—such as GitHub Actions—to automatically update or "retarget" pull request branches when the base branch changes [9]. This is commonly done using the GitHub REST API (specifically
pulls.updateBranch) to perform an automatic update [10]. In summary, GitHub provides the interface to request an update but relies on manual user action, explicit repository settings, or custom automation to perform the synchronization for standard pull requests [1][3][9].Citations:
Remove the “Closes automatically” statement from the regenerated PR body.
When
${HEAD_REF}is deleted after the original PR merges, GitHub does not close the stacked regen PR because its base branch now points at a deleted branch. Update the text to describe that the regenerated PR may remain open and needs to be updated against the new base, or verify the repository’s stacked PR/base-branch behavior before relying on GitHub actions.🤖 Prompt for AI Agents