Skip to content

Commit b5cc05b

Browse files
authored
Merge pull request #129 from atom-ide-community/update-hardcoded-urls
2 parents 5150e82 + 40898dd commit b5cc05b

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

packages/about/lib/update-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ let UpdateManager = class UpdateManager {
134134

135135
const releaseRepo =
136136
appVersion.indexOf('nightly') > -1 ? 'atom-nightly-releases' : 'atom';
137-
return `https://github.com/atom/${releaseRepo}/releases/tag/${appVersion}`;
137+
return `https://github.com/atom-ide-community/${releaseRepo}/releases/tag/${appVersion}`;
138138
}
139139
};
140140

packages/about/spec/update-manager-spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ describe('UpdateManager', () => {
1616

1717
it('returns the page for the release when not a dev version', () => {
1818
expect(updateManager.getReleaseNotesURLForVersion('1.7.0')).toContain(
19-
'atom/atom/releases/tag/v1.7.0'
19+
'atom-ide-community/atom/releases/tag/v1.7.0'
2020
);
2121
expect(updateManager.getReleaseNotesURLForVersion('v1.7.0')).toContain(
22-
'atom/atom/releases/tag/v1.7.0'
22+
'atom-ide-community/atom/releases/tag/v1.7.0'
2323
);
2424
expect(
2525
updateManager.getReleaseNotesURLForVersion('1.7.0-beta10')
26-
).toContain('atom/atom/releases/tag/v1.7.0-beta10');
26+
).toContain('atom-ide-community/atom/releases/tag/v1.7.0-beta10');
2727
expect(
2828
updateManager.getReleaseNotesURLForVersion('1.7.0-nightly10')
29-
).toContain('atom/atom-nightly-releases/releases/tag/v1.7.0-nightly10');
29+
).toContain(
30+
'atom-ide-community/atom-nightly-releases/releases/tag/v1.7.0-nightly10'
31+
);
3032
});
3133
});
3234
});

script/lib/create-windows-installer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const path = require('path');
77

88
const CONFIG = require('../config');
99

10+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
11+
const MAIN_REPO = process.env.MAIN_REPO || 'atom';
12+
1013
module.exports = packagedAppPath => {
1114
const archSuffix = process.arch === 'ia32' ? '' : '-' + process.arch;
1215
const updateUrlPrefix =
@@ -17,7 +20,7 @@ module.exports = packagedAppPath => {
1720
exe: CONFIG.executableName,
1821
appDirectory: packagedAppPath,
1922
authors: 'GitHub Inc.',
20-
iconUrl: `https://raw.githubusercontent.com/atom/atom/master/resources/app-icons/${
23+
iconUrl: `https://raw.githubusercontent.com/${REPO_OWNER}/${MAIN_REPO}/master/resources/app-icons/${
2124
CONFIG.channel
2225
}/atom.ico`,
2326
loadingGif: path.join(

script/lib/update-dependency/git.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
2+
const MAIN_REPO = process.env.MAIN_REPO || 'atom';
3+
14
const git = (git, repositoryRootPath) => {
25
const path = require('path');
36
const packageJsonFilePath = path.join(repositoryRootPath, 'package.json');
@@ -10,7 +13,9 @@ const git = (git, repositoryRootPath) => {
1013
if (!err && !remotes.map(({ name }) => name).includes('ATOM')) {
1114
git.addRemote(
1215
'ATOM',
13-
`https://atom:${process.env.AUTH_TOKEN}@github.com/atom/atom.git/`
16+
`https://atom:${
17+
process.env.AUTH_TOKEN
18+
}@github.com/${REPO_OWNER}/${MAIN_REPO}.git/`
1419
);
1520
}
1621
});

script/lib/update-dependency/pull-request.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
const { request } = require('@octokit/request');
22

3+
const REPO_OWNER = process.env.REPO_OWNER || 'atom';
4+
const MAIN_REPO = process.env.MAIN_REPO || 'atom';
5+
36
const requestWithAuth = request.defaults({
47
baseUrl: 'https://api.github.com',
58
headers: {
69
'user-agent': 'atom',
710
authorization: `token ${process.env.AUTH_TOKEN}`
811
},
9-
owner: 'atom',
10-
repo: 'atom'
12+
owner: REPO_OWNER,
13+
repo: MAIN_REPO
1114
});
1215

1316
module.exports = {
@@ -28,7 +31,7 @@ module.exports = {
2831
},
2932
findPR: async ({ moduleName, latest }, branch) => {
3033
return requestWithAuth('GET /search/issues', {
31-
q: `${moduleName} type:pr ${moduleName}@${latest} in:title repo:atom/atom head:${branch} state:open`
34+
q: `${moduleName} type:pr ${moduleName}@${latest} in:title repo:${REPO_OWNER}/${MAIN_REPO} head:${branch} state:open`
3235
});
3336
},
3437
addLabel: async pullRequestNumber => {

0 commit comments

Comments
 (0)