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

オープン
#894 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
138

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

slackapi/slack-cli のほかの issue

slackapi/slack-cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。