Continue to redirect to GitHub commits for nightly and dev release notes (#18487)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run

We are now using the `view release notes locally` action when clicking
on the update toast - the endpoint for this action does not currently
return anything for valid for these channels, as we don't have support
yet for diffing between these builds, so for now, [continue to do what
the `view release notes` action did and just send the user to the commit
view on
GitHub](caffb2733f/crates/auto_update/src/auto_update.rs (L255-L260)).
It is a bit counterintuitive to send the user to the browser when using
the "local" action, but this is just a patch in the interim.

If we make adjustments to our channels to keep the nightly tag stable
and add some sort of unique suffix, like a timestamp, we can then adjust
things to return these in the request body and show them in the editor.

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2024-09-28 15:20:32 -04:00 committed by GitHub
parent 1021f0e288
commit 8aeab4800c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -264,6 +264,18 @@ pub fn view_release_notes(_: &ViewReleaseNotes, cx: &mut AppContext) -> Option<(
fn view_release_notes_locally(workspace: &mut Workspace, cx: &mut ViewContext<Workspace>) {
let release_channel = ReleaseChannel::global(cx);
let url = match release_channel {
ReleaseChannel::Nightly => Some("https://github.com/zed-industries/zed/commits/nightly/"),
ReleaseChannel::Dev => Some("https://github.com/zed-industries/zed/commits/main/"),
_ => None,
};
if let Some(url) = url {
cx.open_url(url);
return;
}
let version = AppVersion::global(cx).to_string();
let client = client::Client::global(cx).http_client();