Skip to content
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

feat(onboarding): merge onboardingBranch into baseBranch #20893

Merged
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a0ba81b
merge onboarding in base
RahulGautamSingh Mar 13, 2023
aed5680
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Mar 13, 2023
c596f23
add conflict-check
RahulGautamSingh Mar 13, 2023
66b6a16
remove checkoutBranch
RahulGautamSingh Mar 13, 2023
b73a5fc
do not enforece ff
RahulGautamSingh Mar 13, 2023
f66d7b7
ensure comment if conflicted
RahulGautamSingh Mar 13, 2023
699b065
move ensureComment before merging
RahulGautamSingh Mar 13, 2023
c9d6585
add tests
RahulGautamSingh Mar 13, 2023
6a6d2e9
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Mar 13, 2023
1af85ba
Apply suggestions from code review
RahulGautamSingh Mar 14, 2023
fd817db
remove automatic rebasing
RahulGautamSingh Mar 14, 2023
d7828ef
skip pr-update when conflicted
RahulGautamSingh Mar 14, 2023
cd2576d
update test
RahulGautamSingh Mar 14, 2023
94e171d
move conflict-comment in ensureOnboardingPr()
RahulGautamSingh Mar 14, 2023
597e979
coverage + remove comment
RahulGautamSingh Mar 14, 2023
826c763
Update lib/workers/repository/onboarding/pr/index.ts
rarkins Mar 15, 2023
77471fd
Update lib/util/git/index.ts
RahulGautamSingh Mar 15, 2023
aaa386a
do not notify when modified
RahulGautamSingh Mar 18, 2023
c1bef4e
Merge branch 'feat/merge-onboarding-into-base' of https://github.com/…
RahulGautamSingh Mar 18, 2023
fe8afd6
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Mar 18, 2023
9f70e5c
add test
RahulGautamSingh Mar 18, 2023
80ac8ab
Merge branch 'feat/merge-onboarding-into-base' of https://github.com/…
RahulGautamSingh Mar 18, 2023
1bbcbfb
add new test
RahulGautamSingh Mar 18, 2023
0926dff
Merge branch 'main' into feat/merge-onboarding-into-base
rarkins Mar 27, 2023
05ddfac
invalidate cachedExtract when onboardingBranch is modified
RahulGautamSingh Mar 27, 2023
85f0bde
refactor code
RahulGautamSingh Mar 28, 2023
f04590a
add and update tests
RahulGautamSingh Mar 28, 2023
3a3c0b6
renamed onboardingSha -> onboardingBranchSha
RahulGautamSingh Mar 28, 2023
50738ee
move logic to onboarding/index
RahulGautamSingh Mar 28, 2023
9f40ad8
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Mar 28, 2023
4cfaf3e
update tests
RahulGautamSingh Mar 28, 2023
b1aee87
add tests
RahulGautamSingh Mar 28, 2023
8f5e33c
revert extra changes
RahulGautamSingh Mar 28, 2023
58dcf0f
refactor
RahulGautamSingh Mar 28, 2023
0b19099
Apply suggestions from code review
RahulGautamSingh Mar 28, 2023
35d9e7d
apply suggestions
RahulGautamSingh Mar 28, 2023
30b4828
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 8, 2023
1f78d66
cache onboarding modified and conflicted states
RahulGautamSingh Apr 8, 2023
f0cf351
update tests
RahulGautamSingh Apr 8, 2023
e618ed4
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 8, 2023
80830da
apply suggestions
RahulGautamSingh Apr 11, 2023
6378d10
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 11, 2023
5a6e148
fix: check modified & conflict separately
RahulGautamSingh Apr 11, 2023
695fdb3
fix: update logic
RahulGautamSingh Apr 11, 2023
00b652c
fix: lint issue
RahulGautamSingh Apr 11, 2023
7068647
fix: delete onboardingCache if onboardingPr closed
RahulGautamSingh Apr 12, 2023
474e79d
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 12, 2023
e14ec45
fix: typo
RahulGautamSingh Apr 12, 2023
56c4eaf
refactor
RahulGautamSingh Apr 15, 2023
e51db9b
fix test
RahulGautamSingh Apr 19, 2023
4cfddc6
refactor
RahulGautamSingh Apr 19, 2023
0a26038
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 19, 2023
4bde23b
use is.undefined
RahulGautamSingh Apr 19, 2023
8afdeb4
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 27, 2023
deab039
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 27, 2023
0114fa5
fix typo
RahulGautamSingh Apr 27, 2023
bd84238
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh Apr 27, 2023
01f01d0
refactor
RahulGautamSingh Apr 27, 2023
90af567
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh May 3, 2023
46b0454
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh May 13, 2023
478dc60
fix tests
RahulGautamSingh May 14, 2023
8334f38
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh May 14, 2023
028f4e1
Apply suggestions from code review
RahulGautamSingh May 16, 2023
22634b0
fix formatting
RahulGautamSingh May 16, 2023
f0c00bd
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh May 16, 2023
9233910
Merge branch 'main' into feat/merge-onboarding-into-base
RahulGautamSingh May 16, 2023
c57c02f
Update lib/workers/repository/onboarding/branch/check.ts
RahulGautamSingh May 16, 2023
8004e47
Update lib/workers/repository/onboarding/branch/index.ts
RahulGautamSingh May 16, 2023
a4b3b82
rename for clarity
rarkins May 18, 2023
a957979
Merge branch 'main' into feat/merge-onboarding-into-base
rarkins May 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/util/cache/repository/types.ts
Expand Up @@ -27,9 +27,10 @@ export interface BranchUpgradeCache {
}

export interface OnboardingBranchCache {
onboardingBranch: string;
defaultBranchSha: string;
onboardingBranchSha: string;
isConflicted: boolean;
isModified: boolean;
}

export interface PrCache {
Expand Down
6 changes: 6 additions & 0 deletions lib/util/git/index.spec.ts
Expand Up @@ -344,6 +344,12 @@ describe('util/git/index', () => {
expect(merged.all).toContain('renovate/future_branch');
});

it('does not push if localOnly=true', async () => {
const pushSpy = jest.spyOn(SimpleGit.prototype, 'push');
await git.mergeBranch('renovate/future_branch', true);
expect(pushSpy).toHaveBeenCalledTimes(0);
});

it('should throw if branch merge throws', async () => {
await expect(git.mergeBranch('not_found')).rejects.toThrow();
});
Expand Down
14 changes: 11 additions & 3 deletions lib/util/git/index.ts
Expand Up @@ -774,7 +774,10 @@ export async function deleteBranch(branchName: string): Promise<void> {
delete config.branchCommits[branchName];
}

export async function mergeBranch(branchName: string): Promise<void> {
export async function mergeBranch(
branchName: string,
localOnly = false
): Promise<void> {
let status: StatusResult | undefined;
try {
await syncGit();
Expand All @@ -790,8 +793,13 @@ export async function mergeBranch(branchName: string): Promise<void> {
])
);
status = await git.status();
await gitRetry(() => git.merge(['--ff-only', branchName]));
await gitRetry(() => git.push('origin', config.currentBranch));
if (localOnly) {
// merge commit, don't push to origin
await gitRetry(() => git.merge([branchName]));
} else {
await gitRetry(() => git.merge(['--ff-only', branchName]));
await gitRetry(() => git.push('origin', config.currentBranch));
secustor marked this conversation as resolved.
Show resolved Hide resolved
}
incLimitedValue('Commits');
} catch (err) {
logger.debug(
Expand Down
6 changes: 4 additions & 2 deletions lib/workers/repository/onboarding/branch/check.spec.ts
Expand Up @@ -27,9 +27,10 @@ describe('workers/repository/onboarding/branch/check', () => {
it('skips normal onboarding check if onboardingCache is valid', async () => {
cache.getCache.mockReturnValueOnce({
onboardingBranchCache: {
onboardingBranch: 'configure/renovate',
defaultBranchSha: 'default-sha',
onboardingBranchSha: 'onboarding-sha',
isConflicted: false,
isModified: false,
},
});
git.getBranchCommit
Expand All @@ -45,9 +46,10 @@ describe('workers/repository/onboarding/branch/check', () => {
it('continues with normal logic if onboardingCache is invalid', async () => {
cache.getCache.mockReturnValueOnce({
onboardingBranchCache: {
onboardingBranch: 'configure/renovate',
defaultBranchSha: 'default-sha',
onboardingBranchSha: 'onboarding-sha',
isConflicted: false,
isModified: false,
},
});
scm.getFileList.mockResolvedValue([]);
Expand Down
10 changes: 6 additions & 4 deletions lib/workers/repository/onboarding/branch/check.ts
Expand Up @@ -52,8 +52,12 @@ function closedPrExists(config: RenovateConfig): Promise<Pr | null> {
export async function isOnboarded(config: RenovateConfig): Promise<boolean> {
logger.debug('isOnboarded()');
const title = `Action required: Add a Renovate config`;

// Repo is onboarded if global config is bypassing onboarding and does not require a
// configuration file.
// Repo is not onboarded if the onboarding cache is present and
// the base branch has not been updated since last run
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
// Also if there is a closed pr skip using cache as it is outdated
if (config.requireConfig === 'optional' && config.onboarding === false) {
// Return early and avoid checking for config files
return true;
Expand All @@ -73,9 +77,7 @@ export async function isOnboarded(config: RenovateConfig): Promise<boolean> {
!pr &&
onboardingBranchCache &&
onboardingBranchCache.defaultBranchSha ===
getBranchCommit(config.defaultBranch!) &&
onboardingBranchCache.onboardingBranchSha ===
getBranchCommit(config.onboardingBranch!)
getBranchCommit(config.defaultBranch!)
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
) {
logger.debug('Onboarding cache is valid. Repo is not onboarded');
return false;
Expand Down Expand Up @@ -138,7 +140,7 @@ export async function isOnboarded(config: RenovateConfig): Promise<boolean> {
await ensureComment({
number: pr.number,
topic: `Renovate is disabled`,
content: `Renovate is disabled due to lack of config. If you wish to reenable it, you can either (a) commit a config file to your base branch, or (b) rename this closed PR to trigger a replacement onboarding PR.`,
content: `Renovate is disabled due to lack of config. If you wish to re-enable it, you can either (a) commit a config file to your base branch, or (b) rename this closed PR to trigger a replacement onboarding PR.`,
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
});
}
throw new Error(REPOSITORY_CLOSED_ONBOARDING);
Expand Down
106 changes: 82 additions & 24 deletions lib/workers/repository/onboarding/branch/index.spec.ts
Expand Up @@ -17,17 +17,15 @@
import type { Pr } from '../../../../modules/platform';
import * as memCache from '../../../../util/cache/memory';
import * as _cache from '../../../../util/cache/repository';
import type { RepoCacheData } from '../../../../util/cache/repository/types';
import type { FileAddition } from '../../../../util/git/types';
import { OnboardingState } from '../common';
import * as _config from './config';
import * as _onboardingCache from './onboarding-branch-cache';
import * as _rebase from './rebase';
import { checkOnboardingBranch } from '.';

const rebase: any = _rebase;
const configModule: any = _config;

jest.mock('../../../repository/onboarding/branch/rebase');
jest.mock('../../../../util/cache/repository');
jest.mock('../../../../util/fs');
jest.mock('../../../../util/git');
Expand All @@ -40,13 +38,6 @@
describe('workers/repository/onboarding/branch/index', () => {
describe('checkOnboardingBranch', () => {
let config: RenovateConfig;
const dummyCache = {
onboardingBranchCache: {
onboardingBranch: 'configure/renovate',
defaultBranchSha: 'default-sha',
onboardingBranchSha: 'onboarding-sha',
},
};

beforeEach(() => {
memCache.init();
Expand Down Expand Up @@ -177,8 +168,7 @@
});

it('detects repo is onboarded via file', async () => {
cache.getCache.mockReturnValue(dummyCache);
scm.getFileList.mockResolvedValueOnce(['renovate.json']);
git.getFileList.mockResolvedValueOnce(['renovate.json']);

Check failure on line 171 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.

Check failure on line 171 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › detects repo is onboarded via file

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:171:7)
const res = await checkOnboardingBranch(config);
expect(res.repoIsOnboarded).toBeTrue();
expect(onboardingCache.deleteOnboardingCache).toHaveBeenCalledTimes(1); // removes onboarding cache when repo is onboarded
Expand Down Expand Up @@ -261,28 +251,97 @@
await expect(checkOnboardingBranch(config)).rejects.toThrow();
});

it('updates onboarding branch', async () => {
cache.getCache.mockReturnValue(dummyCache);
scm.getFileList.mockResolvedValue(['package.json']);
it('processes onboarding branch', async () => {
git.getFileList.mockResolvedValue(['package.json']);

Check failure on line 255 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.

Check failure on line 255 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › processes onboarding branch

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:255:7)
platform.findPr.mockResolvedValue(null);
platform.getBranchPr.mockResolvedValueOnce(mock<Pr>());
rebase.rebaseOnboardingBranch.mockResolvedValueOnce('123test');
const res = await checkOnboardingBranch(config);
expect(res.repoIsOnboarded).toBeFalse();
expect(res.branchList).toEqual(['renovate/configure']);
expect(scm.checkoutBranch).toHaveBeenCalledTimes(1);
expect(onboardingCache.setOnboardingCache).toHaveBeenCalledTimes(1); // update onboarding cache
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 261 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(scm.commitAndPush).toHaveBeenCalledTimes(0);
});

it('processes modified onboarding branch and invalidates extract cache', async () => {
const dummyCache = {
scan: {
master: {
sha: 'base_sha',
configHash: 'hash',
packageFiles: {},
extractionFingerprints: {},
},
},
} satisfies RepoCacheData;
cache.getCache.mockReturnValue(dummyCache);
platform.findPr.mockResolvedValue(null);
platform.getBranchPr.mockResolvedValueOnce(mock<Pr>());
git.getBranchCommit

Check failure on line 279 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.

Check failure on line 279 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › processes modified onboarding branch and invalidates extract cache

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:279:7)
.mockReturnValueOnce('default-sha')
.mockReturnValueOnce('new-onboarding-sha');
onboardingCache.isOnboardingBranchModified.mockResolvedValueOnce(true);
onboardingCache.hasOnboardingBranchChanged.mockReturnValueOnce(true);
onboardingCache.isOnboardingBranchConflicted.mockResolvedValueOnce(false);
config.baseBranch = 'master';
await checkOnboardingBranch(config);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 287 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(onboardingCache.setOnboardingCache).toHaveBeenCalledWith(
'default-sha',
'new-onboarding-sha',
false,
true
);
expect(dummyCache).toMatchObject({
scan: {},
});
});

it('skips processing conflicted onboarding branch', async () => {
git.getFileList.mockResolvedValue(['package.json']);

Check failure on line 300 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.

Check failure on line 300 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › skips processing conflicted onboarding branch

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:300:7)
platform.findPr.mockResolvedValue(null);
platform.getBranchPr.mockResolvedValueOnce(mock<Pr>());
platform.getBranchPr.mockResolvedValueOnce(mock<Pr>());
git.getBranchCommit

Check failure on line 304 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.
.mockReturnValueOnce('default-sha')
.mockReturnValueOnce('onboarding-sha');
onboardingCache.isOnboardingBranchModified.mockResolvedValueOnce(true);
onboardingCache.hasOnboardingBranchChanged.mockReturnValueOnce(true);
onboardingCache.isOnboardingBranchConflicted.mockResolvedValueOnce(true);
await checkOnboardingBranch(config);
expect(git.mergeBranch).toHaveBeenCalledTimes(0);

Check failure on line 311 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(onboardingCache.setOnboardingCache).toHaveBeenCalledWith(
'default-sha',
'onboarding-sha',
true,
true
);
});

it('sets onboarding cache for existing onboarding branch', async () => {
git.getFileList.mockResolvedValue(['package.json']);

Check failure on line 321 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.

Check failure on line 321 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › sets onboarding cache for existing onboarding branch

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:321:7)
platform.findPr.mockResolvedValue(null);
platform.getBranchPr.mockResolvedValueOnce(mock<Pr>());
git.getBranchCommit

Check failure on line 324 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Cannot find name 'git'.
.mockReturnValueOnce('default-sha')
.mockReturnValueOnce('onboarding-sha');
onboardingCache.isOnboardingBranchModified.mockResolvedValueOnce(false);
await checkOnboardingBranch(config);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(onboardingCache.setOnboardingCache).toHaveBeenCalledWith(
'default-sha',
'onboarding-sha',
false,
false
);
});

describe('tests onboarding rebase/retry checkbox handling', () => {
beforeEach(() => {
GlobalConfig.set({ platform: 'github' });
config.onboardingRebaseCheckbox = true;
OnboardingState.prUpdateRequested = false;
scm.getFileList.mockResolvedValueOnce(['package.json']);
platform.findPr.mockResolvedValueOnce(null);
rebase.rebaseOnboardingBranch.mockResolvedValueOnce(null);
});

it('detects unsupported platfom', async () => {
Expand All @@ -296,7 +355,7 @@
`Platform '${pl}' does not support extended markdown`
);
expect(OnboardingState.prUpdateRequested).toBeTrue();
expect(scm.checkoutBranch).toHaveBeenCalledTimes(1);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 358 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › tests onboarding rebase/retry checkbox handling › detects unsupported platfom

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:358:16)
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(scm.commitAndPush).toHaveBeenCalledTimes(0);
});

Expand All @@ -310,7 +369,7 @@
`No rebase checkbox was found in the onboarding PR`
);
expect(OnboardingState.prUpdateRequested).toBeTrue();
expect(scm.checkoutBranch).toHaveBeenCalledTimes(1);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 372 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › tests onboarding rebase/retry checkbox handling › detects missing rebase checkbox

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:372:16)
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(scm.commitAndPush).toHaveBeenCalledTimes(0);
});

Expand All @@ -324,8 +383,7 @@
`Manual onboarding PR update requested`
);
expect(OnboardingState.prUpdateRequested).toBeTrue();
``;
expect(scm.checkoutBranch).toHaveBeenCalledTimes(1);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 386 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › tests onboarding rebase/retry checkbox handling › detects manual pr update requested

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:386:16)
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(scm.commitAndPush).toHaveBeenCalledTimes(0);
});

Expand All @@ -336,7 +394,7 @@
await checkOnboardingBranch(config);

expect(OnboardingState.prUpdateRequested).toBeFalse();
expect(scm.checkoutBranch).toHaveBeenCalledTimes(1);
expect(git.mergeBranch).toHaveBeenCalledTimes(1);

Check failure on line 397 in lib/workers/repository/onboarding/branch/index.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

workers/repository/onboarding/branch/index › checkOnboardingBranch › tests onboarding rebase/retry checkbox handling › handles unchecked rebase checkbox

ReferenceError: git is not defined at Object.<anonymous> (lib/workers/repository/onboarding/branch/index.spec.ts:397:16)
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
expect(scm.commitAndPush).toHaveBeenCalledTimes(0);
});
});
Expand Down