Repository navigation
Sync "On a vacation" status to GitHub Busy status - #1064
Draft
devinbinnie wants to merge 3 commits into
Draft
devinbinnie wants to merge 3 commits into
devinbinnie wants to merge 3 commits into
Conversation
Opt-in per user via /github settings vacation-sync on|off (default off). Co-authored-by: Devin Binnie <devinbinnie@users.noreply.github.com>
Co-authored-by: Devin Binnie <devinbinnie@users.noreply.github.com>
Co-authored-by: Devin Binnie <devinbinnie@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in, per-user sync: when a user sets the "On a vacation" custom status (palm_tree emoji), their GitHub status is set to Busy so they aren't auto-assigned PRs. Setting any other custom status clears it.
/github settings vacation-sync on|off(autocomplete and help updated). Turning it on while already on vacation applies Busy immediately; turning it off clears it.PreferencesHaveChangedhook: the server saves the "recent custom statuses" preference on every custom status set, and element 0 is the new status. Other preferences are ignored.changeUserStatusGraphQL mutation (limitedAvailability).Known limitations:
PreferencesHaveChangeddoes not fire when a custom status is removed or expires, so Busy is not cleared in those cases until another status is set or the user runs/github settings vacation-sync off.userscope, which this PR adds to the requested scopes. Already-connected users must reconnect.Tests: hook behavior (set, clear, ignore unrelated/disabled, GitHub failure) against an httptest GraphQL server, plus the settings command.