Skip to content

Commit

Permalink
fix: isPR condition (#2438)
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaware authored Dec 6, 2024
1 parent 10b097a commit 0ea64d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/blade/src/utils/storybook/Sandbox/baseCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import dedent from 'dedent';
// @ts-expect-error We don't resolve JSON files right now. didn't want to change TS config for single JSON
import packageJson from '../../../../package.json'; // eslint-disable-line

export const isPR = Boolean(process.env.GITHUB_SHA);
const isMaster = process.env.GITHUB_REF === 'refs/heads/master';

export const isPR = Boolean(process.env.GITHUB_SHA) && !isMaster;

const getBladeVersion = (): string => {
// We don't publish codesandbox ci on master so version is not present
const isMaster = process.env.GITHUB_REF === 'refs/heads/master';

const sha = process.env.GITHUB_SHA;
if (sha && !isMaster) {
const shortSha = sha.slice(0, 8);
Expand Down

0 comments on commit 0ea64d6

Please sign in to comment.