Skip to content

General update to slack schema validation - #17

Open
AlexNeises wants to merge 1 commit into
DataDog:mainfrom
AlexNeises:feature/slack-regex
Open

General update to slack schema validation#17
AlexNeises wants to merge 1 commit into
DataDog:mainfrom
AlexNeises:feature/slack-regex

Conversation

@AlexNeises

Copy link
Copy Markdown

Updated slack schema to escape first period correctly, and added a check to open a slack channel directly from the link

…eck to open a slack channel directly from the link
"properties": {
"contact": {
"pattern": "https:\/\/[a-zA-Z0-9_\\-]+.slack\\.com\/archives\/[a-zA-Z0-9_\\-]+"
"pattern": "https:\/\/[a-zA-Z0-9_\\-]+\\.slack\\.com\/archives\/[a-zA-Z0-9_\\-]+|slack:\/\/channel\\?team=[a-zA-Z0-9]+&id=[a-zA-Z0-9]+"

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.

can you provide some examples? thanks.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The original pattern, https:\/\/[a-zA-Z0-9_\\-]+.slack\\.com\/archives\/[a-zA-Z0-9_\\-]+, would match, for example, the following:
https://company-nameslack.com/archives/ABCDEFG123
The addition, https:\/\/[a-zA-Z0-9_\\-]+\\.slack\\.com\/archives\/[a-zA-Z0-9_\\-]+, would confirm the .slack.com:
https://company-name.slack.com/archives/ABCDEFG123

The slack://channel pattern was one I was utilizing before I realized that copying a link to the channel would generate the archives domain, if you would like, I can update the request with it removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants