otto8-ai / otto8

Open source AI Agent Platform
Apache License 2.0
12 stars 9 forks source link

Github tool - Not able to get comments for Issues/PRs for private github repos. Also not able to list private repos . #174

Open sangee2004 opened 1 month ago

sangee2004 commented 1 month ago

Using our github tool, I am able to list issues but not list comments for an issue for http://github.com/otto8-ai/otto8/ repo. I get this error .

I am unable to access the comments for this issue due to OAuth App access restrictions set by the otto8-ai organization. You may need to view the comments directly on GitHub or adjust the repository's access settings.

Same behavior is also seen with PRs. Able to list them, but not get details/comments. List repos also does not list private repos.

Note - This issue is seen only for this repo which is private. I am able to get comments for Issues/PRs from other public repos.

drpebcak commented 2 weeks ago

The error message there is pretty descriptive of the issue - the otto8-ai org has the default configuration, which is to restrict access to data in the org from third-party applications. If you go through the OAuth flow from scratch there is a way to request access per org, and then an admin can approve it, but GPTScript/Otto does not provide a way to trigger that after the initial handshake.

GitHub provides a way to request it after the fact, but it's a little buried in the settings pages.

drpebcak commented 2 weeks ago

I'm not sure if we would want to actually change much here or not. The only things we could do are:

  1. add some context to the tool so that this error contains more info about changing either the org restrictions or requesting access
  2. create a flow in otto8/gptscript that would allow for reprompting the initial oauth flow so that we could show github's ui for requesting access to the user directly.

I think option 2 ties in to the google drive issues, with them wanting us to use the limited scope that requires a file picker.