Skip to main content

Pull Request Creation

Overview

When connected to GitHub or GitLab, OpsWorker can correlate code changes with incidents and suggest code-level fixes through pull request recommendations.

How It Works

The Git Agent analyzes your repository during investigations:

  1. Correlates timeline — Identifies commits and PRs that were deployed around the time the issue started
  2. Analyzes changes — Reviews the code changes in those commits for potential causes
  3. Suggests fixes — When the root cause is a code or configuration change, suggests specific file modifications

Requirements

Use Cases

Configuration Change Caused an Incident

A Kubernetes manifest change (resource limits, environment variables, selectors) introduced an issue. The Git Agent identifies the specific commit and can suggest reverting or adjusting the change.

Application Code Bug

A recent code deployment introduced a bug. The Git Agent identifies the deploy commit and highlights the relevant code changes for review.

Drift Detection

The Git Agent can compare the running configuration in the cluster with what's defined in the repository, identifying cases where manual changes have drifted from source control.

What You See

When the Git Agent finds relevant code context:

  • Related commits — Commits deployed around the incident timeframe with links to the PR/commit
  • Changed files — Specific files and changes that may be related
  • Fix suggestion — When applicable, a recommended code change with context

Limitations

  • PR creation requires Git integration to be configured
  • The Git Agent needs read access to the repositories that contain your Kubernetes manifests and application code
  • Suggestions are recommendations — engineers review and decide whether to apply them

Next Steps