I am looking for some ways to create a github issue from travis.
I am calling some scripts in travis.yaml
file and I need to create a github issue when travis is executed. I came across documents on calling github APIS using curl command.
Eg: curl -u $username -i -H "Content-Type: application/json" -X POST --data '{"title":"'$title'", "body":"'$body'"}' https://api.github.com/repos/$username/$repo_name/issues
Instead of username
, since the build is triggered via travis, should I use github tokens? Is there any environment variable available which represents github token.