@cryptotaxi247 / netdata-1 / commits / f6ce6dde4

use github templating mechanisms to classify issues when they are created (#5776)

Paweł Krupa committed May 22, 2019 at 23:05 UTC f6ce6dde4374dda765daf9ae9278f8a28acb05d8
5 files changed +8 -17
.github/ISSUE_TEMPLATE.md
+5
@@ -1,3 +1,8 @@
1 +---
2 +about: General issue template
3 +labels: "needs triage", "no changelog"
4 +---
5 +
6 <!---
7 This is a generic issue template. We usually prefer contributors to use one
8 of 3 other specific issue templates (bug report, feature request, question)
.github/ISSUE_TEMPLATE/bug_report.md
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 name: Bug report
3 about: Create a bug report to help us improve
4 -
4 +labels: "bug", "needs triage"
5 ---
6
7 <!---
.github/ISSUE_TEMPLATE/feature_request.md
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 name: Feature request
3 about: Suggest an idea for our project
4 -
4 +labels: "feature request", "needs triage"
5 ---
6
7 <!---
.github/ISSUE_TEMPLATE/question.md
+1
@@ -1,6 +1,7 @@
1 ---
2 name: Question
3 about: You just want to ask a question? Go on.
4 +labels: question, "no changelog"
5 ---
6
7 <!---
.travis/labeler.sh
-15
@@ -36,21 +36,6 @@ echo "===== Looking up available labels ====="
36 LABELS_FILE=/tmp/labels
37 hub issue labels >$LABELS_FILE
38
39 -echo "===== Categorizing issues ====="
40 -# This won't touch issues which already have at least one label assigned
41 -for STATE in "open" "closed"; do
42 - for ISSUE in $(hub issue -f "%I %l%n" -s "$STATE" -d "$(date +%F -d '1 day ago')" | grep -v -f $LABELS_FILE); do
43 - echo "-------- Processing $STATE issue no. $ISSUE --------"
44 - BODY="$(curl -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/netdata/netdata/issues/$ISSUE" 2>/dev/null | jq .body)"
45 - case "${BODY}" in
46 - *"# Question summary"*) new_labels "$ISSUE" "question" "no changelog" ;;
47 - *"# Bug report summary"*) new_labels "$ISSUE" "needs triage" "bug" ;;
48 - *"# Feature idea summary"*) new_labels "$ISSUE" "needs triage" "feature request" ;;
49 - *) new_labels "$ISSUE" "needs triage" "no changelog" ;;
50 - esac
51 - done
52 -done
53 -
39 # Change all 'area' labels assigned to PR saving non-area labels.
40 echo "===== Categorizing PRs ====="
41 NEW_LABELS=/tmp/new_labels