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
hotfix: check permission when closing issue #622
hotfix: check permission when closing issue #622
Conversation
✅ Deploy Preview for ubiquibot-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
It's really annoying that GitHub won't let me merge because I am the last person to commit even as an admin lol @wannacfuture can you approve my commit so we can merge? |
haha also Github is preventing approval from the pr's author about any commits on it. 😂 |
Co-authored-by: whilefoo <139262667+whilefoo@users.noreply.github.com>
Co-authored-by: whilefoo <139262667+whilefoo@users.noreply.github.com>
@0xcodercrane , @whilefoo Or... should I use axios call instead of octokit? |
My intuition would say to typecast it. Otherwise we might need to axios it and heavily comment/explain the situation in the code which seems messy |
Maybe you can make a comment like in octokit issue: // @ts-expect-error This looks like a bug in octokit. (https://github.com/octokit/rest.js/issues/188)
return res.status === 204 |
…re/ubiquibot into feat/check-permission
done. ready for review. |
Co-authored-by: whilefoo <139262667+whilefoo@users.noreply.github.com>
@@ -33,6 +34,10 @@ export const handleIssueClosed = async () => { | |||
|
|||
if (!issue) return; | |||
|
|||
const userHasPermission = await checkUserPermissionForRepoAndOrg(payload.sender.login, context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found an issue testing it out.
This is not implemented correctly because I'm an admin of the ubiquibot
organization @wannacfuture please review
Hotfix.
QA: https://github.com/wannacfuture/Battleship/issues/83#issuecomment-1680710486