question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support all available endpoints for Github App with preview request

See original GitHub issue

Not able to access all available endpoints with Github App. Only certain endpoints that are accessible because they have this custom media type set internally.

According to this doc, accessing the Github API with Github App requires custom media type application/vnd.github.machine-man-preview+json. Currently, there isn’t a way to set this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
timjacommented, Jan 25, 2020

I’m looking at adding GitHub app support to the github-branch-source-plugin. I have it working hardcoding the Oauth token so this will be very helpful.

Sorry to hijack the thread, but I’m very interested by this @timja (and have Jenkins act as a GitHub app to read repos / update status). Let me know if / how I can help.

@ojacques I finally got back to this, there’s a functional PR here: https://github.com/jenkinsci/github-branch-source-plugin/pull/269 Still needs a bit more work and a github-api-plugin release

1reaction
timjacommented, Dec 5, 2019

I’m looking at adding GitHub app support to the github-branch-source-plugin. I have it working hardcoding the Oauth token so this will be very helpful.

Sorry to hijack the thread, but I’m very interested by this @timja (and have Jenkins act as a GitHub app to read repos / update status). Let me know if / how I can help.

I got distracted from this and haven’t got back to it recently, I’ll try get back to it next week otherwise there’s a branch here: https://github.com/jenkinsci/github-branch-source-plugin/compare/master...timja:github-app-support?expand=1

It needs docs, tests and adjusting the api it calls to check whether the token is valid, currently it tries to retrieve the current user’s details which doesn’t work for a github app. It’s quite a nice check though as you can show in the UI “authenticated as timja-bot”

But the code does work as is, (or at least it worked before I just merged master and bumped to the latest release of github-api)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support all available endpoints for Github App with preview ...
I'm trying to create a pull request using installation token, which is expose via a GHRepository instance. It does not work because GET...
Read more >
Endpoints available for GitHub Apps
Your app can make requests to the following REST endpoints. ... Endpoints available for GitHub Apps. Your app can make requests to the...
Read more >
Endpoints available for GitHub Apps / Accessing API ...
I am trying to create a GitHub App that will create a new repository for users that install the GitHub App on their...
Read more >
REST endpoints for the GitHub Marketplace API
To help manage your app on GitHub Marketplace, use these GitHub Marketplace API endpoints. Here are some useful endpoints available for Marketplace listings:....
Read more >
Permissions required for GitHub Apps
You can find the required permissions for each GitHub App-compatible endpoint. About GitHub App permissions. GitHub Apps are created with a set of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found