Skip to content

Instantly share code, notes, and snippets.

@eleven41
Created May 24, 2012 15:49
Show Gist options
  • Save eleven41/2782339 to your computer and use it in GitHub Desktop.
Save eleven41/2782339 to your computer and use it in GitHub Desktop.
Set some standard Github issues labels
@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
@eleven41
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment