Skip to content

Conversation

Copy link

Copilot AI commented Jul 8, 2025

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.

Copilot AI changed the title [WIP] fix skip-issue-check Fix skip-issue-check to support short issue references (#123) Jul 8, 2025
Copilot finished work on behalf of eleanorjboyd July 8, 2025 20:21
Copilot AI requested a review from eleanorjboyd July 8, 2025 20:21
@eleanorjboyd eleanorjboyd marked this pull request as ready for review July 8, 2025 20:26
@eleanorjboyd eleanorjboyd added the debt Covers everything internal: CI, testing, refactoring of the codebase, etc. label Jul 8, 2025
@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jul 8, 2025
@eleanorjboyd eleanorjboyd enabled auto-merge (squash) July 8, 2025 20:34
@eleanorjboyd eleanorjboyd merged commit 40f807a into main Jul 8, 2025
128 of 130 checks passed
@eleanorjboyd 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 Covers everything internal: CI, testing, refactoring of the codebase, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix skip-issue-check

4 participants