Thanks for the info on user-to-server vs server-to-server. This is running as a daily task on a server. I assume user-to-server requests will involve per-session user action (approving access via OAuth URL) so it doesn't look like I'll be able to use the page build endpoint. EDIT: I now have the page build endpoint working by using 'basic' authentication in octokit where I can explicitly specify username/pass for my primary account so the page build is requested using the user account credentials rather than the installation token.
... View more
I'm attempting to set up a GitHub App that checks in a new resource file and triggers a GitHub Pages build so that the new resource is available via the site. I'm trying to trigger a Pages build manually (as it does not trigger directly on check-in by the GitHub App) with the GitHup App authorization via this endpoint: https://developer.github.com/v3/repos/pages/#request-a-page-build I have the file check in working fine with an installation token so the authorization is solid but I am getting "Resource not accessible by integration" back when I attempt to request a new page build. The GitHub App has access to the repository with permissions (Write access to code, Read and write access to pages) and it appears that the pages build API endpoint is enabled for use by GitHub Apps so I'm not clear on why it is returning this error. This is all being done with @octokit/rest (https://www.npmjs.com/package/@octokit/rest). Using its debug logging I have verified that the URL/method and the accept header are correct. method: 'post',
authorization: 'token v1.snip',
'user-agent': 'octokit.js/15.15.1 Node.js/10.12.0 (Linux 4.9; x64)'
... View more