-
Notifications
You must be signed in to change notification settings - Fork 4
Implement GitHub status check polling before deployments #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: ingalls <[email protected]>
Co-authored-by: ingalls <[email protected]>
ingalls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify the PR to use ora like other polling functions in the codebase
…nctions Co-authored-by: ingalls <[email protected]>
Updated the GitHub status check polling to use |
Summary
Implements GitHub Deploy service polling functionality that waits for status checks to pass before proceeding with CloudFormation deployments. This prevents deployment of failing code and ensures all CI checks complete successfully.
Problem Solved
Previously, the deploy tool would proceed with deployments regardless of GitHub status check state, potentially deploying broken code. The tool now polls GitHub status checks and only proceeds when all checks pass, or aborts with a clear error message if checks fail.
Implementation Details
Core Changes
Enhanced
gh.js:status()method to properly return GitHub status check datapollStatusChecks()method that polls until checks pass or failIntegrated into deployment workflow (
cli.js):createandupdatecommandsConfiguration Support
Added configurable polling behavior via
.deployfile:{ "github": { "polling": { "timeout": 1800000, "interval": 30000 } } }timeout: Maximum wait time (1 minute to 1 hour, default: 30 minutes)interval: Poll frequency (5 seconds to 5 minutes, default: 30 seconds)User Experience
Or on failure:
Files Changed
lib/gh.js- Enhanced GitHub API integration with polling logiccli.js- Integrated polling into deployment workflowlib/context.js- Added configuration loading for polling optionsdata/schema.json- Added schema validation for polling configurationREADME.md- Added documentation for polling configurationTesting
Tested with mock scenarios covering:
Backward Compatibility
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.