# Deployment locking

The Lock feature in Sleuth prevents pull requests from merging into deployment branches, and generates automatic notifications via your [Slack](/sleuth-dora/integrations-1/slack.md) channel.

![](/files/-MSPOGhGGdNcBrtGVO4H)

#### Manual locking

You can manually lock a deployment or all deployments within a project with one click of a button from your dashboards. You can view your lock history so you can learn how frequently your team locks their deploys and why.

![](/files/-MSR0O02g-9nYeh54B2m)

#### Automatic locking

You can also configure Sleuth to auto-lock deployments [when PRs are merged for the deployment branch](https://help.sleuth.io/settings/project/code-deployments#automatically-lock-deployments).

Read Sleuth CTO [Don Brown's blog post](https://www.sleuth.io/post/prevent-unwanted-changes-with-sleuth-deployment-locking) on how Sleuth's locking feature can make your DevOps life easier!

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/deployment-locking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
