Skip to content

add a RANDOM_UUID snippet variable - #113826

Merged
Johannes Rieken (jrieken) merged 2 commits into
microsoft:masterfrom
nrayburn-tech:issue-109438
Jan 7, 2021
Merged

Johannes Rieken (jrieken) merged 2 commits into
microsoft:masterfrom
nrayburn-tech:issue-109438

Conversation

@nrayburn-tech

Copy link
Copy Markdown
Contributor

Adds a RANDOM_UUID snippet variable.

I kept it as generic UUID instead of specifying a version because I wasn't sure if there was any guarantee that the generateUuid function will always return a v4 uuid. I also wasn't sure how important it would be to users that it is v4 instead of any other version.

To test,
Build the branch
Add a new user snippet using the RANDOM_UUID variable
Insert the snippet and see that a UUID is inserted correctly.

This PR fixes #109438

'WORKSPACE_FOLDER': true,
'RANDOM': true,
'RANDOM_HEX': true,
'RANDOM_UUID': true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since they are always random a better name might be just UUID

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@jrieken Johannes Rieken (jrieken) added this to the January 2021 milestone Jan 6, 2021

@jrieken Johannes Rieken (jrieken) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@jrieken
Johannes Rieken (jrieken) merged commit a4f9970 into microsoft:master Jan 7, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New snippet variable: UUID_V4 (generate a random UUID)

3 participants