Skip to content

Commit

Permalink
Update README to include --details flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rneatherway committed Apr 8, 2024
1 parent 28ac545 commit 299963f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,42 @@ This project provides a means of archiving a Slack conversation or thread as mar

## Usage

Usage:
gh slack [command]

If no command is specified, the default is "read". The default command also requires a permalink argument <START> for the first message to fetch.
Use "gh slack read --help" for more information about the default command behaviour.

Examples:
gh slack -i <issue-url> <slack-permalink> # defaults to read command
gh slack read <slack-permalink>
gh slack read -i <issue-url> <slack-permalink>
gh slack send -m <message> -c <channel-name> -t <team-name>

# Example configuration (add to gh's configuration file at $HOME/.config/gh/config.yml):
extensions:
slack:
team: github
channel: ops
bot: hubot # Can be a user id (most reliable), bot profile name or username

Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
read Reads a Slack channel and outputs the messages as markdown
send Sends a message to a Slack channel

Flags:
-h, --help help for gh-slack
-v, --verbose Show verbose debug information

Use "gh slack [command] --help" for more information about a command.
```
Usage:
gh-slack [command]
If no command is specified, the default is "read". The default command also requires a permalink argument <START> for the first message to fetch.
Use "gh-slack read --help" for more information about the default command behaviour.
Examples:
gh-slack --details --issue <issue-url> <slack-permalink> # defaults to read command
gh-slack read <slack-permalink>
gh-slack read -i <issue-url> <slack-permalink>
gh-slack send -m <message> -c <channel-name> -t <team-name>
gh-slack api post chat.postMessage -b '{"channel":"123","blocks":[...]}
eval $(gh-slack auth -t <team-name>)
# Example configuration (add to gh's configuration file at $HOME/.config/gh/config.yml):
extensions:
slack:
team: foo
channel: ops
bot: robot # Can be a user id (most reliable), bot profile name or username
Available Commands:
api Send an API call to slack
auth Prints authentication information for the Slack API (treat output as secret)
completion Generate the autocompletion script for the specified shell
help Help about any command
read Reads a Slack channel and outputs the messages as markdown
send Sends a message to a Slack channel
Flags:
-h, --help help for gh-slack
-v, --verbose Show verbose debug information
Use "gh-slack [command] --help" for more information about a command.
```

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion cmd/gh-slack/cmd/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var readCmd = &cobra.Command{
return readSlack(args)
},
Example: ` gh-slack read <slack-permalink>
gh-slack read -i <issue-url> <slack-permalink>`,
gh-slack read --details --issue <issue-url> <slack-permalink>`,
}

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/gh-slack/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var rootCmd = &cobra.Command{
Use: "gh-slack [command]",
Short: "Command line tool for interacting with Slack through gh cli",
Long: `A command line tool for interacting with Slack through the gh cli.`,
Example: ` gh-slack -i <issue-url> <slack-permalink> # defaults to read command
Example: ` gh-slack --details --issue <issue-url> <slack-permalink> # defaults to read command
gh-slack read <slack-permalink>
gh-slack read -i <issue-url> <slack-permalink>
gh-slack send -m <message> -c <channel-name> -t <team-name>
Expand Down

0 comments on commit 299963f

Please sign in to comment.