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

General update to slack schema validation #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexNeises
Copy link

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
@@ -202,7 +202,7 @@
"then": {
"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
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
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