Skip to content
Snippets Groups Projects
Unverified Commit 11a558b2 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(automerge): allow repeate automerge for groups (#22787)

parent 18c2850f
No related merge requests found
......@@ -20,13 +20,13 @@ describe('workers/repository/update/branch/check-existing', () => {
});
it('returns false if recreating closed PRs', async () => {
config.recreateWhen = 'always';
config.recreateClosed = true;
expect(await prAlreadyExisted(config)).toBeNull();
expect(platform.findPr).toHaveBeenCalledTimes(0);
});
it('returns false if check misses', async () => {
config.recreateWhen = 'auto';
config.recreateClosed = false;
expect(await prAlreadyExisted(config)).toBeNull();
expect(platform.findPr).toHaveBeenCalledTimes(1);
});
......
......@@ -8,8 +8,8 @@ export async function prAlreadyExisted(
config: BranchConfig
): Promise<Pr | null> {
logger.trace({ config }, 'prAlreadyExisted');
if (config.recreateWhen === 'always') {
logger.debug('recreateWhen is "always". No need to check for closed PR.');
if (config.recreateClosed) {
logger.debug('recreateClosed is true. No need to check for closed PR.');
return null;
}
logger.debug(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment