Commit 40f807a
Updates the PR issue check to recognize both full GitHub issue URLs and
short issue references in the format `#123`.
## Problem
Currently, the `skip-issue-check` workflow only accepts full GitHub
issue URLs like `https://github.com/microsoft/vscode-python/issues/123`
in PR descriptions. Contributors using the more common short format like
`#123` would need to add the `skip-issue-check` label to bypass the
check.
## Solution
Modified the GitHub Actions script in
`.github/workflows/pr-file-check.yml` to check for both formats:
- Full URLs: `https://github.com/microsoft/vscode-python/issues/123`
(existing behavior)
- Short references: `#123` (new behavior)
The check now passes if either format is found in the PR description.
## Changes
- Added regex pattern `/#\d+/` to match short issue references
- Updated condition to pass if either format is detected: `if
(!issueLink && !issueReference)`
- Maintains backward compatibility and existing `skip-issue-check` label
behavior
## Testing
Verified the updated logic handles all scenarios correctly:
- ✅ Full GitHub URLs (existing)
- ✅ Short format like `#123` (new)
- ✅ Both formats in same PR description
- ✅ Multiple short references
- ✅ Skip label behavior unchanged
- ❌ No issue references (correctly fails)
- ❌ Invalid formats like `#` without numbers (correctly fails)
Fixes #25259.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: eleanorjboyd <[email protected]>
1 parent 9d0aab5 commit 40f807a
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
0 commit comments