Implement GitHub status check polling before deployments#58
Merged
Conversation
Co-authored-by: ingalls <1297009+ingalls@users.noreply.github.com>
Co-authored-by: ingalls <1297009+ingalls@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement polling mechanism for GitHub Deploy contexts
Implement GitHub status check polling before deployments
Jul 15, 2025
ingalls
requested changes
Jul 15, 2025
Member
ingalls
left a comment
There was a problem hiding this comment.
Modify the PR to use ora like other polling functions in the codebase
…nctions Co-authored-by: ingalls <1297009+ingalls@users.noreply.github.com>
Contributor
Author
Updated the GitHub status check polling to use |
ingalls
approved these changes
Jul 15, 2025
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
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.