Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9ae7fc9
Add build to be used by CI that has no color or progress
amekkawi Sep 9, 2018
abbe2c8
Fix cbuild yml file name
amekkawi Sep 9, 2018
3b15b02
Change build to use cache
amekkawi Sep 9, 2018
3b82414
Fix duplicate commit message
amekkawi Sep 9, 2018
df4f41c
Fix LanguageProvider tests
amekkawi Sep 9, 2018
e79237a
Fix tests for ExecutionStartMessage
amekkawi Sep 9, 2018
4ab82b2
Fix test snapshot for ExecutionStopMessage
amekkawi Sep 9, 2018
bdf65c8
Fix test snapshot for PageHeader
amekkawi Sep 9, 2018
b5b1047
Fix test snapshot for PhasesTable component
amekkawi Sep 9, 2018
72994d2
Fix test snapshot for NotFoundPage
amekkawi Sep 9, 2018
3b97741
Fix ExecutionsBreadcrumb not setting owner/repo link to "active"
amekkawi Sep 9, 2018
d2fa49e
Fix tests for App container's selectors
amekkawi Sep 9, 2018
e032348
Rework app state and how user login is handled
amekkawi Sep 9, 2018
907a631
Change user image to reduce resolution
amekkawi Sep 9, 2018
e2c1a92
Improve style for commit messages
amekkawi Sep 9, 2018
3181b32
Add state loading error modal
amekkawi Sep 9, 2018
b55a97e
Improve error message for JSON parsing
amekkawi Sep 9, 2018
f7cc644
Change LanguageProvider selectors to remove "make" functions
amekkawi Sep 9, 2018
a4d5e37
Change lint-staged to just do eslint and without fixes
amekkawi Sep 9, 2018
4225b8f
Change TopNav to use logoutUrl from state
amekkawi Sep 9, 2018
5a00acd
Update tests for App actions, selectors, reducer and saga
amekkawi Sep 9, 2018
1777308
Add RenderErrorPanel component
amekkawi Sep 9, 2018
ccd55e4
Change ExecutionDetailPage to better catch errors
amekkawi Sep 9, 2018
07d4907
Add "no results" messages
amekkawi Sep 9, 2018
7c8ae6b
Add sub-resources integrity support
amekkawi Sep 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cbuildci.yml → .cbuildci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ builds:
build:
timeoutInMinutes: 5
image: 'aws/codebuild/nodejs:8.11.0'
useCache: true
25 changes: 24 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ import { ConnectedRouter } from 'connected-react-router/immutable';
import createHistory from 'history/createBrowserHistory';
// import 'sanitize.css/sanitize.css';

// Import root app
// Import root app and constants
import App from 'containers/App';
import {
WINDOW_BLUR,
WINDOW_FOCUS,
WINDOW_VISIBLE,
WINDOW_HIDDEN,
} from 'containers/App/constants';

// Import providers
import LanguageProvider from 'containers/LanguageProvider';
Expand Down Expand Up @@ -49,6 +55,23 @@ history.listen((location, action) => {
});

const store = configureStore(initialState, history);

// Dispatch events on window focus/visibility events.
window.addEventListener('blur', () => {
store.dispatch({ type: WINDOW_BLUR });
});
window.addEventListener('focus', () => {
store.dispatch({ type: WINDOW_FOCUS });
});
window.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
store.dispatch({ type: WINDOW_VISIBLE });
}
if (document.visibilityState === 'hidden') {
store.dispatch({ type: WINDOW_HIDDEN });
}
});

const MOUNT_NODE = document.getElementById('app');

const render = (messages) => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/CommitMeta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function CommitMeta({
{author.login && (
<span className="mr-1" style={{ lineHeight: '22px' }}>
<img
src={`https://github.com/${author.login}.png`}
src={`https://github.com/${author.login}.png?size=60`}
width="20"
height="20"
style={{ marginTop: '-2px', borderRadius: '4px' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "opened" pull r
synchronize {{actionHtml} to}
other {{actionHtml}}
}
{pullRequestLinkHtml}"
{pullRequestLinkHtml} by {usernameHtml}"
id="app.components.ExecutionStartMessage.startedForPullRequest"
values={
Object {
Expand All @@ -27,7 +27,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "opened" pull r
}
/>
</strong>,
"event": "pull_request",
"eventType": "pull_request",
"pullRequestLinkHtml": <a
href="https://git.com/foo/bar/pull/5"
>
Expand All @@ -51,6 +51,12 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "opened" pull r
/>
</InjectIntl(Time)>
</strong>,
"username": "bsmith",
"usernameHtml": <a
href="https://git.com/bsmith"
>
bsmith
</a>,
}
}
/>
Expand Down Expand Up @@ -86,6 +92,12 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "opened" pull r
pull request #5
</span>
</a>
by
<a
href="https://git.com/bsmith"
>
bsmith
</a>
</span>
`;

Expand All @@ -98,7 +110,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "rerun" user ev
id="app.components.ExecutionStartMessage.startedByUserAction"
values={
Object {
"event": "check_run",
"eventType": "check_run",
"identifier": "rerun",
"identifierHtml": <strong>
<FormattedMessage
Expand All @@ -124,12 +136,11 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "rerun" user ev
/>
</InjectIntl(Time)>
</strong>,
"username": "amekkawi-office",
"username": "bsmith",
"usernameHtml": <a
href="https://git.com/amekkawi-office"
href="https://git.com/bsmith"
>
@
amekkawi-office
bsmith
</a>,
}
}
Expand Down Expand Up @@ -159,9 +170,9 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "rerun" user ev
</strong>
initiated by
<a
href="https://git.com/amekkawi-office"
href="https://git.com/bsmith"
>
@amekkawi-office
bsmith
</a>
</span>
`;
Expand All @@ -173,7 +184,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "synchronize" p
synchronize {{actionHtml} to}
other {{actionHtml}}
}
{pullRequestLinkHtml}"
{pullRequestLinkHtml} by {usernameHtml}"
id="app.components.ExecutionStartMessage.startedForPullRequest"
values={
Object {
Expand All @@ -193,7 +204,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "synchronize" p
}
/>
</strong>,
"event": "pull_request",
"eventType": "pull_request",
"pullRequestLinkHtml": <a
href="https://git.com/foo/bar/pull/5"
>
Expand All @@ -217,6 +228,12 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "synchronize" p
/>
</InjectIntl(Time)>
</strong>,
"username": "bsmith",
"usernameHtml": <a
href="https://git.com/bsmith"
>
bsmith
</a>,
}
}
/>
Expand Down Expand Up @@ -252,16 +269,22 @@ exports[`<ExecutionStartMessage/> should render expected JSX for "synchronize" p
pull request #5
</span>
</a>
by
<a
href="https://git.com/bsmith"
>
bsmith
</a>
</span>
`;

exports[`<ExecutionStartMessage/> should render expected JSX for unknown event 1`] = `
<FormattedMessage
defaultMessage="Started {relativeCreateTimeHtml} after event \\"{event}\\""
defaultMessage="Started {relativeCreateTimeHtml} after event \\"{eventType}\\""
id="app.components.ExecutionStartMessage.startedWithUnknownEvent"
values={
Object {
"event": "foobar",
"eventType": "foobar",
"relativeCreateTimeHtml": <strong>
<InjectIntl(Time)
date={1500000000000}
Expand Down Expand Up @@ -305,7 +328,7 @@ exports[`<ExecutionStartMessage/> should render expected JSX for unknown user ev
id="app.components.ExecutionStartMessage.startedByUserAction"
values={
Object {
"event": "check_run",
"eventType": "check_run",
"identifier": "foobar",
"identifierHtml": <strong>
<FormattedMessage
Expand All @@ -331,12 +354,11 @@ exports[`<ExecutionStartMessage/> should render expected JSX for unknown user ev
/>
</InjectIntl(Time)>
</strong>,
"username": "amekkawi-office",
"username": "bsmith",
"usernameHtml": <a
href="https://git.com/amekkawi-office"
href="https://git.com/bsmith"
>
@
amekkawi-office
bsmith
</a>,
}
}
Expand Down Expand Up @@ -366,9 +388,9 @@ exports[`<ExecutionStartMessage/> should render expected JSX for unknown user ev
</strong>
initiated by
<a
href="https://git.com/amekkawi-office"
href="https://git.com/bsmith"
>
@amekkawi-office
bsmith
</a>
</span>
`;
Expand Down
24 changes: 17 additions & 7 deletions app/components/ExecutionStartMessage/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('<ExecutionStartMessage/>', () => {
repo="bar"
createTime={1500000000000}
event={{
event: 'foobar',
type: 'foobar',
}}
/>,
);
Expand All @@ -36,11 +36,16 @@ describe('<ExecutionStartMessage/>', () => {
repo="bar"
createTime={1500000000000}
event={{
event: 'pull_request',
type: 'pull_request',
action: 'opened',
pull_request: {
number: 5,
},
sender: {
login: 'bsmith',
type: 'User',
id: 13106037,
},
}}
/>,
);
Expand All @@ -54,11 +59,16 @@ describe('<ExecutionStartMessage/>', () => {
repo="bar"
createTime={1500000000000}
event={{
event: 'pull_request',
type: 'pull_request',
action: 'synchronize',
pull_request: {
number: 5,
},
sender: {
login: 'bsmith',
type: 'User',
id: 13106037,
},
}}
/>,
);
Expand All @@ -72,13 +82,13 @@ describe('<ExecutionStartMessage/>', () => {
repo="bar"
createTime={1500000000000}
event={{
event: 'check_run',
type: 'check_run',
action: 'requested_action',
requested_action: {
identifier: 'rerun',
},
sender: {
login: 'amekkawi-office',
login: 'bsmith',
type: 'User',
id: 13106037,
},
Expand All @@ -95,13 +105,13 @@ describe('<ExecutionStartMessage/>', () => {
repo="bar"
createTime={1500000000000}
event={{
event: 'check_run',
type: 'check_run',
action: 'requested_action',
requested_action: {
identifier: 'foobar',
},
sender: {
login: 'amekkawi-office',
login: 'bsmith',
type: 'User',
id: 13106037,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ exports[`<ExecutionStopMessage/> should render expected JSX when user requests s
"stopUserHtml": <a
href="https://git.com/foo"
>
@
foo
</a>,
}
Expand All @@ -99,7 +98,7 @@ exports[`<ExecutionStopMessage/> should render expected JSX when user requests s
<a
href="https://git.com/foo"
>
@foo
foo
</a>

</span>
Expand Down Expand Up @@ -140,7 +139,6 @@ exports[`<ExecutionStopMessage/> should render expected JSX when user requests s
"stopUserHtml": <a
href="https://git.com/foo"
>
@
foo
</a>,
}
Expand All @@ -167,7 +165,7 @@ exports[`<ExecutionStopMessage/> should render expected JSX when user requests s
<a
href="https://git.com/foo"
>
@foo
foo
</a>
and took
<strong>
Expand Down
6 changes: 3 additions & 3 deletions app/components/ExecutionsBreadcrumb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ExecutionsBreadcrumb({
if (repo != null) {
if (commit == null) {
repoHtml = (
<li className="breadcrumb-item">
<li className="breadcrumb-item active">
<i className="fab fa-github fa-fw mr-1"/>
{owner}/{repo}
</li>
Expand All @@ -46,7 +46,7 @@ function ExecutionsBreadcrumb({
commitHtml = (
<li className="breadcrumb-item active">
<i className="fas fa-code-branch fa-fw mr-1"/>
{commit.substr(0, 10)}
<code>{commit.substr(0, 10)}</code>
</li>
);
}
Expand All @@ -55,7 +55,7 @@ function ExecutionsBreadcrumb({
<li className="breadcrumb-item">
<Link to={`/repo/${owner}/${repo}/commit/${commit}`}>
<i className="fas fa-code-branch fa-fw mr-1"/>
{commit.substr(0, 10)}
<code>{commit.substr(0, 10)}</code>
</Link>
</li>
);
Expand Down
15 changes: 3 additions & 12 deletions app/components/PageHeader/tests/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<PageHeader /> should render expected JSX 1`] = `
<h1
className="mt-3 pb-2"
style={
Object {
"borderBottom": "1px solid #CCC",
"paddingBottom": "8px",
}
}
>
<PageHeader__H1>
Foobar
</h1>
</PageHeader__H1>
`;

exports[`<PageHeader /> should render expected JSX 2`] = `
<h1
class="mt-3 pb-2"
style="padding-bottom:8px;border-bottom:1px solid #CCC"
class="PageHeader__H1-cGQWxJ bjGECH"
>
Foobar
</h1>
Expand Down
Loading