fix(review): refresh PR files when pre-merge checks are path-gated#1402
Open
JSONbored wants to merge 1 commit into
Open
fix(review): refresh PR files when pre-merge checks are path-gated#1402JSONbored wants to merge 1 commit into
JSONbored wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (80.00%) is below the target coverage (97.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
=======================================
Coverage 95.33% 95.34%
=======================================
Files 192 192
Lines 20750 20752 +2
Branches 7500 7500
=======================================
+ Hits 19783 19785 +2
Misses 383 383
Partials 584 584
🚀 New features to boost your workflow:
|
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.
Motivation
review.pre_merge_checks(entries withwhen_paths) rely on accurate PR file lists to decide whether an enforced check applies, and stale cachedpull_request_filescould let an enforced check be incorrectly ignored.Description
shouldRefreshFilesForPreMergeChecks(env, repoFullName)to detect whether the repo manifest contains anypre_merge_checkswithwhen_paths.refreshPullRequestDetailsruns when path-gated checks are configured.test/unit/gate-check-policy.test.tsand a synchronize regression test that seeds stale cached files and verifies a live files fetch replaces them intest/unit/queue.test.ts.Testing
git diff --checkandnpm run typecheck, both succeeded.npx vitest run test/unit/gate-check-policy.test.ts test/unit/queue.test.ts -t "refreshes files when pre-merge checks|refreshes pull request files for path-gated pre-merge checks"and the new/affected tests passed.npm run test:ci; the run progressed but could not be completed in this environment (coverage phase / long-running CI step was stopped).npm audit --audit-level=moderatecould not complete due to the registry audit endpoint returning403 Forbiddenin this environment.Codex Task