icabp-coderdojo-projects / iarla_work

0 stars 0 forks source link

Learn how to use the Github Issues API #2

Open ewan-chalmers opened 5 years ago

ewan-chalmers commented 5 years ago

Using a personal access token to work with Github API

ewan-chalmers commented 5 years ago

An introduction to curl using GitHub's API https://gist.github.com/caspyin/2288960

USER=x
TOKEN=x
curl -i https://api.github.ibm.com --user $USER:$TOKEN
ewan-chalmers commented 5 years ago

Github Issues API https://developer.github.com/v3/issues/

USER=x
TOKEN=x
curl -i --url "https://github.ibm.com/api/v3/search/issues?q=is:open&page=1" --user $USER:$TOKEN
ewan-chalmers commented 5 years ago

@iarla-crewe For since query, this seems to be working for me

curl -s -u user:$GHTOKEN --url "https://api.github.ibm.com/repos/security-secops/ibm-security-cloud/issues?labels=EFT%20Blocker,defect&since=2018-11-16T00:00:00Z"  | jq '.[] | .title, .created_at, .updated_at'
ewan-chalmers commented 5 years ago

d45063c9fac0a5124de99eb2b5c265e34bc523b3

ewan-chalmers commented 5 years ago

8 d