Basic examples of nodejs/GitHub App usage?

I want to update the commit message depending on a jenkins build outcome.

Is this the right way to do it?: https://octokit.github.io/rest.js/#api-Checks-update

Where can I read more, see  basic exampels? Nodejs exampels…

Thanks!