Skip to content
Snippets Groups Projects
Commit b90e916d authored by Raniere Silva's avatar Raniere Silva
Browse files

Add small script to setup label in lesson repo

The script make easy to create the labels and keep it compatible
across repositories.
parent 4ab43b32
Branches
Tags
No related merge requests found
#!/bin/bash
#
# This script setup the labels of your GitHub repository.
#
# Syntax:
#
# $ tools/setup-label owner repo
owner=$1
repo=$2
labels_and_colors="{\"name\":\"getting-started\",\"color\":\"fbca04\"} {\"name\":\"work-in-progress\",\"color\":\"f7c6c7\"} {\"name\":\"discussion\",\"color\":\"5319e7\"}"
echo "Before setup the labels for http://github.com/${owner}/${repo}"
echo "you must provide some informations."
echo "Your GitHub username:"
read username
echo "Your GitHub password:"
read -s password
for tuple in ${labels_and_colors}
do
curl -X POST \
-u ${username}:${password} \
-d "${tuple}" \
"https://api.github.com/repos/${owner}/${repo}/labels"
done
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment