Bug: Resource protected by organization SAML enforcement.
Flipez opened this issue · comments
I encounter the following issue:
Can't render template: template: tpl:15:8: executing "tpl" at <recentReleases 10>: error calling recentReleases: Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization.
I do not want to include non-public organization repositories to my readme and neither do I want to grant the token access to all of them.
Is there a way to workaround it? Seems like it should just ignore non-public/non-accessible repositories instead of raising an error?
PR's have the same issue, there is some notes here that might apply to releases as well https://gist.github.com/MichaelCurrin/f8a7a11451ce4ec055d41000c915b595
Markscribe seems to use the "default" approach from the gist I am not sure if that allows eg limiting to public repos.
Looking in the playground I seem to get the other 4 of 5 repos, and an error in this shape:
{
"type": "FORBIDDEN",
"path": [
"viewer",
"pullRequests",
"edges",
3
],
"extensions": {
"saml_failure": true
},
"locations": [
{
"line": 10,
"column": 7
}
],
"message": "Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization."
}
]
Doesn't look like the error type is exported to target by eg extensions.saml_failure=true
but could probably just continue if that message is encountered (would be 1 result short, could also force a "blocked by saml" stub in the result at appropriate spots).
For context I never had this problem with private repos in the org. But I did open a PR to a public fork of a tool in our org recently I suspect that is what broke it for me.
I actually think it might make sense just to continue on these errors since a partial response comes back (should get all non-SAML protected PRs still for example). Could write something to the log and anyone curious enough to see why it came up short can find out easy enough. Thoughts here @muesli ? Happy to open a PR.