From 3b13591ebc63d498e1a659aaa3032b4887318983 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sat, 20 Jan 2018 16:20:50 +0100
Subject: [PATCH] refactor: Add warning to Pin PRs that upgrade PRs will be
 held up

Closes #1380
---
 lib/config/templates/default/pr-body.hbs          | 4 ++++
 lib/config/templates/docker-pin-group/pr-body.hbs | 2 ++
 lib/config/templates/docker-pin/pr-body.hbs       | 2 ++
 lib/config/templates/group/pr-body.hbs            | 4 ++++
 test/manager/__snapshots__/resolve.spec.js.snap   | 4 ++++
 test/workers/pr/__snapshots__/index.spec.js.snap  | 3 +++
 6 files changed, 19 insertions(+)

diff --git a/lib/config/templates/default/pr-body.hbs b/lib/config/templates/default/pr-body.hbs
index c0d69bfaac..d8567692cc 100644
--- a/lib/config/templates/default/pr-body.hbs
+++ b/lib/config/templates/default/pr-body.hbs
@@ -9,6 +9,10 @@ This PR also includes an upgrade to the corresponding [@types/{{depName}}](https
 **Note**: This PR was created on a configured schedule ("{{schedule}}"{{#if timezone}} in timezone `{{timezone}}`{{/if}}) and will not receive updates outside those times.
 {{/if}}
 
+{{#if isPin}}
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+{{/if}}
+
 ### Commits
 
 <details>
diff --git a/lib/config/templates/docker-pin-group/pr-body.hbs b/lib/config/templates/docker-pin-group/pr-body.hbs
index d966d0c5e6..d667d89a81 100644
--- a/lib/config/templates/docker-pin-group/pr-body.hbs
+++ b/lib/config/templates/docker-pin-group/pr-body.hbs
@@ -8,6 +8,8 @@ This Pull Request pins Dockerfiles to use image digests. For details on Renovate
 -   {{#if repositoryUrl}}[{{upgrade.depName}}]({{upgrade.repositoryUrl}}){{else}}{{depName}}{{/if}}: `{{upgrade.newDigest}}`
 {{/each}}
 
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+
 {{#if hasErrors}}
 
 ---
diff --git a/lib/config/templates/docker-pin/pr-body.hbs b/lib/config/templates/docker-pin/pr-body.hbs
index ff01476188..8893900b8f 100644
--- a/lib/config/templates/docker-pin/pr-body.hbs
+++ b/lib/config/templates/docker-pin/pr-body.hbs
@@ -5,6 +5,8 @@ This digest will then be kept updated via Pull Requests whenever the image is up
 **Note**: This PR was created on a configured schedule ("{{schedule}}"{{#if timezone}} in timezone `{{timezone}}`{{/if}}) and will not receive updates outside those times.
 {{/if}}
 
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+
 {{#if hasErrors}}
 
 ---
diff --git a/lib/config/templates/group/pr-body.hbs b/lib/config/templates/group/pr-body.hbs
index 80ca0e84c3..92b3555d76 100644
--- a/lib/config/templates/group/pr-body.hbs
+++ b/lib/config/templates/group/pr-body.hbs
@@ -29,6 +29,10 @@ This Pull Request renovates the package group "{{groupName}}".
 {{/unless}}
 <br />
 
+{{#if isPin}}
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+{{/if}}
+
 {{#if hasErrors}}
 
 ---
diff --git a/test/manager/__snapshots__/resolve.spec.js.snap b/test/manager/__snapshots__/resolve.spec.js.snap
index e53651306b..9931dd0016 100644
--- a/test/manager/__snapshots__/resolve.spec.js.snap
+++ b/test/manager/__snapshots__/resolve.spec.js.snap
@@ -136,6 +136,8 @@ This PR has been generated by [Renovate Bot](https://renovateapp.com).",
 -   {{#if repositoryUrl}}[{{upgrade.depName}}]({{upgrade.repositoryUrl}}){{else}}{{depName}}{{/if}}: \`{{upgrade.newDigest}}\`
 {{/each}}
 
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+
 {{#if hasErrors}}
 
 ---
@@ -175,6 +177,8 @@ This digest will then be kept updated via Pull Requests whenever the image is up
 **Note**: This PR was created on a configured schedule (\\"{{schedule}}\\"{{#if timezone}} in timezone \`{{timezone}}\`{{/if}}) and will not receive updates outside those times.
 {{/if}}
 
+**Important**: Renovate will wait until you have merged this Pin request before creating PRs for any *upgrades*. If you do not wish to pin anything, please upate your config accordingly instead of leaving this PR open.
+
 {{#if hasErrors}}
 
 ---
diff --git a/test/workers/pr/__snapshots__/index.spec.js.snap b/test/workers/pr/__snapshots__/index.spec.js.snap
index b107e7e3e7..d119220c58 100644
--- a/test/workers/pr/__snapshots__/index.spec.js.snap
+++ b/test/workers/pr/__snapshots__/index.spec.js.snap
@@ -52,6 +52,7 @@ Array [
   "This Pull Request updates dependency [dummy](https://github.com/renovateapp/dummy) from \`v1.0.0\` to \`v1.1.0\`
 
 
+
 ### Commits
 
 <details>
@@ -76,6 +77,7 @@ Object {
   "body": "This Pull Request updates dependency [dummy](https://github.com/renovateapp/dummy) from \`v1.0.0\` to \`v1.1.0\`
 
 
+
 ### Commits
 
 <details>
@@ -105,6 +107,7 @@ Array [
   "This Pull Request updates dependency [dummy](https://github.com/renovateapp/dummy) from \`v1.0.0\` to \`v1.1.0\`
 
 
+
 ### Commits
 
 
-- 
GitLab