gh-slack: Error: conversations.replies response not OK, missing required fields channel and ts

I started getting an error recently with the extension when I try to copy a Slack thread:

% gh slack https://my-slack-thingy.slack.com/archives/urlfoo
Error: conversations.replies response not OK: {"ok":false,"error":"invalid_arguments","response_metadata":{"messages":["[ERROR] missing required field: channel","[ERROR] missing required field: ts"]}}

I confirmed I’m on the latest version of the extension:

% gh extension upgrade gh-slack
[slack]: already up to date
✓ Successfully checked extension upgrades

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

I rolled back to the stable version of iTerm2, Build 3.5.10, and re-ran the gh slack api post conversations.replies command. No more duplicated lines. 😌

screenshot of terminal output with unique lines of text

to get a real ts value

Apologies if you already connected these dots and found it inconvenient, but to spell it out:

I just released a new version with https://github.com/rneatherway/gh-slack/pull/75 which you could also try upgrading to.

If you add:

extensions:
    slack:
        team: github

That’ll sort that problem (or you can pass -t github but that gets boring fast!).

Then to get the ts value from a thread URL take the last path component which is p123456789123456, drop the p and insert a . six characters from the end.