apple-notes-ci-integration
Installation
SKILL.md
Apple Notes CI Integration
Overview
Apple Notes automation is macOS-only because it depends on the Apple Events subsystem and Notes.app. CI pipelines must use GitHub Actions macOS runners (macos-latest or macos-14). However, macOS CI runners have restricted TCC (Transparency, Consent, and Control) permissions, which means direct Notes.app automation via osascript will fail in CI. The standard pattern is to run unit tests against a mock JXA client in CI, and reserve real Notes.app integration tests for local macOS machines or self-hosted runners with pre-granted automation permissions.
Prerequisites
- A Node 20+ project with deterministic dependencies and a mockable Notes client boundary.
- A macOS runner only for syntax and mock tests; do not treat a GitHub-hosted runner as eligible for real Notes access.
- A separately administered self-hosted Mac for opt-in integration tests, with an interactive user session and TCC consent granted through normal macOS or MDM controls.
Instructions
- Keep unit tests independent of Notes.app by injecting the mock client shown below.
- Run
npm ci, lint, and mocked tests on every pull request. - Gate any real integration job behind an explicit repository environment and a self-hosted runner label; do not run it for forks or untrusted pull requests.
- Record the macOS version and the job's test mode (mock or integration) in the job summary so a green mock job is not misread as device coverage.