diff options
-rw-r--r-- | src/config.js | 4 | ||||
-rw-r--r-- | src/electron/ipc-api/autoUpdate.js | 5 | ||||
-rw-r--r-- | src/features/announcements/api.js | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/config.js b/src/config.js index da2eff0cc..8930c755f 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -179,6 +179,10 @@ export const FRANZ_SERVICE_REQUEST = `${GITHUB_FERDI_URL}/recipes/issues`; | |||
179 | export const FRANZ_TRANSLATION = 'https://crowdin.com/project/getferdi'; | 179 | export const FRANZ_TRANSLATION = 'https://crowdin.com/project/getferdi'; |
180 | export const FRANZ_DEV_DOCS = 'http://bit.ly/franz-dev-hub'; | 180 | export const FRANZ_DEV_DOCS = 'http://bit.ly/franz-dev-hub'; |
181 | 181 | ||
182 | export const GITHUB_ORG_NAME = 'getferdi'; | ||
183 | export const GITHUB_FERDI_REPO_NAME = 'ferdi'; | ||
184 | export const GITHUB_NIGHTLIES_REPO_NAME = 'nightlies'; | ||
185 | |||
182 | export const FILE_SYSTEM_SETTINGS_TYPES = [ | 186 | export const FILE_SYSTEM_SETTINGS_TYPES = [ |
183 | 'app', | 187 | 'app', |
184 | 'proxy', | 188 | 'proxy', |
diff --git a/src/electron/ipc-api/autoUpdate.js b/src/electron/ipc-api/autoUpdate.js index 58eda801c..603049c4e 100644 --- a/src/electron/ipc-api/autoUpdate.js +++ b/src/electron/ipc-api/autoUpdate.js | |||
@@ -1,5 +1,6 @@ | |||
1 | import { app, ipcMain } from 'electron'; | 1 | import { app, ipcMain } from 'electron'; |
2 | import { autoUpdater } from 'electron-updater'; | 2 | import { autoUpdater } from 'electron-updater'; |
3 | import { GITHUB_NIGHTLIES_REPO_NAME, GITHUB_ORG_NAME } from '../../config'; | ||
3 | import { isMac, isWindows } from '../../environment'; | 4 | import { isMac, isWindows } from '../../environment'; |
4 | 5 | ||
5 | const debug = require('debug')('Ferdi:ipcApi:autoUpdate'); | 6 | const debug = require('debug')('Ferdi:ipcApi:autoUpdate'); |
@@ -21,8 +22,8 @@ export default (params) => { | |||
21 | autoUpdater.allowPrerelease = Boolean(params.settings.app.get('nightly')); | 22 | autoUpdater.allowPrerelease = Boolean(params.settings.app.get('nightly')); |
22 | autoUpdater.setFeedURL({ | 23 | autoUpdater.setFeedURL({ |
23 | provider: 'github', | 24 | provider: 'github', |
24 | repo: 'nightlies', | 25 | owner: GITHUB_ORG_NAME, |
25 | owner: 'getferdi', | 26 | repo: GITHUB_NIGHTLIES_REPO_NAME, |
26 | }); | 27 | }); |
27 | } | 28 | } |
28 | 29 | ||
diff --git a/src/features/announcements/api.js b/src/features/announcements/api.js index 2c4d11d05..f34a62745 100644 --- a/src/features/announcements/api.js +++ b/src/features/announcements/api.js | |||
@@ -1,6 +1,7 @@ | |||
1 | import { app } from '@electron/remote'; | 1 | import { app } from '@electron/remote'; |
2 | import Request from '../../stores/lib/Request'; | 2 | import Request from '../../stores/lib/Request'; |
3 | import apiBase from '../../api/apiBase'; | 3 | import apiBase from '../../api/apiBase'; |
4 | import { GITHUB_FERDI_REPO_NAME, GITHUB_ORG_NAME } from '../../config'; | ||
4 | 5 | ||
5 | const debug = require('debug')('Ferdi:feature:announcements:api'); | 6 | const debug = require('debug')('Ferdi:feature:announcements:api'); |
6 | 7 | ||
@@ -11,7 +12,7 @@ export const announcementsApi = { | |||
11 | }, | 12 | }, |
12 | 13 | ||
13 | async getChangelog(version) { | 14 | async getChangelog(version) { |
14 | const url = `https://api.github.com/repos/getferdi/ferdi/releases/tags/v${version}`; | 15 | const url = `https://api.github.com/repos/${GITHUB_ORG_NAME}/${GITHUB_FERDI_REPO_NAME}/releases/tags/v${version}`; |
15 | debug(`fetching release changelog from Github url: ${url}`); | 16 | debug(`fetching release changelog from Github url: ${url}`); |
16 | const request = await window.fetch(url, { method: 'GET' }); | 17 | const request = await window.fetch(url, { method: 'GET' }); |
17 | if (!request.ok) return null; | 18 | if (!request.ok) return null; |