Skip to content

Avoid unnecessary localization branch rebases - #64910

Open
Jake Bailey (jakebailey) wants to merge 2 commits into
microsoft:mainfrom
jakebailey:better-loc-prs
Open

Jake Bailey (jakebailey) wants to merge 2 commits into
microsoft:mainfrom
jakebailey:better-loc-prs

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Daily localization updates were rewriting the bot branch whenever main advanced, even when the localization files had not changed. This adds unrelated commits to force-pushes and creates unnecessary review churn.

Fix that by being a bit more clever.

Daily localization updates were rewriting the bot branch whenever main
advanced, even when the localization files had not changed. This adds
unrelated commits to force-pushes and creates unnecessary review churn.
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:34
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 21, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

History reconstruction and force-push behavior need automated scenario coverage and human validation.

1 open issue
What changed in this PR

Reduces localization review churn by preserving the existing PR base when safe instead of rebasing whenever main advances.

Changes:

  • Adds merge-tree checks to preserve history, with fallback to the generated commit.
  • Updates the pipeline to fetch full history and push the selected commit with an explicit lease.
File Description
tools/​scripts/​preserve-localization-base.mjs Selects a history-preserving localization commit when safe.
tools/​pipelines/​localization-update.yml Integrates commit selection and explicit push protection.

Review effort: Balanced

Comment on lines +13 to +17
function prepareUpdate() {
const generated = git("rev-parse", "HEAD");
const main = git("rev-parse", `${generated}^`);
const previousHead = git("rev-parse", "--verify", `${previous}^{commit}`);
const base = git("merge-base", main, previousHead);

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

2 participants