Show the custom apihost SLACK_API_URL hint only where Run on Slack apps need it

未關閉
#894 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
55/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
go
領域
cli

研究方向

Start with ResolveAPIHost in internal/auth/auth.go and the deploy flow in internal/pkg/platform/deploy.go; trace where the host is resolved and whether SLACK_API_URL is added. Check how env and run handle Run on Slack apps before deciding whether they also need the hint. Done when the hint appears only in relevant cases, includes the full command and /api/, and matches nearby debug or info output.

由索引模型根據 Issue 內容生成。

描述

enhancement
Description

The env set SLACK_API_URL <host>/api/ hint for a custom API host prints from ResolveAPIHost in internal/auth/auth.go, which runs for every command. The hint only matters for apps that use Run on Slack infrastructure, and it only matters when the CLI doesn't already set the value:

  • SetSelectedAuth sets SLACK_API_URL for local app processes, and run passes it to the local Deno runtime.
  • deploy in internal/pkg/platform/deploy.go adds SLACK_API_URL to the Run on Slack environment, but only for hosts that match IsAPIHostSlackDev.

So the hint shows on commands where there's nothing to do, like auth list, and the one case that needs it, a deploy to a custom host that isn't a dev host, gets the same generic line.

Proposal
  • Placement: print the hint from deploy when the resolved host isn't production and deploy doesn't add SLACK_API_URL itself. Decide whether env or run for a Run on Slack app also warrants it.
  • Wording: name the apps it applies to and show the full command with the correct value, for example: Apps using Run on Slack infrastructure should set SLACK_API_URL to use a custom API host. Run slack env set SLACK_API_URL <host>/api/.
  • Keep it a debug or info message, matching the nearby deploy output.

Follows #893, which corrects the value in the current hint to include /api/.

主要語言
Go
星號
321
分支
52
平均合併
17 小時 44 分鐘
30 天內合併 PR
138

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

slackapi/slack-cli 的其他 Issue

查看 slackapi/slack-cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。