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
17 changes: 4 additions & 13 deletions .github/workflows/pr-issue-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Label PR based on size
uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/xs'
xs_max_size: '10'
s_label: 'size/s'
s_max_size: '100'
m_label: 'size/m'
m_max_size: '500'
l_label: 'size/l'
l_max_size: '1000'
xl_label: 'size/xl'
fail_if_xl: 'false'
uses: pascalgn/size-label-action@v0.5.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/pr-issue-bot.yml"

echo "== File =="
ls -la "$FILE"

echo
echo "== Lines 1-160 =="
nl -ba "$FILE" | sed -n '1,160p'

Repository: RohanExploit/VishwaGuru

Length of output: 243


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/pr-issue-bot.yml"

echo "== Lines 1-160 =="
awk '{printf "%4d:%s\n", NR, $0}' "$FILE" | sed -n '1,160p'

echo
echo "== Matching uses: `@v`* (unpinned) =="
rg -n --no-heading 'uses:\s*[^@]+@v[0-9]+' "$FILE" || true

echo
echo "== Matching uses: (all) =="
rg -n --no-heading '^\s*uses:\s*' "$FILE" || true

Repository: RohanExploit/VishwaGuru

Length of output: 6615


Pin workflow actions to commit SHAs to avoid mutable @v* references

The workflow still uses tag-based actions:

  • pascalgn/size-label-action@v0.5.0 (line 19)
  • actions/github-script@v7.0.1 (lines 30, 73, 116)
Suggested change
-        uses: pascalgn/size-label-action@v0.5.0
+        uses: pascalgn/size-label-action@<40-char-commit-sha> # v0.5.0
...
-        uses: actions/github-script@v7.0.1
+        uses: actions/github-script@<40-char-commit-sha> # v7.0.1
...
-        uses: actions/github-script@v7.0.1
+        uses: actions/github-script@<40-char-commit-sha> # v7.0.1
...
-        uses: actions/github-script@v7.0.1
+        uses: actions/github-script@<40-char-commit-sha> # v7.0.1
🧰 Tools
🪛 zizmor (1.25.2)

[error] 19-19: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 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/pr-issue-bot.yml at line 19, Workflow uses mutable tag
pins for third-party actions (pascalgn/size-label-action@v0.5.0 and
actions/github-script@v7.0.1); replace those tag references with immutable
commit SHAs. Locate the two usages of actions/github-script@v7.0.1 and the
single usage of pascalgn/size-label-action@v0.5.0 in the workflow, look up the
corresponding commit SHA on each action's GitHub repo, and replace the `@vX.Y.Z`
tag with the exact commit SHA (e.g., @<full-commit-sha>) so the workflow is
pinned to a specific commit.

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
IGNORED: "package-lock.json,yarn.lock"

welcome-message:
if: github.event.action == 'opened'
Expand Down
7 changes: 2 additions & 5 deletions backend/priority_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def analyze(
severity_score, severity_label, severity_reasons = self._calculate_severity(
combined_text
)
urgency_score, urgency_reasons = self._calculate_urgency(
urgency_score, urgency_reasons = self.calculate_urgency(
combined_text, severity_score
)
categories = self._detect_categories(combined_text)
Expand Down Expand Up @@ -178,7 +178,7 @@ def _calculate_severity(self, text: str):

return score, label, reasons

def _calculate_urgency(self, text: str, severity_score: int):
def calculate_urgency(self, text: str, severity_score: int):
# Base urgency follows severity
urgency = severity_score
reasons = []
Expand Down Expand Up @@ -215,9 +215,6 @@ def _detect_categories(self, text: str) -> List[str]:
for k in keywords:
if k in text:
count += 1
# Optimization: Cap count at 5 for sorting to avoid excessive string matching
if count >= 5:
break

if count > 0:
scored_categories.append((category, count))
Expand Down
51 changes: 0 additions & 51 deletions backend/tests/benchmark_urgency.py

This file was deleted.

58 changes: 0 additions & 58 deletions backend/tests/benchmark_urgency_unoptimized.py

This file was deleted.

6 changes: 0 additions & 6 deletions backend_output.txt

This file was deleted.

4 changes: 0 additions & 4 deletions check_files.py

This file was deleted.

41 changes: 0 additions & 41 deletions create_test_user.py

This file was deleted.

30 changes: 0 additions & 30 deletions debug_backend.py

This file was deleted.

42 changes: 0 additions & 42 deletions debug_login.py

This file was deleted.

Loading