oh good, it uses ocktokit
https://github.com/jenkins-infra/incrementals-publisher/blob/master/lib/github.js
The code to use an app for ocktokit is pretty straight forward.
import { createAppAuth } from '@octokit/auth-app';
async function getRestClientUncached() {
const { data: installations } = await createAppAuth({
appId: config.github.appId,
privateKey: config.github.privateKey,
}).hook(githubRequest.defaults({
baseUrl: config.github.server,
}), 'GET /app/installations');
return new Octokit({
baseUrl: config.github.server,
request: {
hook: createAppAuth({
appId: config.github.appId,
privateKey: config.github.privateKey,
installationId: installations[0].id,
}).hook,
},
});
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3Biew8%2Be4_5%2B2Cd86-3UobTdhTkubHpst2mqgwebZ6oYCig%40mail.gmail.com.