Skip to content

Fix skip-issue-check to support short issue references (#123) - #25260

Merged
Eleanor Boyd (eleanorjboyd) merged 2 commits into
mainfrom
copilot/fix-25259
Jul 8, 2025
Merged

Eleanor Boyd (eleanorjboyd) merged 2 commits into
mainfrom
copilot/fix-25259

Conversation

Copilot AI commented Jul 8, 2025 •

Copy link
Copy Markdown

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.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot AI changed the title [WIP] fix skip-issue-check Jul 8, 2025
@eleanorjboyd
Eleanor Boyd (eleanorjboyd) marked this pull request as ready for review July 8, 2025 20:26
@eleanorjboyd Eleanor Boyd (eleanorjboyd) added the debt Code quality issues label Jul 8, 2025
@vs-code-engineering vs-code-engineering Bot added this to the July 2025 milestone Jul 8, 2025
@eleanorjboyd
Eleanor Boyd (eleanorjboyd) enabled auto-merge (squash) July 8, 2025 20:34
@eleanorjboyd
Eleanor Boyd (eleanorjboyd) deleted the copilot/fix-25259 branch July 8, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues

4 participants