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)
- Feature Request: Subscribe to GitHub Action workflow failures HOT 4
- Feature Request: Subscribe to release events
- The message generated for the `/github subscriptions list ` slash command should show the excluded repositories (if present). HOT 2
- [Feature request] When linking to pull requests / issues on a private repository, show a preview instead of an error page
- this plugin is totally uselsss waste of time HOT 1
- Ephemeral message "Not able to get list of webhooks" after creating a subscription HOT 3
- `issue_creations` subscription with labels should support labeling an existing issue
- Issue/PR descriptions not showing in link tooltips
- Support excluding some users from subscription posts HOT 1
- Support excluding specific comment authors for issue comment subscriptions HOT 6
- For "Issue has been labeled" events, subscriptions do not respect the "render-style" flag for the post size
- Have "PR Merged" subscriptions support filtering labels, for an attached issue
- Subscription posts related to labels should contain a string like "with label x"
- Support `--include-only-org-members` for channel subscriptions HOT 2
- How to troubleshoot? HOT 8
- cleanup / removal of inactive users HOT 6
- Is it possible to make it work properly without setting up the github plugin? HOT 1
- Fix PR subscription error "You cannot update an existing Post" HOT 1
- Consider implementing subscriptions feature as a form/modal HOT 1
- How to remove GitHub integration in mattermost? HOT 8
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.