Giter Site home page Giter Site logo

Comments (13)

Kshitij-Katiyar avatar Kshitij-Katiyar commented on July 20, 2024 1

@mickmister I was looking at the code, There is a field in plugin config struct EnableWebhookEventLogging, which basically dumps the webhook event to the logs. But some for reason this plugin setting is not present in the settings schema in the plugin.json file. That's why it is not present in the UI of the plugin configuration. I think that setting could be beneficial here as we can check all about the webhook events from the logs on the mattermost side.
https://github.com/mattermost/mattermost-plugin-jira/blob/dea71eb0e977151b0c94932a6e1895e95590c414/server/plugin.go#L80

from mattermost-plugin-github.

alexander-potemkin avatar alexander-potemkin commented on July 20, 2024

Not sure what is different, but since I re-setup everything once again, I'm not getting the following error:

{
  "caller": "app/plugin_api.go:1006",
  "error": "GET https://api.github.com/repos/myorg/api-server: 404 Not Found []",
  "level": "warn",
  "msg": "Failed fetch repository to check permission",
  "plugin_id": "github",
  "timestamp": "2024-02-23 12:57:58.648 Z"
}

Any ideas what could it be? And how do I troubleshoot this?

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

Hi @alexander-potemkin, apologies for the late response. Were you able to resolve this?

Is this repository you had an issue with there a private repository? GitHub will return a 404 like this if the user doesn't have access to the repository, or if the repository is spelled incorrectly.

from mattermost-plugin-github.

alexander-potemkin avatar alexander-potemkin commented on July 20, 2024

@mickmister , no, not really... Thanks for letting me know.

Repo name has been copy-pasted and I'm trying to access from my account, which surely has access to the repos (since I'm the owner).

I've spend some time trying to troubleshoot this, but it seems like I don't have that many tools for that - is there something you can help me with?

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@alexander-potemkin So the plugin allows you to create a subscription, but the webhook events don't work? Do other features of the plugin work, like creating issues?

@Kshitij-Katiyar Do you have any ideas on what can be done to troubleshoot here?

from mattermost-plugin-github.

alexander-potemkin avatar alexander-potemkin commented on July 20, 2024

@mickmister , that's right.

We don't use issues and etc. - so I can't even comment on that... Happy to execute any command required and revert back with results, thought!

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@alexander-potemkin Are you able to try in different Mattermost environment?

If you've verified the webhook request is being received, and there are no debug logs for any errors or issues with the request, it's possible the event configuration on the webhook may be incorrect?

and I can even see mattermost server webhook extension DEBUG logging that it received webhook.

Can you verify that the request is logged when you perform a user action in GitHub that you want to capture? e.g. Creating an issue in GitHub, and see if you Mattermost server received the request for that

from mattermost-plugin-github.

Kshitij-Katiyar avatar Kshitij-Katiyar commented on July 20, 2024

@alexander-potemkin While creating the webhook, have you selected Content Type: application/json in the subscription you have created, and the event you are doing on GitHub should be the same as if your subscription has a pull_request attribute, then this will accept open/closing of the pull_request. And you check that when you have closed a pull_request, the event is being sent by the webhook on GitHub or not.

from mattermost-plugin-github.

alexander-potemkin avatar alexander-potemkin commented on July 20, 2024

@Kshitij-Katiyar , @mickmister , thank you very much for all your suggestions!
It's definetely application/json - I can see at GitHub side deliveries's headers to contain Content-Type: application/json.
We don't normally use pull requests - just direct commits to the main branch; github is full of the events being delivered to my server, the responce is 200, but nothing on Mattermost side... And I don't know how to debug that part - how do I see that particular even on Mattermost server?

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@alexander-potemkin Are you able to edit your server's configuration file? If so, can you try putting this in your configuration?

At PluginSettings.Plugins.github:

{
    "enablewebhookeventlogging": false,
    // ... other fields
}

@alexander-potemkin Are you able to run /github subscriptions list and provide what features are being used in your subscription?

from mattermost-plugin-github.

alexander-potemkin avatar alexander-potemkin commented on July 20, 2024

@mickmister , sure - done - please, see attached.

Screenshot 2024-06-24 at 23 31 33 Screenshot 2024-06-24 at 23 33 27

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

We don't normally use pull requests - just direct commits to the main branch; github is full of the events being delivered to my server, the responce is 200, but nothing on Mattermost side.

I see pushes is in the subscription 👍

@alexander-potemkin Are you able to enable webhook logging and test what's coming in for commit events? Also have you verified the webhook is configured to send commit events? Thanks @alexander-potemkin

from mattermost-plugin-github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.