Skip to content

[eas-cli] Add support for configuring app store connect connection#3558

Open
sswrk wants to merge 12 commits intomainfrom
szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect
Open

[eas-cli] Add support for configuring app store connect connection#3558
sswrk wants to merge 12 commits intomainfrom
szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect

Conversation

@sswrk
Copy link
Copy Markdown
Contributor

@sswrk sswrk commented Mar 30, 2026

Why

We're adding App Store Connect integration support. The UI for configuring such connection is available in the web dashboard, but it would also be useful to have it in the CLI – this is the goal of this PR.

How

  • Added the new connections oclif topic.
  • eas connections:asc:status – check the status of the current project's connection.
  • eas connections:asc:connect – go through the process of connecting the current project with an ASC app.
    • Requires an ASC API key – user is prompted to select one of the existing ones, or, if no existing one, they go through the process of key creation.
    • Queries the available ASC apps and requires to select one.
  • eas connections:asc:disconnect – disconnects the current project from the ASC app.

Test Plan

Interactive mode testing:

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status
✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:disconnect
✔ Checked current status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

You are about to disconnect this project from its App Store Connect app.
This action is reversible by reconnecting.

✔ Are you sure you wish to proceed? … no / yes
✔ Disconnected App Store Connect app
✔ Verified disconnection
Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status
✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:connect
✔ Checked current status
✔ Found 1 API key(s)
✔ Select an App Store Connect API key: › Key ID: <api-key-id>
    Name: <api-key-name>
    Team ID: <team-id>, Team name: <team-name>
    Updated: <relative-time>
✔ Found 19 app(s) on App Store Connect
✔ Select an App Store Connect app: › <app-name> (<bundle-id>) [<asc-app-id>]
✔ Connected project to App Store Connect app
✔ Verified connection

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

Non-interactive mode:

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status --non-interactive

✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:disconnect --non-interactive --yes
✔ Checked current status
✔ Disconnected App Store Connect app
✔ Verified disconnection

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:status --non-interactive

✔ Fetched App Store Connect app link status

Project @<owner>/<project-slug>: Not connected to App Store Connect.

➜  <project-dir> git:(<branch>) ✗ EXPO_STAGING=1 easd connections:asc:connect \
  --non-interactive \
  --api-key-id <api-key-id> \
  --asc-app-id <asc-app-id>
✔ Checked current status
✔ Found 1 API key(s)
✔ Found 19 app(s) on App Store Connect
✔ Connected project to App Store Connect app
✔ Verified connection

Project @<owner>/<project-slug>: Connected to App Store Connect.
  ASC App ID:  <asc-app-id>
  Name:        <app-name>
  Bundle ID:   <bundle-id>
  Apple URL:   https://appstoreconnect.apple.com/apps/<asc-app-id>/distribution

@linear
Copy link
Copy Markdown

linear bot commented Mar 30, 2026

@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch 3 times, most recently from 723b913 to 246f469 Compare March 31, 2026 12:49
@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch from 246f469 to 3f62741 Compare March 31, 2026 12:51
@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch from 3f62741 to bbf0b21 Compare March 31, 2026 12:57
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 84.41558% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.53%. Comparing base (3945763) to head (f9c9fc0).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/connections/asc/ascApiKey.ts 21.43% 11 Missing ⚠️
...es/eas-cli/src/commands/connections/asc/connect.ts 89.29% 8 Missing and 1 partial ⚠️
...ges/eas-cli/src/graphql/queries/AscAppLinkQuery.ts 38.47% 8 Missing ⚠️
...as-cli/src/graphql/mutations/AscAppLinkMutation.ts 37.50% 5 Missing ⚠️
...eas-cli/src/commands/connections/asc/disconnect.ts 94.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3558      +/-   ##
==========================================
+ Coverage   54.38%   54.53%   +0.16%     
==========================================
  Files         824      829       +5     
  Lines       35420    35554     +134     
  Branches     7318     7351      +33     
==========================================
+ Hits        19258    19387     +129     
- Misses      16075    16079       +4     
- Partials       87       88       +1     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk sswrk force-pushed the szymonswierk/eng-20384-cli-add-support-for-configuring-app-store-connect branch from bbf0b21 to ee2dc34 Compare March 31, 2026 13:13
@sswrk sswrk marked this pull request as ready for review March 31, 2026 14:31
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@sswrk sswrk requested review from douglowder and sjchmiela March 31, 2026 14:32
@douglowder douglowder requested a review from quinlanj March 31, 2026 22:17
Copy link
Copy Markdown
Contributor

@douglowder douglowder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Adding @quinlanj for the review.

ownerAccount,
await provideOrGenerateAscApiKeyAsync(
credentialsContext,
AppStoreApiKeyPurpose.SUBMISSION_SERVICE
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add an extra purpose to the enum. also, if you havent already, you should double check the permissions granted to the key is what you guys need for the asc app connection!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extended the enum.

As for the permissions granted to the key, the role is ADMIN, which is the full access role. But now I'm wondering if following the principle of least privilege, maybe we should use the APP_MANAGER role 🤔 cc @sjchmiela

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

✅ Thank you for adding the changelog entry!

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.

3 participants