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

Đang mở
#894 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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/.

Ngôn ngữ chính
Go
Star
321
Fork
52
Merge trung bình
17 giờ 44 phút
Pull request đã merge (30 ngày)
138

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của slackapi/slack-cli

Tất cả issue của slackapi/slack-cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.