How to determine the commit SHA for an update ID programatically?

Hey folks,

I’m wondering how to determine the SHA that a user’s app is built from programmatically. I know that I can use the Expo SDK to get their update ID, and I know that on the developer console I can see the commit SHA that an update was built from, but I would like to automate this flow. Using the EAS CLI, I can list and introspect update groups, but given a specific update ID, not a group ID, I can’t really get the commit for it.

Ideally we’d either be able to show the group ID in the app (and attach it to logs or bug reports) or query the EAS API (is this open, or are we expected to just use the CLI?) for a given update ID.

I found some StackOverflow posts about showing how to expose the group ID using

Constants.manifest2?.metadata?.["updateGroup"]

However this does not work for me and seems pretty unsupported, regardless. Any thoughts?