Merged
Conversation
Add `tw away` command to manage user away status via the Twist API. Supports setting away type (vacation, parental, sickleave, other) with date ranges, viewing current status, and clearing it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Required by the Twist API to call POST /api/v3/users/update. Existing users will need to re-authenticate with `tw auth login`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
This PR introduces the new tw away command, allowing users to conveniently view, set, and clear their away status. The implementation integrates well with existing command patterns and includes solid test coverage. A few minor adjustments are needed to ensure dates are formatted using local timezones rather than UTC, and to accurately reflect in the tests that null is sent when clearing the status.
- Use local date getters instead of toISOString() to avoid UTC timezone issues when computing today/tomorrow dates - Send null (not undefined) when clearing away status so the backend correctly clears the field Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Twist API accepts an empty string (not null) to clear the away_mode field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a helpful message when users get a 403 due to missing OAuth scopes, prompting them to re-authenticate with `tw auth login`. Also fix the help usage line to show positional args before options and update examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
scottlovegrove
approved these changes
Mar 12, 2026
Collaborator
|
Nice addition @lmjabreu 👍🏻 |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
# [2.11.0](v2.10.0...v2.11.0) (2026-03-12) ### Features * add away status command ([#79](#79)) ([9fd71e7](9fd71e7))
|
🎉 This PR is included in version 2.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
tw awaycommand to view, set, and clear user away status--json,--full, and--dry-runflags following existing patternsawayModeto user essential fields and updates skill documentationuser:writeto the OAuth scopesTest plan
npm run type-checkpassesnpm run buildcompiles cleanlynode dist/index.js away --helpshows correct subcommandstw away set vacation 2026-03-20sets statustw awayshows current statustw away clearclears status🤖 Generated with Claude Code