Skip to content

Commit

Permalink
Merge pull request #23024 from storybookjs/fix-freeze-logic
Browse files Browse the repository at this point in the history
Release: Fix branch name in isPrFrozen
  • Loading branch information
shilman authored Jun 12, 2023
2 parents a40fac3 + 370df47 commit 595b23a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/release/__tests__/is-pr-frozen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('isPrFrozen', () => {
});
await isPrFrozen({ patch: true });

expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-from-patch-1.0.0', {
expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-patch-from-1.0.0', {
'--depth': 1,
});
});
Expand All @@ -54,7 +54,7 @@ describe('isPrFrozen', () => {
});
await isPrFrozen({ patch: false });

expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-from-prerelease-1.0.0', {
expect(simpleGit.__fetch).toHaveBeenCalledWith('origin', 'version-prerelease-from-1.0.0', {
'--depth': 1,
});
});
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/is-pr-frozen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const run = async (options: unknown) => {
const { verbose, patch } = options as { verbose?: boolean; patch?: boolean };

const version = await getCurrentVersion();
const branch = `version-from-${patch ? 'patch' : 'prerelease'}-${version}`;
const branch = `version-${patch ? 'patch' : 'prerelease'}-from-${version}`;

console.log(`💬 Determining if pull request from branch '${chalk.blue(branch)}' is frozen`);

Expand Down

0 comments on commit 595b23a

Please sign in to comment.