headscale
headscale copied to clipboard
Standardize user identification flags across CLI commands - fix for #2631
This PR replaces inconsistent -u/--user arguments with the standard --identifier/--name flags for user identification. Previously, some commands used --user to accept either a user ID (uint) or username (string), creating confusion and inconsistent behavior. This change provides a more explicit and predictable interface for specifying users throughout the CLI.
- [x] have read the CONTRIBUTING.md file
- [x] raised a GitHub issue or discussed it on the projects chat beforehand
- [x] added unit tests
- [x] added integration tests
- [ ] updated documentation if #needed
- [ ] updated CHANGELOG.md
Issue ref: #2631
Pull Request Revisions
| Revision | Description |
|---|---|
| r2 | CLI flags renamed and refactoredRenamed CLI flags across multiple commands, changing from--name to --user and --identifier to --node-id, with associated logic updates |
| r1 | Refactored CLI user identification flagsIntroduced a new helper functionfindSingleUser and standardized user identification flags across multiple CLI commands, replacing deprecated namespace flags with consistent username and ID flags. |
☑️ AI review skipped for r2
Help
React with emojis to give feedback on AI-generated reviews:- 👍 means the feedback was helpful and actionable
- 👎 means the feedback was incorrect or unhelpful
We'd love to hear from you—reach out anytime at [email protected].