Created
May 24, 2012 15:49
-
-
Save eleven41/2782339 to your computer and use it in GitHub Desktop.
Set some standard Github issues labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo This script creates issue labels for a GitHub repository | |
echo. | |
echo Please specify the GitHub Profile containing the Repository, e.g.: | |
echo https://github.com/MyProfile/MyCoolProject | |
echo ~~~~~~~~~ | |
set /p username=" Enter Profile : " | |
echo. | |
echo Please specify the GitHub password for that profile: | |
set /p password=" Enter Password : " | |
echo. | |
echo Please specify the GitHub Repository, e.g.: | |
echo https://github.com/MyProfile/MyCoolProject | |
echo ~~~~~~~~~~~~~ | |
echo. | |
set /p repository=" Enter Repository: " | |
echo. | |
echo Creating labels ... | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"feature\",\"color\":\"2d9e11\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"bug\",\"color\":\"e10c02\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"urgent\",\"color\":\"000000\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"rejected\",\"color\":\"dddddd\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"discussion\",\"color\":\"a9a9f5\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"needs feedback\",\"color\":\"faac58\"}" | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels -H "Content-Type: application/json" -d "{\"name\":\"task\",\"color\":\"0b02e1\"}" | |
echo. | |
echo Current labels ... | |
curl -k -u "%username%:%password%" https://api.github.com/repos/%username%/%repository%/labels | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copied and modified from http://captaincodeman.com/2012/03/07/creating-labels-github-issue-system/