GitHawk will let me edit labels in issues that I created but repos I don’t own

Created on 24 Oct 2017  ·  7Comments  ·  Source: GitHawkApp/GitHawk

GitHawk Upload by Sherlouk

I filed an issue in auth0/lock. GitHawk shows the option to edit the labels of the issue, but technically I can’t do that (don’t have permission because the repo isn’t mine)


Bug Report Dump (Auto-generated)

Version 1.12.0 (1079)
Device: iPad6,11 (iOS 11.0.2)
TestFlight: true

🐛 bug

All 7 comments

Ouch, that's confusing. Thanks for reporting 👍

Also, it “allows me” to lock the issue.

Sent with GitHawk

There is a check for self.object?.viewerCanUpdate before adding the "Edit Labels" cell. It seems like viewerCanUpdate is referring to updating the issue title and closing the issue/pr, but not updating labels, locking, and other collaborator permissions. I am not seeing an issue field in the docs related to collaborator permissions. Can maybe grab the repo collaborators and check if current user is one?

That would be super ugly and brittle though. Also costs a roundtrip to the server if we haven't done so at that point. 😐

Yeah, not sure what the best option is here. 😕
This is also worth mentioning: https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator

Ya I def don’t want to add another request if at all possible. I’ll poke around at ways to fix this. We’ve run into weird permissions issues before. Tho I think we fixed them with close actions, maybe just need to apply the same?

Sent with GitHawk

Updated this question to GitHub. There might be no other option than checking if the current user is a collaborator. I _really_ don't like having to do this. Also part of me starting to regret using their GQL API...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

weyert picture weyert  ·  3Comments

BasThomas picture BasThomas  ·  3Comments

rnystrom picture rnystrom  ·  3Comments

BasThomas picture BasThomas  ·  3Comments

rnystrom picture rnystrom  ·  3Comments