feat(dev-infra): create tool to determine conflicts created by a PR (#37051)
Creates a tool in ng-dev to determine the PRs which become conflicted by merging a specified PR. Often the question is brought up of how many PRs require a rebase as a result of a change. This script allows to determine this impact. PR Close #37051
This commit is contained in:

committed by
Kara Erickson

parent
55c2433171
commit
3d7c85b2aa
20
dev-infra/utils/git.ts
Normal file
20
dev-infra/utils/git.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {exec} from '../utils/shelljs';
|
||||
|
||||
|
||||
/** Whether the repo has any local changes. */
|
||||
export function hasLocalChanges() {
|
||||
return !!exec(`git status --porcelain`).trim();
|
||||
}
|
||||
|
||||
/** Get the currently checked out branch. */
|
||||
export function getCurrentBranch() {
|
||||
return exec(`git symbolic-ref --short HEAD`).trim();
|
||||
}
|
Reference in New Issue
Block a user