-
Notifications
You must be signed in to change notification settings - Fork 150
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
Code Previews not working with private repos #522
Comments
Hi @tuxity, Did you enable code previews for public and private repositories in the plugins settings? |
Yes it is enable. |
To which options is the setting set? |
to "Enable for public and private repositories. This might leak confidential code into public channels." |
I can't reproduce the issue.
|
I tried to put the server in debug mode and there is no error in logs I also tried to disable and enable the plugin again, the plugin is not restricted to an organisation Should I try to reinstall the plugin ? I will have to resetup every subscriptions in channels ? |
Yes, that is indeed the expected behavior currently. mattermost-plugin-github/server/plugin/permalinks.go Lines 96 to 100 in 40e7fcf
But I'm wondering if the plugin should support links to branches and tags. On caveat is that the content might change in the future and it's hard to keep the message in sync. So it would be a snapshot of the content at the time the message is posted. @agnivade Do you have thoughts on this ideas, as you originally implemented the feature? |
This feature is primarily supposed to work with permalinks, not with regular links. The original implementation mainly mirrored GitHub's permalink preview implementation. And as you can see from above, GitHub will also only expand permalinks, not all kinds of links. This usually applies to all kinds of permalink previews - they are tied to a single id/hash. And not something that can change. Otherwise, this becomes a link preview, not permalink preview. We could do that of course, but then we deviate from the usual accepted standard. As a first step, I'd suggest to document this more prominently, and how to capture and share permalinks, not regular links. And to clarify, this has no relation to the type of repo - public/private. It only expands permalinks. |
Made this a Help Wanted documentation ticket |
Hello,
I can't get code preview in any channels when I link a file from a private repo. I have no error messages when I set MM server to debug mode. It just send default Github public link metadata.
Mattermost Server team edition version 6.2.1
Github plugin 2.0.1
Code Previews
enabled for public and private repositories in Github plugin configurationConnected via
/github connect private
Tested with a Dockerfile from a public and private repos
I tested reconnecting account to GH, disabling/enabling Code Preview
I don't know if I'm missing something, tell me if you need more information.
The text was updated successfully, but these errors were encountered: