Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rneatherway/gh-slack
Utility for archiving a slack conversation as markdown
https://github.com/rneatherway/gh-slack
gh-extension
Last synced: 3 months ago
JSON representation
Utility for archiving a slack conversation as markdown
- Host: GitHub
- URL: https://github.com/rneatherway/gh-slack
- Owner: rneatherway
- License: mit
- Created: 2022-03-22T18:33:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T07:04:56.000Z (10 months ago)
- Last Synced: 2024-04-13T13:08:44.308Z (10 months ago)
- Topics: gh-extension
- Language: Go
- Homepage:
- Size: 6.98 MB
- Stars: 138
- Watchers: 3
- Forks: 19
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - rneatherway/gh-slack - Utility for archiving a slack conversation as markdown (Go)
README
# gh-slack
[![CI](https://github.com/rneatherway/gh-slack/actions/workflows/ci.yml/badge.svg)](https://github.com/rneatherway/gh-slack/actions/workflows/ci.yml) [![Release](https://github.com/rneatherway/gh-slack/actions/workflows/release.yml/badge.svg)](https://github.com/rneatherway/gh-slack/actions/workflows/release.yml)
This project provides a means of archiving a Slack conversation or thread as markdown. For convenience it is installable as a [`gh`](https://github.com/cli/cli) [extension]([url](https://cli.github.com/manual/gh_extension)).
## Installation
gh extension install https://github.com/rneatherway/gh-slack
## Upgrading
gh extension upgrade gh-slack
## Usage
```
Usage:
gh-slack [command]If no command is specified, the default is "read". The default command also requires a permalink argument for the first message to fetch.
Use "gh-slack read --help" for more information about the default command behaviour.Examples:
gh-slack --details --issue # defaults to read command
gh-slack read
gh-slack read -i
gh-slack send -m -c -t
gh-slack api post chat.postMessage -b '{"channel":"123","blocks":[...]}
eval $(gh-slack auth -t )
# 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 usernameAvailable 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 channelFlags:
-h, --help help for gh-slack
-v, --verbose Show verbose debug informationUse "gh-slack [command] --help" for more information about a command.
```## Configuration
The `send` subcommand supports storing default values for the `team`, `bot` and
`channel` required parameters in gh's own configuration file using a block like:```yaml
extensions:
slack:
team: foo
channel: ops
bot: robot # Can be a user id (most reliable), bot profile name or username
```This is particularly useful if you want to use the `send` subcommand to interact
with a bot serving chatops in a standard operations channel.## Limitations
Many and varied, but at least:
* No paging is used when fetching messages, so if the conversation is too long the output will be truncated.
## Development
To release a new version, simply tag it. The `goreleaser` workflow will take care of the rest. E.g:
git tag 0.0.6
git push origin 0.0.6