@@ -19,20 +19,20 @@ ISSUE_TITLE="Issues with missing labels"
1919LABEL_TYPE=$( echo " $PRIORITY_LABELS_FILTER " | cut -d ' :' -f 2 | cut -d ' -' -f 1)
2020
2121# Fetch issues that match the filter
22- ISSUES_MISSING_LABEL=$( gh issue list --repo $REPO --limit 100000 -s open -S " $PRIORITY_LABELS_FILTER " --json " number,title" ) || { echo " Failed to fetch issues without $LABEL_TYPE labels" ; exit 1; }
22+ ISSUES_MISSING_LABEL=$( gh issue list --repo $REPO --limit 100000 -s open -S " $PRIORITY_LABELS_FILTER " --json " number,title,author " ) || { echo " Failed to fetch issues without $LABEL_TYPE labels" ; exit 1; }
2323# Ignore the Issue from the "Find issues with missing labels" Action
2424ISSUES_MISSING_LABEL=$( echo " $ISSUES_MISSING_LABEL " | jq --arg title " $ISSUE_TITLE " ' map(select(.title != $title))' )
2525
2626if [ " $ISSUES_MISSING_LABEL " != " []" ]; then
2727 HAS_ISSUES_MISSING_LABELS=true
28-
29- # Create a list of issue numbers
30- FORMATTED_OUTPUT=$( echo " $ISSUES_MISSING_LABEL " | jq -r ' .[].number ' | sed ' s/^/ - https:\/\ /redirect.github.com\ /renovatebot\ /renovate\ /issues\// ' )
31-
28+
29+ # Create a list of issue numbers with authors
30+ FORMATTED_OUTPUT=$( echo " $ISSUES_MISSING_LABEL " | jq -r ' .[] | " - https:/ /redirect.github.com/renovatebot/renovate/issues/\(.number) (by `\(.author.login)`)" ' )
31+
3232 # Count the issues and decide if the output should be singular or plural
3333 ISSUE_COUNT=$( echo " $ISSUES_MISSING_LABEL " | jq ' . | length' )
3434 ISSUE_SINGULAR_PLURAL=$( if [ " $ISSUE_COUNT " -eq 1 ]; then echo " issue" ; else echo " issues" ; fi)
35-
35+
3636 # Append the "list of issues without labels" to the issue body
3737 ISSUE_BODY=" $ISSUE_BODY ## Found $ISSUE_COUNT $ISSUE_SINGULAR_PLURAL missing \` $LABEL_TYPE :\` labels:\n$FORMATTED_OUTPUT \n"
3838fi
4141LABEL_TYPE=$( echo " $ISSUE_TYPE_FILTER " | cut -d ' :' -f 2)
4242
4343# Fetch issues that match the filter
44- ISSUES_MISSING_TYPE=$( gh issue list --repo $REPO --limit 100000 -s open -S " $ISSUE_TYPE_FILTER " --json " number,title" ) || { echo " Failed to fetch issues without $LABEL_TYPE " ; exit 1; }
44+ ISSUES_MISSING_TYPE=$( gh issue list --repo $REPO --limit 100000 -s open -S " $ISSUE_TYPE_FILTER " --json " number,title,author " ) || { echo " Failed to fetch issues without $LABEL_TYPE " ; exit 1; }
4545# Ignore the Issue from the "Find issues with missing labels" Action
4646ISSUES_MISSING_TYPE=$( echo " $ISSUES_MISSING_TYPE " | jq --arg title " $ISSUE_TITLE " ' map(select(.title != $title))' )
4747
4848if [ " $ISSUES_MISSING_TYPE " != " []" ]; then
4949 HAS_ISSUES_MISSING_ISSUE_TYPE=true
50-
51- # Create a list of issue numbers
52- FORMATTED_OUTPUT=$( echo " $ISSUES_MISSING_TYPE " | jq -r ' .[].number ' | sed ' s/^/ - https:\/\ /redirect.github.com\ /renovatebot\ /renovate\ /issues\// ' )
53-
50+
51+ # Create a list of issue numbers with authors
52+ FORMATTED_OUTPUT=$( echo " $ISSUES_MISSING_TYPE " | jq -r ' .[] | " - https:/ /redirect.github.com/renovatebot/renovate/issues/\(.number) (by `\(.author.login)`)" ' )
53+
5454 # Count the issues and decide if the output should be singular or plural
5555 ISSUE_COUNT=$( echo " $ISSUES_MISSING_TYPE " | jq ' . | length' )
5656 ISSUE_SINGULAR_PLURAL=$( if [ " $ISSUE_COUNT " -eq 1 ]; then echo " issue" ; else echo " issues" ; fi)
57-
57+
5858 # Append the "list of issues without issye type" to the issue body
5959 ISSUE_BODY=" $ISSUE_BODY ## Found $ISSUE_COUNT $ISSUE_SINGULAR_PLURAL missing issue type:\n$FORMATTED_OUTPUT \n"
6060fi
0 commit comments