This article details GitHub's "Evergreen" system, a GitHub App designed to automate repository access reviews and stale repo archival within a shared organization. It highlights key architectural decisions such as using native GitHub features for choreography, storing state in Git, and implementing robust error handling and rate limiting to ensure reliability and scalability.
Read original on GitHub EngineeringThe article introduces Evergreen, a GitHub App that addresses the challenge of managing external collaborator access and repository lifecycle in large, shared GitHub organizations. It tackles manual housekeeping tasks like quarterly access reviews and stale repository detection, which can become unmanageable as an organization scales. Evergreen's design emphasizes fail-secure principles (revoking access by default if reviews are unanswered) and data immutability (never deleting repositories, only archiving, and logging all changes for auditability).
Evergreen's architecture is surprisingly simple, leveraging existing GitHub features rather than building custom infrastructure. It consists of a small Go webhook server, but the core intelligence lies in its choreography with GitHub's native capabilities. This approach minimizes operational overhead and maximizes platform integration.
Leveraging Platform Primitives
A crucial takeaway is the effective use of existing platform primitives (Git issues, webhooks, custom properties) to achieve complex workflow automation, circumventing the need for bespoke UIs, job queues, or separate audit databases. This simplifies the system significantly.
To handle scale and ensure robustness, Evergreen implements several critical mechanisms: