Skip to content

Commit bdc555f

Browse files
authored
Merge pull request #370 from manosim/fix-github-hostname
Fix GitHub hostname - Avoid Redirects
2 parents 27a5b87 + 497d801 commit bdc555f

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
### Download
88

9-
You can download Gitify for **free** from either the website [www.gitify.io](http://www.gitify.io/) or from the GitHub repository [releases](https://github.com/manosim/gitify/releases) page.
9+
You can download Gitify for **free** from either the website [www.gitify.io](https://www.gitify.io/) or from the GitHub repository [releases](https://github.com/manosim/gitify/releases) page.
1010

1111
You can also install Gitify via [Homebrew Cask](http://brew.sh/)
1212

1313
```shell
1414
brew cask install gitify
1515
```
1616

17-
Gitify currently only supports OS X.
17+
Gitify currently only supports mac OS.
1818

1919
### Prerequisites
2020

2121
- Node 10+
22-
- Yarn
22+
- [Yarn](https://yarnpkg.com/)
2323
- [Electron](https://electronjs.org/)
2424
- [TypeScript](https://www.typescriptlang.org/)
2525
- [React](https://reactjs.org/)
@@ -92,4 +92,4 @@ Gitify is licensed under the MIT Open Source license. For more information, see
9292
[codecov-image]: https://codecov.io/gh/manosim/gitify/branch/master/graph/badge.svg
9393
[codecov-url]: https://codecov.io/gh/manosim/gitify
9494
[downloads-image]: https://img.shields.io/github/downloads/manosim/gitify/total.svg
95-
[downloads-url]: http://www.gitify.io
95+
[downloads-url]: https://www.gitify.io

src/js/components/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class Sidebar extends React.Component<IProps> {
135135
}
136136

137137
onOpenBrowser() {
138-
shell.openExternal(`https://www.github.com/${Constants.REPO_SLUG}`);
138+
shell.openExternal(`https://github.com/${Constants.REPO_SLUG}`);
139139
}
140140

141141
goToSettings() {

src/js/routes/login.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const { ipcRenderer } = require('electron');
33
import * as React from 'react';
44
import { Redirect } from 'react-router-dom';
55
import { connect } from 'react-redux';
6-
import Octicon, { MarkGithub } from '@primer/octicons-react';
76
import styled from 'styled-components';
87

98
import { AppState } from '../../types/reducers';

src/js/utils/helpers.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('utils/helpers.ts', () => {
1616
'https://api.github.com/repos/ekonstantinidis/notifications-test/issues/3';
1717
const newUrl = generateGitHubWebUrl(apiUrl);
1818
expect(newUrl).toBe(
19-
'https://www.github.com/ekonstantinidis/notifications-test/issues/3'
19+
'https://github.com/ekonstantinidis/notifications-test/issues/3'
2020
);
2121
});
2222

@@ -25,17 +25,15 @@ describe('utils/helpers.ts', () => {
2525
'https://api.github.com/repos/ekonstantinidis/notifications-test/pulls/123';
2626
const newUrl = generateGitHubWebUrl(apiUrl);
2727
expect(newUrl).toBe(
28-
'https://www.github.com/ekonstantinidis/notifications-test/pull/123'
28+
'https://github.com/ekonstantinidis/notifications-test/pull/123'
2929
);
3030
});
3131

3232
it('should generate the GitHub url - non enterprise - (release)', () => {
3333
const apiUrl =
3434
'https://api.github.com/repos/myorg/notifications-test/releases/3988077';
3535
const newUrl = generateGitHubWebUrl(apiUrl);
36-
expect(newUrl).toBe(
37-
'https://www.github.com/myorg/notifications-test/releases'
38-
);
36+
expect(newUrl).toBe('https://github.com/myorg/notifications-test/releases');
3937
});
4038

4139
it('should generate the GitHub url - enterprise - (issue)', () => {
@@ -100,7 +98,7 @@ describe('utils/helpers.ts', () => {
10098
(event, callback) => {
10199
if (event === 'will-redirect') {
102100
const event = new Event('will-redirect');
103-
callback(event, 'http://www.github.com/?code=123-456');
101+
callback(event, 'https://github.com/?code=123-456');
104102
}
105103
}
106104
);
@@ -156,7 +154,7 @@ describe('utils/helpers.ts', () => {
156154
(event, callback) => {
157155
if (event === 'did-fail-load') {
158156
const event = new Event('did-fail-load');
159-
callback(event, 500, null, 'http://www.github.com/?code=123-456');
157+
callback(event, 500, null, 'https://github.com/?code=123-456');
160158
}
161159
}
162160
);

src/js/utils/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function generateGitHubWebUrl(url) {
2525

2626
let newUrl = isEnterprise
2727
? url.replace(`${hostname}/api/v3/repos`, hostname)
28-
: url.replace('api.github.com/repos', 'www.github.com');
28+
: url.replace('api.github.com/repos', 'github.com');
2929

3030
if (newUrl.indexOf('/pulls/') !== -1) {
3131
newUrl = newUrl.replace('/pulls/', '/pull/');

0 commit comments

Comments
 (0)