-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if supplied GitHub account has read and write access to the repository #15
Comments
Good point, right now Builda verifies access to the repository just by trying to read Pull Requests, which probably succeeded in your case. I guess I could try all the rights needed, by trying to create/delete a commit status and adding/deleting a comment on a PR. Or maybe there's a GitHub API call to verify rights of a token? |
A few tests with the repos GET endpoint make me confident that the part with permissions is the key here. "permissions": {
"admin": false,
"push": true,
"pull": true
} |
@mdio 👍 Yeah that's it exactly. Feel free to send a pull request with the change if you want, it'd mean adding a method to Thanks for taking the time to look up the API call! |
I'm afraid that I won't be able to implement that today and due to tomorrow being a public holiday I won't start before monday. |
No problem, I'll take a look at it over the weekend. |
We ran into a problem with our private repository and the GitHub user account used for Buildasaur had read only access to the repository.
Credential validation from Buildasaur was successful and Bots were created, integrations ran.
But posting the integration result to GitHub and adding the comment failed and it took us a while to figure out why.
It would be cool if Buildasaur could check for write access as well and at least warn that integration results cannot be published on GitHub without write access.
The text was updated successfully, but these errors were encountered: