-
Notifications
You must be signed in to change notification settings - Fork 163
#866 Set user as Busy in GitHub when status in Mattermost is OOO #940
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
base: master
Are you sure you want to change the base?
Conversation
Adds a feature to automatically sync a user's Mattermost "Out of Office" status to their GitHub status. When a user sets their status to "Out of Office" in Mattermost, their GitHub status will be set to "Busy" with the message "Out of office". When the user's status is no longer "Out of Office", their original GitHub status will be restored. This is implemented using the `UserStatusHasChanged` hook in the Mattermost plugin API and the `changeUserStatus` GraphQL mutation in the GitHub API. The user's original GitHub status is stored in the plugin's key-value store.
|
Hello @akshat-khosya, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project. Please help complete the Mattermost contribution license agreement? This is a standard procedure for many open source projects. Please let us know if you have any questions. We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team. |
|
/check-cla |
|
As a user I would absolutely NOT want this behavior. If this gets merged I hope it will be configurable and off by default. |
wiggin77
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @akshat-khosya! This is a nice feature. A few things to fix but overall looks great. Also you'll need to run "gofmt" on the files.
|
@akshat-khosya one other consideration. Can this be opted in for users? Not everyone will want their statuses sync'd. |
Thanks for the feedback @ThiefMaster. I agree, this will be opt-in. |
nevyangelova
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @akshat-khosya !
- Add EnableStatusSync config option (opt-in, default: false) - Check if GitHub status is already busy before overwriting - Clear stored GitHub status from KV store on account disconnect - Fix misleading post type name (remove "ephemeral") - Add error wrapping for better traceability in GraphQL client - Format code with gofmt Addresses feedback from reviewers: - System-wide opt-in configuration - Respects manually set GitHub OOO statuses - Proper cleanup on disconnect - Improved error messages
90e2d1d to
921e60d
Compare
|
/check-cla |
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
@akshat-khosya I see the feature can be enabled/disabled by an admin, but there is no way for users to opt-in. Everyone gets sync'd or nobody. @marianunez @nevyangelova thoughts on this? |
Summary
Adds a feature to automatically sync a user's Mattermost "Out of Office" status to their GitHub status.
When a user sets their status to "Out of Office" in Mattermost, their GitHub status will be set to "Busy" with the message "Out of office". When the user's status is no longer "Out of Office", their original GitHub status will be restored.
This is implemented using the
UserStatusHasChangedhook in the Mattermost plugin API and thechangeUserStatusGraphQL mutation in the GitHub API. The user's original GitHub status is stored in the plugin's key-value store.Ticket Link
#866