feat: Allow specifying env for set-commits command
This is blocked by https://github.com/getsentry/sentry/issues/32618
Closes https://github.com/getsentry/sentry-cli/issues/1076
This is still blocked (and probably will be for a long time) by the change in Sentry API, so I won't merge it in the near future.
This pull request 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 🥀
@kamilogorek would this work for cli? https://github.com/getsentry/sentry/issues/32618#issuecomment-1222028370
Hmm I don't think so. It will still break if you have 2 deploys in the release, as those APIs do filter per env, but only to select a release, not it's internal data.
Eg. when you have env-test release, with prod and dev deploys, curl https://sentry.io/api/0/organizations/kamil-test/releases/\?project\=5334254\&environment\=dev will still return (notice lastDeploy value):
[
{
"id": 571681485,
"version": "env-test",
"status": "open",
"shortVersion": "env-test",
"versionInfo": {
"package": null,
"version": {
"raw": "env-test"
},
"description": "env-test",
"buildHash": null
},
"ref": null,
"url": null,
"dateReleased": null,
"dateCreated": "2022-11-14T14:21:18.369181Z",
"data": {},
"newGroups": 0,
"owner": null,
"commitCount": 0,
"lastCommit": null,
"deployCount": 2,
"lastDeploy": {
"id": "29649137",
"environment": "prod",
"dateStarted": null,
"dateFinished": "2022-11-14T14:23:15.622907Z",
"name": null,
"url": null
},
"authors": [],
"projects": [
{
"id": 5334254,
"slug": "test-1",
"name": "test-1",
"newGroups": 0,
"platform": "javascript",
"platforms": [],
"hasHealthData": false
}
],
"firstEvent": "2022-11-14T14:23:10.206628Z",
"lastEvent": "2022-11-14T14:23:10.206632Z",
"currentProjectMeta": {}
},
]