Giter Site home page Giter Site logo

Comments (6)

ayusht2810 avatar ayusht2810 commented on July 20, 2024 1

@mickmister Regarding the approach for the above issue, we can implement the UserHasBeenDeactivated Hook, and whenever a user is deactivated, we can check for the subscriptions linked to the user, if any and delete the subscription. What are your thoughts on this approach, or do you have any other solutions for the approach?

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@ayusht2810 Yeah that sounds great 👍

@nilesingalls Are you wanting to also affect existing deactivated users? That would likely require SQL that we may be able to provide for this

from mattermost-plugin-github.

ayusht2810 avatar ayusht2810 commented on July 20, 2024

@mickmister Regarding the above issue, I misunderstood it and posted the wrong approach to it. Sorry for that.
I think the issue states that they don't want to receive the subscription for a user who is inactive on GitHub, as shown in the logs "query":"is:pr is:open review-requested:REDACTED archived:false ","userid":"REDACTED","github username":"REDACTED".
But I think the issue is arising from the function HasUnreads (which posts the user's GitHub todos in certain time interval)

query := getReviewSearchQuery(username, config.GitHubOrg)

This function is invoked from the /connected API, which is called at various places from the client, due to which we are getting the above issue.
Isn't deactivating the user from Mattermost server (as the user is also inactive from GitHub) a way to resolve or should we check if the user exist on GitHub and perform further actions?
What are your thoughts on this? Let me know if I am missing something here.

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@ayusht2810 Yeah it doesn't make much sense that these queries would be getting executed if the user is deactivated, and thus not logged into Mattermost. @nilesingalls Are you certain these particular errors are occurring for users that are deactivated from Mattermost?

from mattermost-plugin-github.

nilesingalls avatar nilesingalls commented on July 20, 2024

These are users who are active in our Mattermost instance but no longer have a github account associated to our github organization. Perhaps our use case is unique in that regard, but we split off a group of users into a separate company.

from mattermost-plugin-github.

mickmister avatar mickmister commented on July 20, 2024

@nilesingalls Thanks that makes sense. Are you able to have them each run /github disconnect?

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.