githubgithub-apiorganizationgithub-organizations

Moving issues from excel to github organization


I am trying to move a bunch of issues from excel to GitHub issues.

The problem I am encountering is that I can not figure out how to use get an access token for an organization in order to automate pushing the issues to GitHub.

I tried to make an OAuth token for that organization but I keep getting an bad credential error.


Solution

  • Make sure your OAuth token has a "repo" scopr.

    Then try creating a new issue (as in this gist)

    curl -X "POST" "https://api.github.com/repos/rickcogley/REPONAME/issues?state=all" \
         -H "Cookie: logged_in=no" \
         -H "Authorization: token THEd13GITHUBfb87TOKENa4FROM5eSETTINGS" \
         -H "Content-Type: text/plain; charset=utf-8" \
         -d $'{
      "title": "A workflow alerts Operator who performs a process",
      "body": "TBD",
      "milestone": 5,
      "assignees": [
        "RickCogley",
        "NathanielPhillips"
      ],
      "labels": [
        "story",
        "#2",
        "enhancement",
        "production"
      ]
    }'