Repository navigation
Add opt-in early skips for draft and non-code-only pull requests - #4213
Open
asdf8675309 wants to merge 4 commits into
Open
asdf8675309 wants to merge 4 commits into
asdf8675309 wants to merge 4 commits into
Conversation
This branch has not been deployed
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
Repeated CodeQL runs of about five minutes during rapid draft-PR iteration occupy runners before the author is ready for review. On limited capacity runners, those runs can also delay merge-queue validation. This change adds opt-in early exits for confirmed draft PRs and conservatively identified non-code-only PR changes.
Couldn't find a way to not have the Code Quality scan run on draft PR's and PR's that didn't change any of the file types that were scanned. This adds
skip-if-draftandskip-if-no-language-changestoinit, both defaulting tofalse.analysis-skippedandanalysis-skip-reason; makeautobuild,analyze, and their post actions handle intentional skips successfully. Custom build steps can use the output to guard their own work.A workflow enabling draft skips must include
ready_for_reviewin its PR event types. The path gate is a conservative heuristic: repositories that generate code from documentation or other allowed non-code inputs should leave it disabled.Managed Code Quality integration and review questions
GitHub-managed Code Quality uses a generated
dynamicworkflow. This PR supplies an action-side mechanism; it does not modify that generator or the product's repository settings. The proposedCODE_SCANNING_IS_DRAFTenvironment signal allows the generator to supply draft state. Managed adoption would also need the appropriate opt-in inputs, immutable PR commit metadata for the change gate, and ready-for-review scheduling.Feedback is particularly welcome on:
DRAFT risk assessment from Codex --
Proposed classification for maintainer review:
Which use cases does this change impact?
Workflow types:
dynamicworkflows. Current generators are not changed by this PR; adoption requires GitHub-side integration.