SnykFixPullRequest

Model for Snyk Fix Pull Request.

  1. Overview

Overview

This model represents a Snyk Fix pull request that can be created to fix vulnerabilities in a project. This feature is currently in beta. Uses the Snyk v2 REST API endpoint: /orgs/{org_id}/projects/{project_id}/fix_pull_requests

import clearskies
from clearskies_snyk.models import SnykFixPullRequest


def my_handler(snyk_fix_pull_request: SnykFixPullRequest):
    # Create a fix pull request (POST only endpoint)
    # This is typically used to trigger PR creation for specific issues
    fix_pr = snyk_fix_pull_request
    fix_pr.save(
        {
            "org_id": "org-123",
            "project_id": "project-456",
            "issue_ids": ["SNYK-JS-YARGSPARSER-560381"],
        }
    )