Can't access repo under an organization in GitHub app

:bullseye: What is your goal?

Trying to create an issue in GitHub

:thinking: What is the problem & what have you tried?

using a personal access token or oAuth, selecting a repo under an organization (rather than a GitHub user) throws an error.

:clipboard: Error messages or input/output bundles

200 Could not resolve to a User with the login of ‘NewPath-Consulting’

This was not really solved with an accurate answer in a previous topic (now closed) Trouble creating GitHub Issues in an organization repo I own (Make can’t see org repositories)

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hi @alex.newpath

The “Could not resolve to a User with the login of ‘NewPath-Consulting’” error is really the symptom. Make’s GitHub module is treating the owner as a user account when NewPath-Consulting is an organisation, and GitHub’s API differentiates those.
Here are some tips:
If you are using a fine grained personal access token (like it seems you are from the screenshot) be sure the token was generated at the organisation level, not just in your user account. Fine-grained access tokens must be granted access to the org explicitly, and the org owner may have to approve it. You can see that in your screenshot, the token has repository access to those 2 repo’s which is great, but double check that the token owner is allowed to create issues in that org.
Instead try to input the organisation name manually when choosing the repository owner in the Make module itself instead of selecting it from the dropdown. The dropdown sometimes only brings in personal accounts, and not orgs at all. Or switch to OAuth instead and be sure that you explicitly grant Make access to the organisation during the authorisation flow - GitHub presents a different pane for org access during OAUTH and you can easily overlook it. You might also need an organization administrator to approve the OAuth application within the organization settings.
If none of that works, the HTTP module which calls the GitHub API directly with your token is a solid fallback since that avoids whatever lookup issue Make’s native GitHub module is having with org accounts.

Good Luck.

I found the repository Id with the GitHub cli and manually entered it into the field. And that works. It is a problem with the app not properly calling the api rather than any permissions. It just doesn’t know how to iterate organizational repositories.

I tried all sorts of pat and oauth and even gave all permissions to the token via organization permissions. Also there is no such thing as a token at the organization settings. All tokens are under a user.

Okay great, and thanks for circling back with the actual fix. That confirms what I suspected, the dropdown lookup is the broken part, not your permissions. Manually entering the repo ID is the cleanest workaround until Make fixes how their GitHub app resolves organization owners. Worth flagging this as a bug report to Make support directly since the underlying issue isn’t something users can fix on their end, just work around.

Agreed. Not only that but using the github cli called gh is not something everyone knows how to do.

I sent the support request to make to see what they make of it. I haven’t heard back yet.

Make support has reproduced the issue so I assume it will be put on a backlog of fixes to the GitHub app.