Skip to content

Commit 968ac2d

Browse files
removed
1 parent 922dac7 commit 968ac2d

File tree

6 files changed

+6
-49
lines changed

6 files changed

+6
-49
lines changed

.gitignore

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
41
/node_modules
52
/.pnp
63
.pnp.js
74

8-
# testing
9-
/coverage
5+
coverage
106

11-
# production
12-
/build
7+
build
138

14-
# misc
159
.DS_Store
1610
.env.local
1711
.env.development.local

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
1-
# Build stage
21
FROM node:18-alpine as build
32

4-
# Set working directory
53
WORKDIR /app
64

7-
# Copy package files
5+
COPY package*.json ./
86
COPY package*.json ./
97

10-
# Install dependencies
118
RUN npm install
129

13-
# Copy source code
1410
COPY . .
1511

16-
# Build the app
1712
RUN npm run build
1813

19-
# Production stage
2014
FROM nginx:alpine
2115

22-
# Copy built assets from build stage
2316
COPY --from=build /app/build /usr/share/nginx/html
2417

25-
# Copy nginx configuration (if needed)
26-
# COPY nginx.conf /etc/nginx/conf.d/default.conf
18+
COPY nginx.conf /etc/nginx/conf.d/default.conf
2719

28-
# Expose port 80
2920
EXPOSE 80
3021

31-
# Start nginx
3222
CMD ["nginx", "-g", "daemon off;"]

src/components/ReportGenerator.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ const ReportGenerator = ({ authToken, organization }) => {
159159

160160
useEffect(() => {
161161
if (summary) {
162-
// Wait for charts to render
163162
setTimeout(() => {
164163
setChartImages({
165164
codeScanning: codeScanningChartRef.current?.getChartImage(),
@@ -233,20 +232,6 @@ const ReportGenerator = ({ authToken, organization }) => {
233232
</>
234233
)}
235234

236-
{/* Temporarily commented out
237-
<Box sx={{ mt: 3 }}>
238-
<FormControlLabel
239-
control={
240-
<Checkbox
241-
checked={showAllAlerts}
242-
onChange={(e) => setShowAllAlerts(e.target.checked)}
243-
/>
244-
}
245-
label="Include all alert details in PDF"
246-
/>
247-
</Box>
248-
*/}
249-
250235
{alerts && chartImages && (
251236
<Box sx={{ mt: 3 }}>
252237
<PDFDownloadLink

src/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ root.render(
1313
</React.StrictMode>
1414
);
1515

16-
// If you want to start measuring performance in your app, pass a function
17-
// to log results (for example: reportWebVitals(console.log))
18-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
1916
reportWebVitals();

src/services/githubService.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export const createGitHubClient = (token) => {
44
return new Octokit({
55
auth: token,
66
previews: [
7-
'dorian-preview', // Required for security alerts APIs
8-
'machine-man-preview' // Required for some organization APIs
7+
'dorian-preview',
8+
'machine-man-preview'
99
]
1010
});
1111
};
@@ -20,7 +20,6 @@ export const fetchSecurityAlerts = async (token, organization) => {
2020
dependabot: [],
2121
};
2222

23-
// Fetch all code scanning alerts with pagination
2423
try {
2524
const codeScanningAlerts = await octokit.paginate(
2625
'GET /orgs/{org}/code-scanning/alerts',
@@ -38,7 +37,6 @@ export const fetchSecurityAlerts = async (token, organization) => {
3837
console.warn('Error fetching code scanning alerts:', error.message);
3938
}
4039

41-
// Fetch all secret scanning alerts with pagination
4240
try {
4341
const openAlerts = await octokit.paginate(
4442
'GET /orgs/{org}/secret-scanning/alerts',
@@ -66,7 +64,6 @@ export const fetchSecurityAlerts = async (token, organization) => {
6664
console.warn('Error fetching secret scanning alerts:', error.message);
6765
}
6866

69-
// Fetch all dependabot alerts with pagination
7067
try {
7168
const dependabotAlerts = await octokit.paginate(
7269
'GET /orgs/{org}/dependabot/alerts',
@@ -86,7 +83,6 @@ export const fetchSecurityAlerts = async (token, organization) => {
8683

8784
return alerts;
8885
} catch (error) {
89-
// Preserve the error status from Octokit
9086
console.log("error: ", error);
9187
error.response = { status: error.status };
9288
throw error;

src/setupTests.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)