Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 2 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ module.exports = {
rules: {
'react/prop-types': 'off',
'no-unused-vars': 'warn',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
}
};
16 changes: 11 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
---
name: "🐛 Bug Report"
name: '🐛 Bug Report'
about: Report something that is broken in Debugra
title: "[BUG] <Short description of the bug>"
labels: ["bug", "triage"]
assignees: ""
title: '[BUG] <Short description of the bug>'
labels: ['bug', 'triage']
assignees: ''
---

### ✦ Describe the Bug

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the initial heading level in both templates. Both files start their Markdown body at ###, triggering MD001.

  • .github/ISSUE_TEMPLATE/bug_report.md#L9-L9: change ### ✦ Describe the Bug to ## ✦ Describe the Bug.
  • .github/ISSUE_TEMPLATE/feature_request.md#L9-L9: change ### ✦ Is your feature request related to a problem? to ## ✦ Is your feature request related to a problem?.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 9-9: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

📍 Affects 2 files
  • .github/ISSUE_TEMPLATE/bug_report.md#L9-L9 (this comment)
  • .github/ISSUE_TEMPLATE/feature_request.md#L9-L9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/ISSUE_TEMPLATE/bug_report.md at line 9, Change the initial body
heading in .github/ISSUE_TEMPLATE/bug_report.md at lines 9-9 from level 3 to
level 2, and make the same level adjustment in
.github/ISSUE_TEMPLATE/feature_request.md at lines 9-9. Preserve both heading
texts unchanged.

Source: Linters/SAST tools


A clear and concise description of what the bug is.

### ⟡ Steps to Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### ✦ Expected Behavior

A clear and concise description of what you expected to happen.

### ⟡ Screenshots (If applicable)

Add screenshots to help explain your problem.

### 💻 Environment Details

- OS: [e.g. Windows 11, macOS, Ubuntu]
- Browser: [e.g. Chrome, Firefox, Safari]
- Version: [e.g. 122.0.0]

### ✦ Additional Context
Add any other context or terminal/console logs about the problem here.

Add any other context or terminal/console logs about the problem here.
13 changes: 9 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
---
name: "🚀 Feature Request"
name: '🚀 Feature Request'
about: Suggest a new feature or improvement for Debugra
title: "[FEAT] <Short description of the proposed feature>"
labels: ["enhancement", "triage"]
assignees: ""
title: '[FEAT] <Short description of the proposed feature>'
labels: ['enhancement', 'triage']
assignees: ''
---

### ✦ Is your feature request related to a problem?

A clear and concise description of what the problem is. (e.g., "I'm frustrated when...")

### ⟡ Describe the Proposed Solution

A clear and concise description of what you want to happen. Describe any UI design elements, components, or helper hooks that would need changes.

### ✦ Describe Alternatives Considered

A clear and concise description of any alternative solutions or features you've considered.

### 🎨 Visual Mockup/Sketches (Optional)

If you have any sketches, UI ideas, or screenshots of similar features, paste them here.

### ⟡ Additional Context

Add any other context or references about the feature request here.
15 changes: 11 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
## ✦ Description
Please include a clear and concise summary of the changes made and the problem solved.

Please include a clear and concise summary of the changes made and the problem solved.

Fixes # (issue number)

## ⟡ Type of Change

Please delete options that are not relevant:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update (non-breaking change to docs)
- [ ] Code styling/formatting (prettier, eslint, spacing)

## ✦ Checklist

- [ ] My code follows the style guidelines of this project.
- [ ] I have performed a self-review of my code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
Expand All @@ -20,11 +24,13 @@ Please delete options that are not relevant:
- [ ] (If applicable) I have run `npm run lint` and `npm run format` locally before pushing.

## ⟡ Screenshots / Screen Recordings (Required for UI changes)

Please provide Before and After screenshots or a short GIF showcasing the visual changes.

| Before | After |
| :--- | :--- |
| *Insert image* | *Insert image* |
| Before | After |
| :------------- | :------------- |
| _Insert image_ | _Insert image_ |

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Expand All @@ -43,6 +49,7 @@ Fixes # (issue)
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
script: |
const commentBody = context.payload.comment.body.trim().toLowerCase();

// List of trigger phrases/keywords
const triggerKeywords = [
'take',
Expand All @@ -28,7 +28,7 @@ jobs:
'i want to work on this',
'i would like to work on this'
];

// Check if comment matches any trigger keyword or starts with one
const isTrigger = triggerKeywords.some(keyword => {
return commentBody === keyword || commentBody.startsWith(keyword + ' ') || commentBody.startsWith(keyword + '\n');
Expand All @@ -40,7 +40,7 @@ jobs:
}

const issue = context.payload.issue;

// Skip pull requests
if (issue.pull_request) {
console.log("This comment is on a pull request, skipping auto-assign.");
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

name: CI Pipeline

on:
pull_request:
branches: [ main, master ]
branches: [main, master]
push:
branches: [ main, master ]
branches: [main, master]

jobs:
build-and-test:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: ESLint Validation
on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mongodb-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
backup:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Install backend dependencies
run: npm install --prefix server
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
git ls-files .github/workflows || true

echo "== playwright workflow =="
if [ -f .github/workflows/playwright.yml ]; then
  nl -ba .github/workflows/playwright.yml | sed -n '1,220p'
fi

echo "== search persist-credentials and checkout usages =="
rg -n "actions/checkout|persist-credentials|pull_request|merge_group|permissions:" .github/workflows || true

echo "== diff stat/name =="
git diff --stat HEAD~1..HEAD || true
git diff -- .github/workflows/playwright.yml | sed -n '1,160p' || true

Repository: saurabhhhcodes/Debugra

Length of output: 794


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== playwright workflow with line numbers =="
awk '{printf "%5d  %s\n", NR, $0}' .github/workflows/playwright.yml | sed -n '1,220p'

echo "== triggers/usages in playwright workflow =="
grep -nE 'pull_request|pull_request_target|merge_group|workflow_dispatch|push|permissions:|actions/checkout|persist-credentials|npm (install|ci)|test|playwright|node' .github/workflows/playwright.yml || true

echo "== checkout persist-credentials in workflows =="
grep -nE 'actions/checkout|persist-credentials' .github/workflows || true

echo "== permissions across workflows =="
python3 - <<'PY'
from pathlib import Path
for p in sorted(Path(".github/workflows").glob("*.yml")):
    text=p.read_text()
    if "permissions:" in text or "pull_request:" in text or "pull_request_target:" in text or "merge_group:" in text:
        print(f"\n-- {p} --")
        lines=text.splitlines()
        for i,l in enumerate(lines,1):
            if any(s in l for s in ["permissions:", "pull_request:", "pull_request_target:", "merge_group:", "workflow_dispatch:", "push:", "pull_request_review:"]):
                start=max(1,i-2); end=min(len(lines), i+3)
                for j in range(start,end+1):
                    print(f"{j:04d} {lines[j-1]}")
PY

Repository: saurabhhhcodes/Debugra

Length of output: 6094


🌐 Web query:

actions/checkout v4 persist-credentials default true documentation

💡 Result:

In the actions/checkout action, including version v4, the persist-credentials input has a default value of true [1][2]. When persist-credentials is set to true (the default), the action configures the Git token or SSH key in the local git configuration [1][3]. This allows your workflow scripts to run authenticated Git commands (such as git push or git fetch) without needing to manually handle credentials [4][3]. The action automatically cleans up these credentials during the post-job phase [4][3]. If you wish to prevent this behavior, you can explicitly set persist-credentials: false in your workflow step [4]. While the default remains true, note that in newer versions of the action (such as v6 and later), the implementation of this feature was improved to store credentials in a temporary location ($RUNNER_TEMP) rather than directly in the.git/config file, enhancing security [3][5].

Citations:


Disable persisted checkout credentials before running PR code.

actions/checkout@v4 defaults persist-credentials: true, and this pull_request workflow still runs PR-controlled install/test scripts afterward. Set persist-credentials: false on the checkout step unless an authenticated Git operation is required later.

Suggested fix
       - uses: actions/checkout@v4
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 12-12: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/playwright.yml at line 12, Update the actions/checkout@v4
step to set persist-credentials to false, preserving the existing checkout
behavior and ensuring no authenticated Git operation is needed later in the
workflow.

Source: Linters/SAST tools

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Install backend dependencies
run: npm install --prefix server
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Loading
Loading