Skip to content
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

Tag names must start with a letter after 'tag:' and contain letters, … #342

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

noconnor29
Copy link
Contributor

Tag names must start with a letter after 'tag:' and contain letters, numbers, or dashes

Proposed Changes

I wanted to apply "tag:home-automation" to my HomeAssistant. This generated a regex validation error while "tag:h-omeautomation" was accepted. I didn't find Tailscale's regex for tags so I'm proposing a revision to accept multiple hyphens and in multiple locations. Tested against example tags in Common Patterns for Tag Names

Tested combinations to find Tailscale requires tags start with a letter and are composed of letters, numbers and dashes. Tags can be a single letter, e.g. "tag:a", and can end in a dash.

Related Issues

Commit 448b965

@lmagyar
Copy link
Contributor

lmagyar commented Mar 30, 2024

Tailscale validates tags with code (tailCfg.CheckTag): https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L589

And that is equivalent with this new regex. 👍

@noconnor29
Copy link
Contributor Author

Tailscale validates tags with code (tailCfg.CheckTag): https://github.com/tailscale/tailscale/blob/main/tailcfg/tailcfg.go#L589

Good find! I swear I tried searching on the error messages in their repo but clearly didn't get the job done.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @noconnor29 👍

../Frenck

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Apr 22, 2024
@frenck frenck merged commit f4153f3 into hassio-addons:main Apr 22, 2024
11 of 12 checks passed
@noconnor29
Copy link
Contributor Author

Great. Thank you both for you work maintaining this repository.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants