Repository navigation
Conversation
…criptions (meta#5458) Summary: * Adds a check to the automation_pr_state workflow to require the checkbox. * A PR that fails the check is left in the waiting-for-author state, and a bot-posted comment explains why. The comment is posted only when the check fails. * The check runs when a PR has a cla-signed label added, when a draft PR is moved to non-draft, and when a PR with the bot comment is updated. This means that new PRs get the check, and the comment is kept up-to-date, but old PRs are left untouched. Here are the comments that the check leaves on PRs: When the description does not contain the "I am a human" declaration: <!-- pr-check -->⚠️ **Action needed**: this PR is missing required items from our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request): - Add this checkbox to the PR description and check it: `- [x] I am a human, and I fully understand the code I am submitting.` See our [AI policy](https://github.com/facebook/pyrefly/blob/main/AI_POLICY.md). Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. When the description contains the declaration but the box is not checked: <!-- pr-check -->⚠️ **Action needed**: this PR is missing required items from our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request): - Check the "I am a human" box in the PR description. See our [AI policy](https://github.com/facebook/pyrefly/blob/main/AI_POLICY.md). Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. When the description previously had an issue but now contains the declaration with the box checked: <!-- pr-check --> ✅ This PR follows our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request). Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. Differential Revision: D128488447
Summary: The automated readiness check on new PRs now prints an optional recommendation to split PRs that are large (150+ lines of non-test code) or extra-large (300+ lines of non-test code). For large PRs, we include a gentle nudge to split into separate PRs if possible. For extra-large PRs, we include a stronger nudge to split into separate PRs or small commits. Here's what the comment looks like: If the PR passes all other checks but is large: <!-- pr-check --> ✅ This PR meets all requirements from our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request). **Optional recommendations**: - This PR is on the larger side. If parts of it could be merged on their own, consider [splitting it](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#splitting-a-pull-request) into separate PRs for faster review. If you've already split it as far as is practical, no action is needed. Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. If it passes all other checks but is extra-large: <!-- pr-check --> ✅ This PR meets all requirements from our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request). **Optional recommendations**: - This PR is very large, which makes it slow and difficult to review. We strongly recommend [splitting it](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#splitting-a-pull-request) into smaller PRs that can be merged independently. If that isn't possible, please structure it as a series of small commits. If you've already split it as far as is practical, no action is needed. Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. If the PR fails some other check and is also large: <!-- pr-check -->⚠️ **Action needed**: this PR is missing required items from our [pull request checklist](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#making-a-pull-request): - Check the "I am a human" box in the PR description. See our [AI policy](https://github.com/facebook/pyrefly/blob/main/AI_POLICY.md). **Optional recommendations**: - This PR is on the larger side. If parts of it could be merged on their own, consider [splitting it](https://github.com/facebook/pyrefly/blob/main/CONTRIBUTING.md#splitting-a-pull-request) into separate PRs for faster review. If you've already split it as far as is practical, no action is needed. Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. Differential Revision: D128528925
Contributor
|
@rchen152 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D128528925. |
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:
The automated readiness check on new PRs now prints an optional recommendation to split PRs that are large (150+ lines of non-test code) or extra-large (300+ lines of non-test code).
For large PRs, we include a gentle nudge to split into separate PRs if possible. For extra-large PRs, we include a stronger nudge to split into separate PRs or small commits.
Here's what the comment looks like:
If the PR passes all other checks but is large:
✅ This PR meets all requirements from our pull request
checklist.
Optional recommendations:
Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.
If it passes all other checks but is extra-large:
✅ This PR meets all requirements from our pull request
checklist.
Optional recommendations:
Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.
If the PR fails some other check and is also large:
checklist:
Optional recommendations:
Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.
Differential Revision: D128528925