Skip to content

Conversation

henrymercer
Copy link
Contributor

Fix an error condition that could cause the set of required checks to be emptied.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner September 22, 2025 14:09
@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 14:09
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the safety of the update required checks script by adding error handling to prevent dangerous scenarios where the required checks list could be emptied. The changes add strict error handling and validation to ensure the script fails gracefully when no checks are found.

Key changes:

  • Added strict error handling with set -euo pipefail
  • Added validation to prevent updating with empty checks list

mbg
mbg previously approved these changes Sep 22, 2025
Copy link
Member

@mbg mbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's suggestion is probably more robust, but I have no strong feelings about that as this is a good improvement as-is.

@henrymercer henrymercer merged commit b8806ec into main Sep 22, 2025
299 checks passed
@henrymercer henrymercer deleted the henrymercer/required-checks-safety branch September 22, 2025 14:37
@github-actions github-actions bot mentioned this pull request Sep 25, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants