Skip to content

test(skills): add tests for Get-PR* skill scripts #576

@rjmurillo-bot

Description

@rjmurillo-bot

Summary

Several PR-related skill scripts lack test coverage. This issue tracks adding Pester tests for the Get-PR* family of scripts.

Scripts Without Tests

Script Purpose
Get-PRContext.ps1 Get comprehensive PR metadata
Get-PRChecks.ps1 Get CI check status for PR
Get-PRReviewThreads.ps1 Get review threads with resolution status
Get-PRReviewComments.ps1 Get review comments
Get-PRReviewers.ps1 Get PR reviewers
Get-UnresolvedReviewThreads.ps1 Filter to unresolved threads only
Get-UnaddressedComments.ps1 Get comments without replies

Test Pattern

Follow existing test patterns in tests/:

  • Mock gh api calls with fixture data
  • Test GraphQL query construction
  • Validate output object shape
  • Test error handling paths

Acceptance Criteria

  • Each script has corresponding .Tests.ps1 file
  • Tests mock external API calls
  • ≥80% code coverage for happy paths
  • Error handling tested
  • All tests pass in CI

Related

  • Existing test examples: Test-PRMerged.Tests.ps1, Detect-CopilotFollowUpPR.Tests.ps1
  • Location: .claude/skills/github/scripts/pr/

Metadata

Metadata

Assignees

Labels

agent-qaTesting and verification agentarea-promptsAgent prompts and templatesarea-skillsSkills documentation and patternsenhancementNew feature or requestpriority:P2Normal: Standard enhancement or bug fix, moderate impact

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions