Skip to content

githubnext/evergreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evergreen: Your PR Gardener

Evergreen helps keep pull requests green and mergeable by fixing CI failures and keeping PR branches up to date with the base branch.

Because every repo defines "mergeable" differently, Evergreen is installed by an agent that reads repo history, learns local rules, asks for your preferences, and creates a workflow tailored to the repo.

Installation

Ask an agent to research your repo and guide you through the installation:

Install the Evergreen Agentic Workflow using:
https://github.com/githubnext/evergreen/blob/main/INSTALL.md

The installer will:

  1. Read the target repo's guidance, workflows, skills, settings, and last 50 closed PRs.
  2. Infer the repo's mergeability policy and ask you to confirm it.
  3. Copy workflows/evergreen.md and workflows/shared/ into .github/workflows/.
  4. Configure repo policy in .github/workflows/shared/evergreen/repo-policy.md.
  5. Run gh aw compile and include the compiled .lock.yml.
  6. Create labels, secrets, or settings changes when you approve and permissions allow.
  7. Open an installation PR.

After installation, apply the evergreen label to any PR you want Evergreen to target.

How It Runs

Evergreen wakes on the configured schedule or manual dispatch, selects an eligible evergreen PR, and runs deterministic preflight first. The base preflight checks labels, configured CI gates, active leases, and the current head SHA without checking out PR code. Installers add repository-specific quota, draft, trust, and other merge gates during setup.

If work is needed, Evergreen checks out the approved PR head, reads CI and merge-gate evidence, runs configured repo commands, and prepares a repair. Safe outputs then apply allowed writes: PR-branch commits, labels, comments, and CI activation. Each write is reloaded and verified before Evergreen says it happened.

It can fail if the PR head changes, labels disappear, quota runs out, CI logs or tools are unavailable, a patch fails to apply, a push is rejected, or GitHub cannot update the branch cleanly. Evergreen should report the blocked operation instead of claiming success.

Security

The main boundary is untrusted PR input: code, comments, logs, branch names, and artifacts. Public or fork PRs should require trusted approval before code execution.

Evergreen should use GITHUB_TOKEN where possible. Repos that need automation-triggered CI may opt into a scoped EVERGREEN_GITHUB_TOKEN or app token.

Evergreen v1 should not directly merge PRs or write to the base branch, though making a PR green may let GitHub auto-merge it if the repo already has auto-merge enabled.

License

Evergreen is available under the MIT License.

About

Policy-aware agentic workflow that keeps selected pull requests green and mergeable.

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages