`sourcemaps upload`: Create new release if release does not exist yet
The scenario
Suppose a user runs sourcemaps upload against a directory foobar/ where the JS source files have already been injected with debug IDs. Like so:
$ sentry-cli sourcemaps inject foobar/
$ sentry-cli sourcemaps upload --release=1.2.3 foobar/
Suppose further that the release 1.2.3 does not exist yet.
Current behavior
The user will observe that their artifact bundle has been uploaded to Sentry. The artifact bundle is linked to release 1.2.3, but when the user clicks the link to the release, they discover that release 1.2.3 does not exist, because the command does not create the release.
Suggested improved behavior
If the user passes a non-existing release, such as in the above example, we should implicitly create the release for them. The CLI should also output a message, such as the following, to indicate that the release was created:
New release 1.2.3 was created!
Implementation notes
The functionality for implicitly creating the release should be implemented server-side, i.e. in getsentry/sentry. We need to modify this code, or the method called by the code. We should indicate in the response whether we created a release in the response.
Only after implementing the functionality in Sentry can we implement the message in the CLI to indicate whether the release was created, based on the response from the server.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀