This is a first draft of an external adaptor for a Chainlink Node that enables smart contracts to see if a PR has been merged in Github.
The Github API documentation can be found here: Pulls - GitHub Docs
If a PR has been merged then this external adaptor will return a 404
If a PR has NOT been merged then this external adaptor will return a 206
I know that is a bit confusing ;-)
owner
: The owner of the reporepo
: The name of the repopnumber
: The pull number for the PR
{"status":206,"result":23, "jobRunID": 23}
Install dependencies:
yarn
Natively run the application (defaults to port 8080):
yarn start
curl -X POST -H "content-type:application/json" "http://localhost:8080/" --data '{ "id": 0, "data": { "owner": "octocat", "repo": "hello-world", "pnumber": "42" } }'