Comments (6)
Knowing that, what happens is:
- Github plugin configured with "gabu9" and GabuTest org, but account connected is "hector2": it will check, with hector2 credentials, if hector2 is blocked from "GabuTest" org, getting 404 (Not blocked).
So I think there is no way of knowing it a priori. We would know if it is blocked after trying to create the issue comment.Any ideas?
@hector2 Hmmmm. Interesting problem.
I think returning a genericized message may be the best we can do: Sorry, either you don't have access to the repo {REPO_NAME} with the user {GITHUB_AUTHED_USERNAME} or it is no longer available (404)
Does that cover the situation appropriately?
from mattermost-plugin-github.
Hello! Can i work on this issue?
from mattermost-plugin-github.
@hector2 Absolutely, let me know if you have any questions at all!
Removing "Up for Grabs" label for you.
from mattermost-plugin-github.
Hello @aaronrothschild !
I managed to check if the issue has locked the conversation. However, there is a problem checking if the user is blocked from the organization.
I created an organization called "GabuTest", and the owner is "gabu9". In this organization, I blocked myself (hector2).
If I check if the user is blocked (using gabu9 credentials):
curl -u "gabu9" -H "Accept: application/vnd.github.giant-sentry-fist-preview+json" https://api.github.com/orgs/GabuTest/blocks/hector2
The response is 204, it means it is blocked.
However, if I do:
curl -u "hector2" -H "Accept: application/vnd.github.giant-sentry-fist-preview+json" https://api.github.com/orgs/GabuTest/blocks/hector2
The response is 404, I guess because the user itself can't see if it is blocked on an organization.
Knowing that, what happens is:
- Github plugin configured with "gabu9" and GabuTest org, but account connected is "hector2": it will check, with hector2 credentials, if hector2 is blocked from "GabuTest" org, getting 404 (Not blocked).
So I think there is no way of knowing it a priori. We would know if it is blocked after trying to create the issue comment.
Any ideas?
from mattermost-plugin-github.
@aaronrothschild I tried creating an issue comment in a blocked org repo, and the response was "403 Forbidden" so we could even identify more accurately the problem and say something like "The issue is locked for comments/You don't have permissions to do that action" if you prefer.
from mattermost-plugin-github.
@hector2 Excellent. the more explicit the error message, the better IMO. I would prefer that message.
from mattermost-plugin-github.
Related Issues (20)
- Mentioned Pull Panel Available HOT 6
- Include explanation of `/setup` command in README HOT 2
- `Unable to find manifest for extracted plugin` when using `make deploy` HOT 1
- [Request] Ability to hide entries (especially PRs) from daily summary
- Improve performance of Create Issue modal repository selector HOT 3
- Code previews only work for commit hashes, not for branches
- [Enhancement Proposal] Delaying Draft Pull Request Notifications until Marked as 'Ready for Review' HOT 4
- Pull Request Reviews are not posted. HOT 1
- Code in Pull Request code blocks is broken on Mattermost
- unusable links in plugin messages HOT 2
- User not receiving DM notifications. Had to manually run `notifications on` slash command to re-enable HOT 2
- Mattermost Github Plugin will not start HOT 4
- No pr review notifications if my team was assigned as reviewer
- Creating a test issue for GitHub board.
- Explain in docs not to fill out the `Enterprise Base URL` config setting if the GH Enterprise instance is hosted on GitHub's domain HOT 2
- Clarify subscribe message when there is no webhook found
- Subscriptions not creating posts for reopening PRs
- Push events: option to show commit author instead of committer HOT 6
- Feature Request: Subscribe to GitHub Action workflow failures HOT 4
- Feature Request: Subscribe to release events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost-plugin-github.