Refactor: two-way sync, extract services, add tests#527
Closed
nembree360 wants to merge 1 commit intoreload:v1.xfrom
Closed
Refactor: two-way sync, extract services, add tests#527nembree360 wants to merge 1 commit intoreload:v1.xfrom
nembree360 wants to merge 1 commit intoreload:v1.xfrom
Conversation
- Extract Config DTO to centralize all getenv() calls with validation - Add SecurityIssueInterface for shared contract - Extract GitHubGraphQLClient with cursor-based pagination - Extract AlertSyncService from monolithic SyncCommand (~50 line orchestrator) - Add two-way sync: close Jira tickets when GitHub alerts are resolved (FIXED, DISMISSED, AUTO_DISMISSED) via new JiraTransitionService - Add AlertIdentifier for shared unique ID generation - Add RetryableApiCall with exponential backoff for API resilience - Add PHPUnit with 41 tests (unit + integration), all passing - New env var: JIRA_CLOSE_TRANSITION (default: "Done") - Remove unused symfony/yaml dependency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8cfe8d9 to
64a8fef
Compare
achton
previously requested changes
Mar 9, 2026
Dismissing: review contained at least one unverified finding (actions/checkout@v6 does exist). Will re-review with verified findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getenv()calls with validation and readonly propertiesGitHubGraphQLClient,AlertSyncService,JiraTransitionService,AlertIdentifier,RetryableApiCallbreak the monolithicSyncCommandinto focused, testable classessymfony/yamldependencyNew environment variable
JIRA_CLOSE_TRANSITIONDoneNew files
src/Config.phpsrc/SecurityIssueInterface.phpsrc/GitHubGraphQLClient.phpsrc/AlertSyncService.phpsrc/AlertIdentifier.phpsrc/JiraTransitionService.phpsrc/RetryableApiCall.phpphpunit.xmltests/Test plan
composer exec phpunit— 41 tests passphpstan analyse .— level 8, no errorsphpcs -s bin/ src/— no violationsdocker compose run --rm ghsec-jira --verbose --dry-run🤖 Generated with Claude Code