-
Notifications
You must be signed in to change notification settings - Fork 24
fix: update broken URL in the hooks.json error message #3
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -806,9 +806,13 @@ Otherwise start your app for local development with: %s`, | |||
| }, | ||||
|
|
||||
| ErrInvalidAppDirectory: { | ||||
| Code: ErrInvalidAppDirectory, | ||||
| Message: "This is an invalid Slack app project directory", | ||||
| Remediation: fmt.Sprintf("A valid Slack project includes the Slack hooks file: %s", filepath.Join(".slack", "hooks.json")), | ||||
| Code: ErrInvalidAppDirectory, | ||||
| Message: "This is an invalid Slack app project directory", | ||||
| Remediation: strings.Join([]string{ | ||||
| fmt.Sprintf("A valid Slack project includes the Slack hooks file: %s", filepath.Join(".slack", "hooks.json")), | ||||
| "", | ||||
| "If this is a Slack project, you can initialize it with " + style.Commandf("init", false), | ||||
| }, "\n"), | ||||
| }, | ||||
|
|
||||
| ErrInvalidAppFlag: { | ||||
|
|
@@ -1292,12 +1296,16 @@ Otherwise start your app for local development with: %s`, | |||
| Code: ErrSDKHookNotFound, | ||||
| Message: fmt.Sprintf("A script in %s was not found", style.Highlight(filepath.Join(".slack", "hooks.json"))), | ||||
| Remediation: strings.Join([]string{ | ||||
| fmt.Sprintf("Hook scripts are defined in the Slack hooks file ('%s').", filepath.Join(".slack", "hooks.json")), | ||||
| "Every app requires a Slack hooks file and you can find a working example at:", | ||||
| "Hook scripts are defined in one of these Slack hooks files:", | ||||
| "- slack.json", | ||||
| "- " + filepath.Join(".slack", "hooks.json"), | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 Love the |
||||
| "", | ||||
| "Every app requires a Slack hooks file and you can find an example at:", | ||||
| style.Highlight("https://github.com/slack-samples/deno-starter-template/blob/main/slack.json"), | ||||
| "", | ||||
| style.Highlight("https://github.com/slack-samples/deno-starter-template/blob/main/.slack/hooks.json"), | ||||
| "You can create a hooks file manually or with the " + style.Commandf("init", false) + " command.", | ||||
| "", | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Nit: IMO newlines between some of these details separates some related ideas, but these might be helpful for parsing outputs... 👁️🗨️ No blocker but removing some might be interesting!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hear ya on too much separation, but I think it's important to leave a newline after a URL when possible. Depending on the person's terminal, the URL may not be styled and may wrap to multiple lines. So, leaving some whitespace after the URL can help it stand out and make the entire sentence more readable. For example, here is a smaller window size. I've merged the previous suggestion to remove the whitespace before the URL. However, if we removed the whitespace after, it will become very unreadable: |
||||
| "After creating the hooks file, you must install related hook dependencies.", | ||||
| "When manually creating the hooks file, you must install the hook dependencies.", | ||||
| }, "\n"), | ||||
| }, | ||||
|
|
||||
|
|
||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the wording to the reader! I made a similar line removal here with some adjusted words, but might want to discuss the extra line more. Without having a similar suggestion heading this feels somewhat out of place to me...
Not meaning to block this from merging but am also hoping to lean into fewer linebreaks in output overall? It's at least interesting to me.