# Create PRs from Priorities View

You can configure _Lifecycle_ to create manual pull requests (PRs) on the **default branch** in your SCM (e.g. GitHub), to remediate violations, right from the _Priorities View_.

Using this feature, teams can seamlessly incorporate the remediation effort into their development cycles, reducing the MTTR and maintaining a good security posture.

(Refer to [Steps to configure manual PR creation](https://help.sonatype.com/en/create-prs-from-priorities-view.html#steps-to-configure-manual-pr-creation "Steps to Configure Manual PR Creation").)

The _Create PR_ button in the Next Step column is enabled if the following conditions are met:

1. The policy violation has occurred at a licensed stage (excludes the _develop_ stage.)
2. The component is used as a direct dependency in the application.
3. The component is included in the [Sonatype supported formats](https://help.sonatype.com/en/analysis.html#ecosystem-support) or is an InnerSource component (release 193 and later.)
4. A recommendation for a suggested version of the component to remediate the violation is available.
5. The logged-in user has sufficient [permissions to create manual PRs](https://help.sonatype.com/en/create-prs-from-priorities-view.html#UUID-15336078-6f2b-937e-efc8-0a163fcd48aa_N1747328876042) from the _Priorities View_.

Click on the Create PR button in the _Next Step_ column to create the manual PR. A link to the PR indicating the PR number will appear in the column, if a PR has been created previously (releases 193 and later.)

Verify breaking changes, suggested version of the component and the target branch for which the PR will be created, and click on _Create_.

The creation of manual PR is an asynchronous process. The link _View PR_ will be available when the PR has been created successfully.

To view more details for the component, prior to creating the manual PR, click on the component name under the Component column. The link displays the Component Details Page. Use the Create PR button as shown in the image below, on the Component Details Page, if you accept the suggested remediation.

**Example of a manual PR created from the Priorities View**

## The Next Step Column

The _Next Step_ column in the _Priorities View_ can initiate one of the following actions:

1. Create PR: To create a manual PR.
2. Retry: The previous attempt to create a manual PR was unsuccessful.
3. View PR: Links to previously created PRs (both manual and [Auto PRs](https://help.sonatype.com/en/automated-pull-requests.html)), for suggested remediation for the component violation.
4. View Violations: Links to the policy violation tab on the [component details page](https://help.sonatype.com/en/component-details-page.html) to investigate the violation.

**Automate with Golden PRs**

A Golden PR is an automated PR created via IQ Server plugins for supported SCMs, if a golden version of a component is available to remediate a policy violation. On instances where both Golden PRs and manual PRs from _Priorities View_ are enabled, a Golden PR will be created automatically. A _View PR_ link will be displayed in the Next Step column instead of the _Create PR_ button.

(The _Create PR_ button will be displayed for remediation suggestions that do not recommend a Golden Version of the component.)

Learn more about [Golden Versions and PRs](https://help.sonatype.com/en/golden-versions-and-prs.html) and [Automated Pull Requests](https://help.sonatype.com/en/automated-pull-requests.html).

## Steps to Configure Manual PR Creation

1. **Assign permission to user roles to create pull/merge requests**
   
   a. Login as system/policy administrator and click on the gear icon on the top right of the page.
   
   
   
   b. Click to Roles under _System Preferences_.
   
   
   
   c. Toggle the Create pull/merge requests control, under the _Remediation_ section to ON position.
   
   d. Verify all other permissions and click _Save_.

2. **Configure _Lifecycle_ to enable creation of manual PRs from the Priorities view.**
   
   This can be enabled at the root organization level, to be effective for all organizations and applications. You can also limit the availability of this feature to specific organizations (or sub-orgs), by enabling it at the organization (or parent org) level, to apply to all applications of the organization. For fine-grained control over specific applications, you can enable this feature at the application level.
   
   a. Click on the _Orgs and Policies_ in the left navigation bar and select the organization/application (or root org) for which you want to enable creation of manual PRs.
   
   b. Click on _Source Control_ from the top bar.
   
   
   
   c. Toggle the Manual Pull Requests control to enable the manual PR creation from the _Priorities view_.
   
   
   
   d. Verify other source control configuration settings and click _Update_.

## Search results

No results found.
