Skip to content

Commit 8d62dad

Browse files
authored
Merge branch 'main' into ci/add-npm-publish-workflow
2 parents e3271f9 + b14375b commit 8d62dad

6 files changed

Lines changed: 28 additions & 20 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Generate GitHub App Token
2727
id: github-app-token
28-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
28+
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
2929
with:
3030
app-id: ${{ secrets.CLOUDOPERATOR_APP_ID }}
3131
private-key: ${{ secrets.CLOUDOPERATOR_APP_PRIVATE_KEY }}

apps/greenhouse/src/components/core-apps/org-admin/components/clusters/hooks/useApi.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export const useApi = (debug?: boolean) => {
1717

1818
const get = useCallback(
1919
async <T extends AllowedApiObject>(url: string, object: T, params?: any): Promise<ApiResponse> => {
20-
let response: T
21-
2220
if (!client || !namespace) {
2321
return { ok: false, message: "Client or namespace not available" }
2422
}

apps/greenhouse/src/components/core-apps/org-admin/components/plugins/plugindefinitions/hooks/useApi.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export const useApi = (debug?: boolean) => {
1717

1818
const get = useCallback(
1919
async <T extends AllowedApiObject>(url: string, object: T, params?: any): Promise<ApiResponse> => {
20-
let response: T
21-
2220
if (!client || !namespace) {
2321
return { ok: false, message: "Client or namespace not available" }
2422
}

apps/greenhouse/src/components/core-apps/org-admin/components/plugins/plugindefinitions/hooks/usePluginPresetApi.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export type PluginPresetApiResponse = {
1717
export const usePluginPresetApi = () => {
1818
const { get, create, update, deleteObject } = useApi()
1919
const namespace = useStore((state: any) => state.namespace)
20-
const { client } = useClient()
2120

2221
const getPluginPreset = (pluginPreset: PluginPreset): Promise<PluginPresetApiResponse> => {
2322
return get<PluginPreset>(

apps/supernova/src/lib/createAlertsSlice.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import * as React from "react"
7-
import { renderHook, act } from "@testing-library/react"
7+
import { renderHook } from "@testing-library/react"
88
import {
99
useAlertsActions,
1010
useAlertEnrichedLabels,

packages/url-state-provider/src/v2/encode.spec.ts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,32 @@ describe("encode", () => {
2222
})
2323

2424
describe("returns empty string for non-object values", () => {
25-
it.each`
26-
description | input
27-
${"not an object (null)"} | ${null}
28-
${"not an object (undefined)"} | ${undefined}
29-
${"not an object (true)"} | ${true}
30-
${"not an object (false)"} | ${false}
31-
${"not an object (number)"} | ${1}
32-
${"not an object (string)"} | ${"string"}
33-
${"is an empty object"} | ${{}}
34-
${"a regular expression"} | ${/regexp/}
35-
${"an array"} | ${[1, 2, 3]}
36-
`("returns '' when input is $description", ({ input }) => {
37-
expect(encode(input)).toBe("")
25+
it("returns '' when input is not an object (null)", () => {
26+
expect(encode(null as any)).toBe("")
27+
})
28+
it("returns '' when input is not an object (undefined)", () => {
29+
expect(encode(undefined as any)).toBe("")
30+
})
31+
it("returns '' when input is not an object (true)", () => {
32+
expect(encode(true as any)).toBe("")
33+
})
34+
it("returns '' when input is not an object (false)", () => {
35+
expect(encode(false as any)).toBe("")
36+
})
37+
it("returns '' when input is not an object (number)", () => {
38+
expect(encode(1 as any)).toBe("")
39+
})
40+
it("returns '' when input is not an object (string)", () => {
41+
expect(encode("string" as any)).toBe("")
42+
})
43+
it("returns '' when input is an empty object", () => {
44+
expect(encode({})).toBe("")
45+
})
46+
it("returns '' when input is a regular expression", () => {
47+
expect(encode(/regexp/ as any)).toBe("")
48+
})
49+
it("returns '' when input is an array", () => {
50+
expect(encode([1, 2, 3] as any)).toBe("")
3851
})
3952
})
4053

0 commit comments

Comments
 (0)