Skip to content

Add PR automation that requires the "I am a human" checkbox in PR descriptions (#5458) - #5458

Open
rchen152 wants to merge 2 commits into
meta:mainfrom
rchen152:export-D128488447
Open

rchen152 wants to merge 2 commits into
meta:mainfrom
rchen152:export-D128488447

Conversation

@rchen152

@rchen152 rchen152 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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:

⚠️ Action needed: this PR is missing required items from our pull request checklist:

  • 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.

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:

⚠️ Action needed: this PR is missing required items from our pull request checklist:

  • Check the "I am a human" box in the PR description. See our AI policy.

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:

✅ This PR follows our pull request checklist.

Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.

Differential Revision: D128488447

@meta-cla meta-cla Bot added the cla signed label Oct 30, 2026
@meta-codesync

meta-codesync Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@rchen152 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D128488447.

@meta-codesync meta-codesync Bot changed the title Add PR automation that requires the "I am a human" checkbox in PR descriptions Add PR automation that requires the "I am a human" checkbox in PR descriptions (#5458) Oct 30, 2026
rchen152 added a commit to rchen152/pyrefly that referenced this pull request Oct 30, 2026
…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
@github-actions github-actions Bot added size/m and removed size/m labels Oct 30, 2026
…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
@github-actions github-actions Bot added size/m and removed size/m labels Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant