improve: Add hint about making GitHub org membership public in error messages (#772)

When users try to publish to a GitHub organization but don't have
permission, the error message now includes a helpful hint suggesting
they may need to make their organization membership public in GitHub
settings.

This addresses the issue where users couldn't understand why they were
unable to publish servers from organization repositories, even when they
were members of the organization.

Fixes #398

Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: adam jones <domdomegg@users.noreply.github.com>
This commit is contained in:
adam jones 2025-11-17 13:59:19 +00:00 • committed by GitHub
commit e7de7541c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,5 +84,10 @@ func buildPermissionErrorMessage(attemptedResource string, permissions []auth.Pe
}
errorMsg += ". Attempting to publish: " + attemptedResource
// Add helpful hint for GitHub organization publishing issues
if strings.HasPrefix(attemptedResource, "io.github.") {
errorMsg += ". If you're trying to publish to a GitHub organization, you may need to make your organization membership public in your GitHub settings: https://docs.github.com/en/account-and-profile/how-tos/organization-membership/publicizing-or-hiding-organization-membership"
}
return errorMsg
}