How To get the external issues ID (like JIRA Keys) on the CI/CD

In order to create an automatic release note with all the JIRA keys on it.
I need to get (maybe by the api or whatever) the external issues IDs of that deployment.

But I read all the documentation, and have not found a way.

An issue was created to address that issue.