diff --git a/.github/ubiquibot-config-default.yml b/.github/ubiquibot-config-default.yml
deleted file mode 100644
index 6828dfe3e..000000000
--- a/.github/ubiquibot-config-default.yml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-evm-network-id: 100
-price-multiplier: 1.5
-issue-creator-multiplier: 2000
-time-labels:
- - name: "Time: <1 Hour"
- weight: 0.125
- value: 3600
- - name: "Time: <1 Day"
- weight: 1
- value: 86400
- - name: "Time: <1 Week"
- weight: 2
- value: 604800
- - name: "Time: <2 Weeks"
- weight: 3
- value: 1209600
- - name: "Time: <1 Month"
- weight: 4
- value: 2592000
-priority-labels:
- - name: "Priority: 0 (Normal)"
- weight: 1
- - name: "Priority: 1 (Medium)"
- weight: 2
- - name: "Priority: 2 (High)"
- weight: 3
- - name: "Priority: 3 (Urgent)"
- weight: 4
- - name: "Priority: 4 (Emergency)"
- weight: 5
-default-labels:
- - "Time: <1 Hour"
- - "Priority: 0 (Normal)"
- - "Test"
-auto-pay-mode: true
-disable-analytics: true
-comment-incentives: false
-max-concurrent-assigns: 2
-comment-element-pricing:
- text: 0.1
- link: 0.5
- list: 0.5
- code: 5
- image: 5
-default-labels: []
-promotion-comment: "\n
If you enjoy the DevPool experience, please follow Ubiquity on GitHub and star this repo to show your support. It helps a lot!
"
-register-wallet-with-verification: false
diff --git a/src/utils/private.ts b/src/utils/private.ts
index c387823a2..550914b1a 100644
--- a/src/utils/private.ts
+++ b/src/utils/private.ts
@@ -19,9 +19,11 @@ import {
getRegisterWalletWithVerification,
} from "./helpers";
+import DEFAULT_CONFIG_JSON from "../../ubiquibot-config-default.json";
+
const CONFIG_REPO = "ubiquibot-config";
const CONFIG_PATH = ".github/ubiquibot-config.yml";
-const DEFAULT_CONFIG_PATH = ".github/ubiquibot-config-default.yml";
+const DEFAULT_CONFIG_PATH = "/ubiquibot-config-default.yml";
const KEY_NAME = "private-key-encrypted";
const KEY_PREFIX = "HSK_";
@@ -85,11 +87,6 @@ export const parseYAML = (data?: string): WideConfig | undefined => {
}
};
-export const getDefaultConfig = (): WideRepoConfig => {
- const defaultConfig = readFileSync(`${__dirname}/../../ubiquibot-config-default.yml`, "utf8");
- return parseYAML(defaultConfig) as WideRepoConfig;
-};
-
export const getPrivateKey = async (cipherText: string): Promise => {
try {
await _sodium.ready;
@@ -136,11 +133,7 @@ export const getWideConfig = async (context: Context) => {
const parsedOrg: WideOrgConfig | undefined = parseYAML(orgConfig);
const parsedRepo: WideRepoConfig | undefined = parseYAML(repoConfig);
- const defaultConfig = await getConfigSuperset(context, "repo", DEFAULT_CONFIG_PATH);
- const parsedDefault: WideRepoConfig | undefined = parseYAML(defaultConfig);
- if (!parsedDefault) {
- throw new Error("Default configuration missing!");
- }
+ const parsedDefault: WideRepoConfig = DEFAULT_CONFIG_JSON;
const privateKeyDecrypted = parsedOrg && parsedOrg[KEY_NAME] ? await getPrivateKey(parsedOrg[KEY_NAME]) : undefined;
const configs = { parsedRepo, parsedOrg, parsedDefault };
diff --git a/ubiquibot-config-default.json b/ubiquibot-config-default.json
new file mode 100644
index 000000000..0fd16c052
--- /dev/null
+++ b/ubiquibot-config-default.json
@@ -0,0 +1,68 @@
+{
+ "evm-network-id": 100,
+ "price-multiplier": 1.5,
+ "issue-creator-multiplier": 2000,
+ "time-labels": [
+ {
+ "name": "Time: <1 Hour",
+ "weight": 0.125,
+ "value": 3600
+ },
+ {
+ "name": "Time: <1 Day",
+ "weight": 1,
+ "value": 86400
+ },
+ {
+ "name": "Time: <1 Week",
+ "weight": 2,
+ "value": 604800
+ },
+ {
+ "name": "Time: <2 Weeks",
+ "weight": 3,
+ "value": 1209600
+ },
+ {
+ "name": "Time: <1 Month",
+ "weight": 4,
+ "value": 2592000
+ }
+ ],
+ "priority-labels": [
+ {
+ "name": "Priority: 0 (Normal)",
+ "weight": 1
+ },
+ {
+ "name": "Priority: 1 (Medium)",
+ "weight": 2
+ },
+ {
+ "name": "Priority: 2 (High)",
+ "weight": 3
+ },
+ {
+ "name": "Priority: 3 (Urgent)",
+ "weight": 4
+ },
+ {
+ "name": "Priority: 4 (Emergency)",
+ "weight": 5
+ }
+ ],
+ "default-labels": ["Time: <1 Hour", "Priority: 0 (Normal)", "Test"],
+ "auto-pay-mode": true,
+ "disable-analytics": true,
+ "comment-incentives": false,
+ "max-concurrent-assigns": 2,
+ "comment-element-pricing": {
+ "text": 0.1,
+ "link": 0.5,
+ "list": 0.5,
+ "code": 5,
+ "image": 5
+ },
+ "promotion-comment": "\nIf you enjoy the DevPool experience, please follow Ubiquity on GitHub and star this repo to show your support. It helps a lot!
",
+ "register-wallet-with-verification": false
+}