Skip to content

feat: check requests to install an app - #646

Draft
AmyScript wants to merge 1 commit into
slackapi:mainfrom
AmyScript:new-approval-request-status-command
Draft

feat: check requests to install an app#646
AmyScript wants to merge 1 commit into
slackapi:mainfrom
AmyScript:new-approval-request-status-command

Conversation

@AmyScript

Copy link
Copy Markdown

Changelog

Added the app-approval-status experiment with a slack app requests command that checks the status of your most recent request to have an app approved for install.

Summary

Installing an app on a team with admin approval required creates an approval request, but there was no way to check what happened to it from the CLI. This adds a hidden slack app requests command, gated behind the new app-approval-status experiment, that reports the most recent request for the selected app on each team in the token's scope.

Requests are searched on the team of the authenticated account. An account of a workspace belonging to an organization also searches that organization, while an account of an organization searches the organization alone. Other workspaces of an organization can be searched with --team-ids, up to the 50 the API accepts.

Output includes the request ID, status, and timestamps, plus the actor that cancelled a request and a hint when the account can install the app without approval:

🔒 App Requests
   T0123456789:
     Request ID:   Ar0123456789
     Status:       pending
     Requested:    2026-08-21 15:04:05 -04:00

Preview

No recording yet — the command is unreleased and hidden, and the output above is taken from the unit tests rather than a live run.

Testing

  • Unit tests cover the API client against a mocked server and the output formatting for every status and cancellation actor.
  • Verified the experiment gate rejects the command without --experiment app-approval-status, that --team-ids rejects more than 50 teams, and that the command requires a project directory.
  • The live call to apps.approvals.requests.list has not been exercised yet.

Notes

  • The command is registered unconditionally and marked Hidden, matching how manifest sync gates itself; the experiment check lives in PreRunE.
  • Adds the feature_not_enabled and restricted_action error codes returned by the endpoint.
  • Fixes a pre-existing bug in the help template where hidden subcommands were still listed under a parent command.

Requirements

Made with Cursor

Add a hidden `slack app requests` command behind the app-approval-status experiment that reports the most recent install approval request for the selected app on each team in the token's scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
@AmyScript
AmyScript requested a review from srtaalej August 21, 2026 21:41
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.69767% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.38%. Comparing base (b5982b9) to head (fc808a6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/app/requests.go 90.47% 7 Missing and 3 partials ⚠️
internal/api/app.go 91.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
+ Coverage   72.26%   72.38%   +0.12%     
==========================================
  Files         238      239       +1     
  Lines       20072    20201     +129     
==========================================
+ Hits        14505    14623     +118     
- Misses       4298     4305       +7     
- Partials     1269     1273       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant