diff --git a/backend/src/common/error.js b/backend/src/common/error.js index fd1f8d6e..2ff57b28 100644 --- a/backend/src/common/error.js +++ b/backend/src/common/error.js @@ -1,6 +1,6 @@ // @ts-check -import { OWNER_AFFILIATIONS } from "./render.js"; +import { OWNER_AFFILIATIONS } from "./ops.js"; /** * @type {string} A general message to ask user to try again later. diff --git a/backend/src/common/ops.js b/backend/src/common/ops.js index cfdc2c2a..0c3e3900 100644 --- a/backend/src/common/ops.js +++ b/backend/src/common/ops.js @@ -1,7 +1,8 @@ // @ts-check import toEmoji from "emoji-name-map"; -import { SECONDARY_ERROR_MESSAGES, TRY_AGAIN_LATER } from "./error.js"; + +const OWNER_AFFILIATIONS = ["OWNER", "COLLABORATOR", "ORGANIZATION_MEMBER"]; /** * Returns boolean if value is either "true" or "false" else the value as it is. @@ -158,6 +159,7 @@ const buildSearchFilter = (repos = [], owners = []) => { }; export { + OWNER_AFFILIATIONS, parseBoolean, parseArray, clampValue, diff --git a/backend/src/common/render.js b/backend/src/common/render.js index 6190ea90..594abaa5 100644 --- a/backend/src/common/render.js +++ b/backend/src/common/render.js @@ -5,8 +5,6 @@ import { getCardColors } from "./color.js"; import { encodeHTML } from "./html.js"; import { clampValue } from "./ops.js"; -const OWNER_AFFILIATIONS = ["OWNER", "COLLABORATOR", "ORGANIZATION_MEMBER"]; - /** * Auto layout utility, allows us to layout things vertically or horizontally with * proper gaping. @@ -237,6 +235,5 @@ export { createProgressNode, iconWithLabel, flexLayout, - OWNER_AFFILIATIONS, measureText, };