automatic labeling of new features (#4792)
Paweł Krupa committed
Nov 29, 2018 at 22:50 UTC
9d5ec14343ea7ccf3834399f678c555cac300c54
2 files changed
+4
-5
.travis.yml
+1
-3
@@ -48,7 +48,7 @@ jobs:
48
name: Create release
49
install: sudo apt update -y && sudo apt-get install -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot python-pip && sudo apt install -y --only-upgrade docker-ce && docker info
50
before_script: sudo pip install git-semver
51
- script: ".travis/releaser.sh"
51
+ script: ".travis/releaser.sh && .travis/labeler.sh" # labeler should be replaced with GitHub Actions when they hit GA
52
git:
53
depth: false
54
@@ -75,8 +75,6 @@ jobs:
75
env: COMMIT_AND_PUSH=1
76
git:
77
depth: false
78
- - name: labeler # This job should be replaced with GitHub Actions when they hit GA
79
- script: ".travis/labeler.sh"
78
79
notifications:
80
webhooks: https://app.fossa.io/hooks/travisci
.travis/labeler.sh
+3
-2
@@ -19,13 +19,14 @@ LABELS_FILE=/tmp/exclude_labels
19
hub issue labels > $LABELS_FILE
20
21
for STATE in "open" "closed"; do
22
- for ISSUE in $(hub issue -f "%I %l%n" -s "$STATE" -d "$(date +%F -d '3 days ago')" | grep -v -f $LABELS_FILE); do
22
+ for ISSUE in $(hub issue -f "%I %l%n" -s "$STATE" -d "$(date +%F -d '1 day ago')" | grep -v -f $LABELS_FILE); do
23
echo "Processing $STATE issue no. $ISSUE"
24
URL="https://api.github.com/repos/netdata/netdata/issues/$ISSUE"
25
BODY="$(curl "${URL}" | jq .body 2>/dev/null)"
26
case "${BODY}" in
27
*"# Question summary"* ) curl -H "Authorization: token $GITHUB_TOKEN" -d '{"labels":["question"]}' -X PATCH "${URL}" ;;
28
- *"# Bug report summary"* ) curl -H "Authorization: token $GITHUB_TOKEN" -d '{"labels":["bug"]}' -X PATCH "${URL}" ;;
28
+ *"# Bug report summary"* ) curl -H "Authorization: token $GITHUB_TOKEN" -d '{"labels":["needs triage","bug"]}' -X PATCH "${URL}" ;;
29
+ *"# Feature idea summary"* ) curl -H "Authorization: token $GITHUB_TOKEN" -d '{"labels":["needs triage","feature request"]}' -X PATCH "${URL}" ;;
30
* ) curl -H "Authorization: token $GITHUB_TOKEN" -d '{"labels":["needs triage"]}' -X PATCH "${URL}" ;;
31
esac
32
done