slackapi / slackapi/slack-cli

bug: --apihost flag limitations

Open
#129 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
305
Forks
46
Avg merge
1d 11h
Merged PRs (30d)
23

Description

Description

The --apihost flag is mainly used by the maintainers of this project to test various use cases. Using it as follows --apihost=api.shhhh.slack.com mostly works as expected. But when combine with the deploy command having the api domain prefix breaks the logic that sets the SLACK_API_URL environment variable

Version
Using lack v3.3.0
OS Info
ProductName:            macOS
ProductVersion:         15.5
BuildVersion:           24F74
Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
Steps to reproduce:

Share the commands to run, source code, and project settings:

  1. Create an app
  2. Use commands with the --apihost flag set to a value prefixed with api.
    a. everything should work as expected
  3. Use slack deploy --apihost=api.your.test.endpoint -vv
  4. No error is raised and no trace of a request to set the SLACK_API_URL environment variable can be found
  5. If the flag value is set without the api prefix the SLACK_API_URL environment variable is set and things work as expected
Expected result:

If the apihost value is rejected the CLI expects then we should inform the user

Actual result:

Nothing indicates that the apihost value is rejected by the CLI

Requirements
  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing slack deploy --apihost=api.your.test.endpoint -vv and trace the deploy command's --apihost handling and SLACK_API_URL setup. Done means the CLI either handles the api. prefix correctly or clearly informs the user that the value is rejected; verify the behavior with and without that prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.