Skip to content

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Aug 8, 2025

GHA-82

Part of

Copy link

sonarqubecloud bot commented Aug 8, 2025

🤖 Pull Request summary

Adds comprehensive unit tests for SubmitReview functionality.

  • New test file: Creates complete test suite for SubmitReview with 5 test scenarios
  • Review state handling: Tests different PR review states (commented, approved, changes_requested)
  • JIRA integration: Verifies proper JIRA issue transitions and reviewer tracking for eng-xp-squad
  • Test infrastructure: Updates JiraClientStub with new addReviewedBy method

Focus areas for review:

  • Test coverage completeness for all review state paths
  • Mock setup accuracy, especially the GitHub context payload structure
  • Email lookup handling in the eng-xp-squad scenario edge cases

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
3 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

]);
});

it('Request Changes moves issue', async () => {
Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are valid if the dev has asked review from more than one person?
I mean one approval, request for changes should be enough to trigger the action right?

Just sanity checking the logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's triggered one by one, probably far apart in time. First comes is first served. The last review wins the state.

So if one reviewer approves, one requests changes, it depends on what happened last. And it will be moved there. And can be fixed manually if needed.

@pavel-mikula-sonarsource pavel-mikula-sonarsource merged commit afa0cb0 into master Aug 11, 2025
7 checks passed
@pavel-mikula-sonarsource pavel-mikula-sonarsource deleted the Pavel/GHA-82-SubmitReview branch August 11, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants