Skip to content

Commit

Permalink
Use more meaningful labels
Browse files Browse the repository at this point in the history
This PR enforces the use of more meaningful labels for all the RYR
projects. It does that by leveraging
[labeler](https://github.com/tonglil/labeler)

The Makefile was updated to simplify the setup and applying the new
labels to all the projects.

The file used by old way to do it using `github label manager` were
deleted.

Fixes: #17
  • Loading branch information
Rémy Greinhofer authored and rgreinho committed Mar 6, 2018
1 parent a927061 commit 0fbdc8f
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 81 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin/
node_modules/
package-lock.json
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ SHELL = /bin/bash

# Misc.
TOPDIR = $(shell git rev-parse --show-toplevel)
BIN_DIR = bin

# Request-yo-racks.
RYR_PROJECTS = api docs infra web
RYR_PROJECTS = api docs infra web charts

default: setup

Expand All @@ -15,13 +16,17 @@ help: # Display help
printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST) | sort

apply-labels:
# echo $(RYR_PROJECTS) | xargs -n 1 -I {} node_modules/.bin/glm -u request-yo-racks import request-yo-racks:{} third-party/github/labels.json
echo $(RYR_PROJECTS) | xargs -n 1 -I {} ./bin/labeler apply -r request-yo-racks/{} third-party/github/labels.yaml

clean: ## Remove unwanted files in project (!DESTRUCTIVE!)
cd $(TOPDIR); git clean -ffdx && git reset --hard
cd $(TOPDIR) && git clean -ffdx && git reset --hard

labeler:
@bash tools/labeler-install.sh

github-labels: setup ## Import standard labels to ALL projects
echo $(RYR_PROJECTS) | xargs -n 1 -I {} node_modules/.bin/glm -u request-yo-racks import request-yo-racks:{} third-party/github/labels.json
setup: labeler ## Setup the full environment

setup: ## Setup the full environment
@npm install github-label-manager

.PHONY:clean docs github-labels help setup
.PHONY: apply-labels clean docs github-label-manager help labeler setup
74 changes: 0 additions & 74 deletions third-party/github/labels.json

This file was deleted.

63 changes: 63 additions & 0 deletions third-party/github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
labels:
# Kinds.
- name: kind/bug
color: F2A2A6
- name: kind/design
color: 8000ff
- name: kind/docs
color: 4000ff
- name: kind/duplicate
color: cccccc
- name: kind/enhancement
color: E7D3BE
- name: kind/feature
color: B6BEB7
- name: kind/question
color: EFF1D5

# T-Shirt sizes.
- name: size/XS
color: 00FF00
- name: size/S
color: CCFF66
- name: size/M
color: FFFF00
- name: size/L
color: ff9933
- name: size/XL
color: b60205
- name: size/XXL
color: 8B0000

# Experience levels.
- name: exp/beginner
color: 6A9798
- name: exp/intermediate
color: 6A9798
- name: exp/expert
color: 6A9798

# Triage statuses.
- name: status/accepted
color: CBE4CE
- name: status/confirmed
color: CBE4CE
- name: status/help wanted
color: 128A0C
- name: status/invalid
color: F09296
- name: status/more-info-needed
color: 6A9798
- name: status/needs-attention
color: 6A9798
- name: status/pending review
color: d4c5f9
- name: status/requires changes
color: 33cccc
- name: status/review carefully!
color: b60205
- name: status/WIP
color: fbca04
- name: status/wontfix
color: 000000
14 changes: 14 additions & 0 deletions tools/labeler-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail

: ${BIN_DIR:=bin}
: ${LABELER_VERSION:=1.0.0}
LABELER_RELEASE=https://github.com/tonglil/labeler/releases/download
LABELER_BIN=labeler

mkdir -p ${BIN_DIR}
if [ ! -f ${BIN_DIR}/${LABELER_BIN} ]; then
wget ${LABELER_RELEASE}/${LABELER_VERSION}/${LABELER_BIN}-darwin-amd64.zip -O ${BIN_DIR}/${LABELER_BIN}.zip
unzip ${BIN_DIR}/${LABELER_BIN}.zip -d ${BIN_DIR}
chmod +x ${BIN_DIR}/${LABELER_BIN}
fi

0 comments on commit 0fbdc8f

Please sign in to comment.