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"
|
||||
}
|
||||
|
||||
fn request_feature_url(specs: &SystemSpecs) -> String {
|
||||
format!(
|
||||
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 request_feature_url() -> String {
|
||||
"https://github.com/zed-industries/zed/issues/new?template=0_feature_request.yml".to_string()
|
||||
}
|
||||
|
||||
fn file_bug_report_url(specs: &SystemSpecs) -> String {
|
||||
format!(
|
||||
concat!(
|
||||
"https://github.com/zed-industries/zed/issues/new",
|
||||
"?labels=admin+read%2Ctriage%2Cbug",
|
||||
"&template=1_bug_report.yml",
|
||||
"&environment={}"
|
||||
"?",
|
||||
"template=1_bug_report.yml",
|
||||
"&",
|
||||
"environment={}"
|
||||
),
|
||||
urlencoding::encode(&specs.to_string())
|
||||
)
|
||||
|
@ -74,11 +67,9 @@ pub fn init(cx: &mut App) {
|
|||
.detach();
|
||||
})
|
||||
.register_action(|_, _: &RequestFeature, window, cx| {
|
||||
let specs = SystemSpecs::new(window, cx);
|
||||
cx.spawn_in(window, |_, mut cx| async move {
|
||||
let specs = specs.await;
|
||||
cx.update(|_, cx| {
|
||||
cx.open_url(&request_feature_url(&specs));
|
||||
cx.open_url(&request_feature_url());
|
||||
})
|
||||
.log_err();
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue