Skip to content

Commit

Permalink
Merge pull request #417 from PagerDuty/release/0.12.1-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gsreynolds authored Mar 1, 2024
2 parents 329a583 + f99733e commit 2896b5e
Show file tree
Hide file tree
Showing 7 changed files with 541 additions and 450 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
VITE_PD_SUBDOMAIN_ALLOW_LIST: '*'
VITE_PD_OAUTH_CLIENT_ID: ${{ secrets.PD_OAUTH_CLIENT_ID }}
VITE_PD_OAUTH_CLIENT_SECRET: ${{ secrets.PD_OAUTH_CLIENT_SECRET }}
VITE_PD_REQUIRED_ABILITY: ${{ secrets.PD_REQUIRED_ABILITY }}
VITE_PD_REQUIRED_ABILITY: 'teams'
VITE_DD_APPLICATION_ID: ${{ secrets.DD_APPLICATION_ID }}
VITE_DD_CLIENT_TOKEN: ${{ secrets.DD_CLIENT_TOKEN }}
VITE_DD_SITE: ${{ secrets.DD_SITE }}
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pd-live-react",
"homepage": "https://pagerduty.github.io/pd-live-react",
"version": "0.12.0-beta.0",
"version": "0.12.1-beta.0",
"private": true,
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
Expand All @@ -15,11 +15,11 @@
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@pagerduty/pdjs": "^2.2.3",
"@types/jest": "^29.5.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.10.8",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.17",
"axios": "^1.6.2",
"axios": "^1.6.7",
"bootstrap": "^4.6.2",
"bottleneck": "^2.19.5",
"chakra-react-select": "^4.7.0",
Expand Down Expand Up @@ -106,13 +106,13 @@
"@testing-library/react": "^14.1.2",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@vitejs/plugin-react": "^4.0.4",
"@vitejs/plugin-react": "^4.2.1",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-jest": "^29.6.3",
"cypress": "^13.5.1",
"cypress-fail-fast": "^7.0.3",
"cypress-real-events": "^1.11.0",
"dotenv": "^16.3.1",
"dotenv": "^16.4.4",
"eslint": "^8.43.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -129,9 +129,9 @@
"eslint-plugin-styled-components-a11y": "^2.1.31",
"genversion": "^3.1.1",
"gh-pages": "^6.1.1",
"i18next-parser": "^8.9.0",
"i18next-parser": "^8.12.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.6.3",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const NumAlertsComponent = ({
};
const getAlertsForIncidents = useCallback(
(ids) => {
dispatch(getAlertsForIncidentsAsyncConnected(ids));
dispatch(getAlertsForIncidentsAsyncConnected(ids, true));
},
[dispatch],
);
Expand Down
2 changes: 1 addition & 1 deletion src/config/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/redux/incidents/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export const getIncidentsAsync = () => ({
type: FETCH_INCIDENTS_REQUESTED,
});

export const getAlertsForIncidentsAsync = (incidentIds) => ({
export const getAlertsForIncidentsAsync = (incidentIds, isRefetch = false) => ({
type: FETCH_ALERTS_FOR_INCIDENTS_REQUESTED,
incidentIds,
isRefetch,
});

export const getNotesForIncidentsAsync = (incidentIds) => ({
Expand Down
24 changes: 13 additions & 11 deletions src/redux/incidents/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,19 @@ const incidents = produce(
break;

case FETCH_ALERTS_FOR_INCIDENTS_REQUESTED:
draft.incidentAlerts = {
...draft.incidentAlerts,
// dict with keys as the strings of incident ids array and values as { status: 'fetching' }
...action.incidentIds.reduce((acc, incidentId) => {
// eslint-disable-next-line no-param-reassign
acc[incidentId] = {
status: 'fetching',
};
return acc;
}, {}),
};
if (!(action.isRefetch)) {
draft.incidentAlerts = {
...draft.incidentAlerts,
// dict with keys as the strings of incident ids array and values as { status: 'fetching' }
...action.incidentIds.reduce((acc, incidentId) => {
// eslint-disable-next-line no-param-reassign
acc[incidentId] = {
status: 'fetching',
};
return acc;
}, {}),
};
}
draft.status = FETCH_ALERTS_FOR_INCIDENTS_REQUESTED;
break;

Expand Down
Loading

0 comments on commit 2896b5e

Please sign in to comment.