Skip to content

Commit

Permalink
fix: 🐛 fix pr label unrender (#471)
Browse files Browse the repository at this point in the history
* fix: 🐛 fix pr label unrender

* ci:
  • Loading branch information
Gustav-Eikaas committed Aug 14, 2023
1 parent 51a8ed3 commit f43a624
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:

- name: 'Deploy affected apps to Fusion'
shell: bash
run: npx turbo run pr:deploy --since origin/main -- --token ${{ env.FUSION_TOKEN }} --pr ${{ github.event.number }}
run: npx turbo run pr:deploy --since origin/main -- --token ${{ env.FUSION_TOKEN }} --pr ${{ github.event.pull_request.number }}
5 changes: 4 additions & 1 deletion libs/shared/src/packages/fusion-framework/createRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ export function createRender(

const possiblePrNumber = (args.env.config?.environment as any)?.pr;

let cleanup = () => {};

if (possiblePrNumber) {
console.log(`creating pr ${possiblePrNumber}`);
createPrLabel(possiblePrNumber, el);
cleanup = createPrLabel(possiblePrNumber, el);
}

/** Create root from provided element */
Expand All @@ -69,6 +71,7 @@ export function createRender(
return () => {
teardown && teardown();
root.unmount();
cleanup();
};
};
}
Expand Down

0 comments on commit f43a624

Please sign in to comment.