Skip to content

Conversation

@allenhouchins
Copy link
Member

@allenhouchins allenhouchins commented Jan 9, 2026

This pull request simplifies and improves the automation for updating Safari version policies on macOS by switching from a multi-line YAML query to a single-line query and streamlining the associated update script. The changes make the update process more robust, easier to maintain, and less error-prone, especially when parsing and updating the policy file.

Policy and script simplification:

  • Converted the query field in update-safari.yml from a multi-line YAML block to a single-line statement, reducing complexity and making it easier to update programmatically.

Script robustness and maintainability:

  • Updated .github/scripts/dogfood-policy-updater-latest-safari.sh to extract and update the single-line query instead of handling a multi-line block, greatly simplifying the parsing and replacement logic. [1] [2]
  • Improved error handling for environment variables, requiring only the essential DOGFOOD_AUTOMATION_TOKEN to be set, and clarified error messages.
  • Enhanced validation of the Safari feed response by checking for valid JSON and explicit API errors using jq, making the update process more reliable.
  • Changed the update workflow to write changes directly to the file and rely on GitHub Actions to create pull requests, removing the script's own git and PR logic for a cleaner CI/CD process.

@allenhouchins allenhouchins marked this pull request as ready for review January 13, 2026 18:40
@allenhouchins
Copy link
Member Author

@lukeheath hoping this is the last time I need your review on this one! Workflows are difficult to test and I put myself on a bad path with having a poorly constructed query in my policy that this script is supposed to parse.

@allenhouchins allenhouchins merged commit 0aece4f into main Jan 13, 2026
5 checks passed
@allenhouchins allenhouchins deleted the allenhouchins-update-safari-script branch January 13, 2026 21:04
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.

3 participants