Skip to content
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a04f936
fix: restore PR description parsing in automated triage script
hoteye Sep 16, 2025
e473061
improve: reorder issue reference detection for better accuracy
hoteye Sep 16, 2025
ccc4bed
fix: remove overly broad issue reference pattern (#8531)
hoteye Sep 16, 2025
01aa14f
fix(tests): increase timeout for large file test in fileUtils (#8531)
hoteye Sep 16, 2025
07a1c1d
fix: remove invalid closingIssuesReferences API call
hoteye Sep 17, 2025
21e4beb
fix: remove overly broad #123 pattern to avoid false positives
hoteye Sep 17, 2025
ce7b6f1
Merge upstream/main into hotfix/pr-triage-regression
hoteye Sep 17, 2025
e80ab70
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 17, 2025
b06e423
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 17, 2025
64aec86
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 18, 2025
00b81a3
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 18, 2025
849f013
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 18, 2025
cdc7573
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
7893c0f
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
17c8d41
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
caf5b3b
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
a0fb657
feat(.github): Add GitHub issue URI support to PR triage script
hoteye Sep 19, 2025
32a0817
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
75ed5a7
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 19, 2025
4ab4710
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 20, 2025
78e03d5
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 20, 2025
e521abd
trigger ci: run complete test suite
hoteye Sep 21, 2025
4cc0b0e
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 23, 2025
e4c7d8c
fix(security): prevent command injection in pr-triage script
hoteye Sep 23, 2025
7dcd981
Merge branch 'main' into hotfix/pr-triage-regression
hoteye Sep 25, 2025
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
24 changes: 20 additions & 4 deletions .github/scripts/pr-triage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,28 @@ process_pr() {
local PR_NUMBER=$1
echo "πŸ”„ Processing PR #${PR_NUMBER}"

# Get closing issue number with error handling
local ISSUE_NUMBER
if ! ISSUE_NUMBER=$(gh pr view "${PR_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json closingIssuesReferences -q '.closingIssuesReferences.nodes[0].number' 2>/dev/null); then
echo " ⚠️ Could not fetch closing issue for PR #${PR_NUMBER}"
# Get PR body with error handling
local PR_BODY
if ! PR_BODY=$(gh pr view "${PR_NUMBER}" --repo "${GITHUB_REPOSITORY}" --json body -q .body 2>/dev/null); then
echo " ⚠️ Could not fetch PR #${PR_NUMBER} details"
return 1
fi

# Look for issue references using explicit keyword patterns only
local ISSUE_NUMBER=""

# Only detect explicit closing keywords to avoid false positives
# Matches: "Closes #123", "Fixes #456", "Resolves #789" (case-insensitive)
if [[ -z "${ISSUE_NUMBER}" ]]; then
ISSUE_NUMBER=$(printf '%s\n' "${PR_BODY}" | grep -iE '(closes?|fixes?|resolves?) #[0-9]+' | grep -oE '#[0-9]+' | head -1 | sed 's/#//' 2>/dev/null || echo "")
fi

# If no issue found with keyword + #<number>, try full GitHub issue URIs
if [[ -z "${ISSUE_NUMBER}" ]]; then
ISSUE_NUMBER=$(printf '%s\n' "${PR_BODY}" | grep -iE 'https?://github.com/[^/]+/[^/]+/issues/[0-9]+' | head -1 | sed -E 's/.*issues\/([0-9]+).*/\1/' 2>/dev/null || echo "")
fi


if [[ -z "${ISSUE_NUMBER}" ]]; then
echo "⚠️ No linked issue found for PR #${PR_NUMBER}, adding status/need-issue label"
if ! gh pr edit "${PR_NUMBER}" --repo "${GITHUB_REPOSITORY}" --add-label "status/need-issue" 2>/dev/null; then
Expand Down