From de80ec870375d1c0fbdffe548e8e67550c7ae730 Mon Sep 17 00:00:00 2001
From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Date: Thu, 25 Mar 2021 11:12:48 +0100
Subject: [PATCH] chore: label-actions comments when logs:problem label is
 applied (#9242)

---
 .github/label-actions.yml          | 72 ++++++++++++++++++++++++++++++
 docs/development/issue-labeling.md |  7 +++
 2 files changed, 79 insertions(+)

diff --git a/.github/label-actions.yml b/.github/label-actions.yml
index def75398df..c1fc61728c 100644
--- a/.github/label-actions.yml
+++ b/.github/label-actions.yml
@@ -27,3 +27,75 @@
 
     The Renovate team will take a look at the reproduction repository.
     Once we confirm the provided repository reproduces the problem, the label will be changed to `reproduction:confirmed`.
+
+'logs:problem':
+  comment: >
+    Hi there,
+
+
+    We have found that there's a problem with the logs.
+    Depending on which situation applies follow one, some or all of these instructions.
+
+
+    ### No logs at all
+
+    If there's no log posted yet, we need you to find and copy/paste the log into the issue template.
+
+
+    #### Finding logs on hosted app
+
+    <details><summary>Click me to read instructions</summary>
+
+
+    If you use the Renovate app (GitHub):
+
+    1. Go to the affected PR, and search for "View repository job log here"
+
+    1. Click on the link to go to the "WhiteSource Renovate Dashboard" and log in
+
+    1. You are now in the correct repository log overview screen
+
+    1. Copy/paste the correct log
+
+    1. Follow the steps in the **formatting your logs** section
+
+    </details>
+
+
+    #### Finding logs when self-hosting
+
+    <details><summary>Click me to read instructions</summary>
+
+
+    If you're running self-hosted, run with `LOG_LEVEL=debug` in your environment variables and search for whatever dependency/branch/PR that is causing the problem.
+
+    </details>
+
+
+    ### Insufficient logs
+
+    <details><summary>Click me to read instructions</summary>
+
+
+    If you already provided logs, and the Renovate team said they are not enough, follow the instructions from the **No logs at all** section.
+
+    </details>
+
+
+    ### Formatting your logs
+
+    <details><summary>Click me to read instructions</summary>
+
+
+    Please put your logs in a `<details>` and `<summary>` element like this:
+
+
+        <details><summary>Click me to see logs</summary>
+
+        ```
+        Copy/paste any log here, between the starting and ending backticks
+        ```
+
+        </details>
+
+    </details>
diff --git a/docs/development/issue-labeling.md b/docs/development/issue-labeling.md
index 642f525ffa..a0911a26b7 100644
--- a/docs/development/issue-labeling.md
+++ b/docs/development/issue-labeling.md
@@ -138,6 +138,7 @@ Apply these labels when somebody opens a `feature` type issue requesting a new d
 
     good first issue
     help wanted
+    logs:problem
     reproduction:needed
     reproduction:provided
     reproduction:confirmed
@@ -150,6 +151,12 @@ This label is sometimes picked up by tools or websites that try to encourage peo
 
 Add the label `help wanted` to indicate that we need the original poster or someone else to do some work or it is unlikely to get done.
 
+Add a label `logs:problem` to indicate that there's a problem with the logs, and the contributor needs to do one of these things:
+
+1. Provide logs (if there are none yet)
+1. Provide more logs (in case current logs are insufficient)
+1. Format their logs properly
+
 Add a label `reproduction:needed` if nobody's reproduced it in a public repo yet and such a reproduction is necessary before further work can be done.
 Add the label `reproduction:provided` once there is a public reproduction.
 A developer will add the `reproduction:confirmed` once they have checked and confirmed the reproduction.
-- 
GitLab