From 941550e14782f5752968505431bcb4cd2c47fe0f Mon Sep 17 00:00:00 2001 From: Mike Juniper Date: Wed, 27 Sep 2023 13:29:53 -0600 Subject: [PATCH] Revert "fix(hub-common): handle undefined context.portal (#1245)" (#1247) This reverts commit 3ae3795b9a85c317e4ee5acd73b5e4400e1969d9. --- .github/workflows/release.yml | 1 - package.json | 1 - packages/common/src/sites/HubSite.ts | 2 +- packages/common/test/sites/HubSite.test.ts | 5 +---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d09fd8a161a..c0e095252a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,6 @@ on: - beta # - alpha disabled to allow push to alpha then merge to master w/o incurring a release - next - - '[0-9]+.[0-9]+.x' # Dont run if it's just markdown or doc files paths-ignore: - "**.md" diff --git a/package.json b/package.json index 2faa117a1bf..c7ea6e94a1a 100644 --- a/package.json +++ b/package.json @@ -199,7 +199,6 @@ }, "release": { "branches": [ - "+([1-9])?(.{+([1-9]),x}).x", "master", { "name": "next", diff --git a/packages/common/src/sites/HubSite.ts b/packages/common/src/sites/HubSite.ts index 64224c5dfeb..54442ec8baa 100644 --- a/packages/common/src/sites/HubSite.ts +++ b/packages/common/src/sites/HubSite.ts @@ -142,7 +142,7 @@ export class HubSite ): IHubSite { // ensure we have the orgUrlKey if (!partialSite.orgUrlKey) { - partialSite.orgUrlKey = context.portal?.urlKey; + partialSite.orgUrlKey = context.portal.urlKey; } // extend the partial over the defaults const pojo = { ...DEFAULT_SITE, ...partialSite } as IHubSite; diff --git a/packages/common/test/sites/HubSite.test.ts b/packages/common/test/sites/HubSite.test.ts index e583af16407..66cbb363e83 100644 --- a/packages/common/test/sites/HubSite.test.ts +++ b/packages/common/test/sites/HubSite.test.ts @@ -52,10 +52,7 @@ describe("HubSite Class:", () => { describe("static methods:", () => { it("loads from minimal json", () => { const createSpy = spyOn(HubSitesModule, "createSite"); - const chk = HubSite.fromJson( - { name: "Test Site" }, - unauthdCtxMgr.context - ); + const chk = HubSite.fromJson({ name: "Test Site" }, authdCtxMgr.context); expect(createSpy).not.toHaveBeenCalled(); expect(chk.toJson().name).toEqual("Test Site");