Update actions to open GitHub issue templates (#23747)
Release Notes: - N/A
This commit is contained in:
parent
15933d478f
commit
06424c9608
1 changed files with 7 additions and 16 deletions
|
@ -21,25 +21,18 @@ const fn zed_repo_url() -> &'static str {
|
||||||
"https://github.com/zed-industries/zed"
|
"https://github.com/zed-industries/zed"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn request_feature_url(specs: &SystemSpecs) -> String {
|
fn request_feature_url() -> String {
|
||||||
format!(
|
"https://github.com/zed-industries/zed/issues/new?template=0_feature_request.yml".to_string()
|
||||||
concat!(
|
|
||||||
"https://github.com/zed-industries/zed/issues/new",
|
|
||||||
"?labels=admin+read%2Ctriage%2Cenhancement",
|
|
||||||
"&template=0_feature_request.yml",
|
|
||||||
"&environment={}"
|
|
||||||
),
|
|
||||||
urlencoding::encode(&specs.to_string())
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn file_bug_report_url(specs: &SystemSpecs) -> String {
|
fn file_bug_report_url(specs: &SystemSpecs) -> String {
|
||||||
format!(
|
format!(
|
||||||
concat!(
|
concat!(
|
||||||
"https://github.com/zed-industries/zed/issues/new",
|
"https://github.com/zed-industries/zed/issues/new",
|
||||||
"?labels=admin+read%2Ctriage%2Cbug",
|
"?",
|
||||||
"&template=1_bug_report.yml",
|
"template=1_bug_report.yml",
|
||||||
"&environment={}"
|
"&",
|
||||||
|
"environment={}"
|
||||||
),
|
),
|
||||||
urlencoding::encode(&specs.to_string())
|
urlencoding::encode(&specs.to_string())
|
||||||
)
|
)
|
||||||
|
@ -74,11 +67,9 @@ pub fn init(cx: &mut App) {
|
||||||
.detach();
|
.detach();
|
||||||
})
|
})
|
||||||
.register_action(|_, _: &RequestFeature, window, cx| {
|
.register_action(|_, _: &RequestFeature, window, cx| {
|
||||||
let specs = SystemSpecs::new(window, cx);
|
|
||||||
cx.spawn_in(window, |_, mut cx| async move {
|
cx.spawn_in(window, |_, mut cx| async move {
|
||||||
let specs = specs.await;
|
|
||||||
cx.update(|_, cx| {
|
cx.update(|_, cx| {
|
||||||
cx.open_url(&request_feature_url(&specs));
|
cx.open_url(&request_feature_url());
|
||||||
})
|
})
|
||||||
.log_err();
|
.log_err();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue