|
87 | 87 | echo "pr_url=${ISSUE_URL}" >> "${GITHUB_OUTPUT}" |
88 | 88 |
|
89 | 89 | # Extract PR number from URL |
90 | | - PR_NUMBER=$(echo "${INPUTS_PR_URL}" | grep -oP '(?<=pull/)\d+') |
| 90 | + PR_NUMBER=$(echo "${INPUTS_PR_URL}" | sed -n 's|.*/pull/\([0-9]*\)$|\1|p') |
91 | 91 | echo "pr_number=${PR_NUMBER}" >> "${GITHUB_OUTPUT}" |
92 | 92 |
|
93 | 93 | elif [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then |
@@ -158,7 +158,7 @@ jobs: |
158 | 158 | 🟡 IMPORTANT: Race conditions, hardcoded test names, missing unique identifiers |
159 | 159 | 🟡 IMPORTANT: Database changes without make gen, unhandled errors causing crashes |
160 | 160 | 🟡 IMPORTANT: Resource leaks, timing bugs (time.Sleep instead of quartz) |
161 | | - 🔵 NITPICK: Portability issues (grep -oP vs sed), minor improvements, readability |
| 161 | + 🔵 NITPICK: Portability issues (grep -oP is GNU-only, use sed for macOS/BSD) |
162 | 162 |
|
163 | 163 | COMMENT WITH SUGGESTIONS: |
164 | 164 | - For CRITICAL/IMPORTANT issues: Standard inline suggestions |
@@ -221,8 +221,7 @@ jobs: |
221 | 221 | \`\`\` |
222 | 222 |
|
223 | 223 | GOOD Comment on line 234 (NITPICK): |
224 | | - Issue: [NITPICK] grep -oP uses Perl regex which is GNU-specific. Works on GitHub Actions |
225 | | - but sed is more portable across all Unix systems. |
| 224 | + Issue: [NITPICK] grep -oP is GNU-specific. sed is more portable for macOS/BSD users. |
226 | 225 |
|
227 | 226 | \`\`\`suggestion |
228 | 227 | PR_NUM=\$(echo "\${URL}" | sed -n 's|.*/pull/\\([0-9]*\\)$|\\1|p') |
|
0 commit comments