Skip to content

Commit 28b045f

Browse files
authored
Merge pull request #18 from diwash007/links
Fix: link on /hero
2 parents 60cebae + 8718d7c commit 28b045f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/api/hero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct Hero {
2424

2525
#[derive(Serialize, Deserialize, Clone)]
2626
pub struct Pulls {
27-
pub url: String,
27+
pub html_url: String,
2828
pub title: String,
2929
}
3030

src/commands/hero.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub async fn run(
6060
for _ in 0..3 {
6161
hero.pulls.push(Pulls {
6262
title: "".to_string(),
63-
url: "".to_string(),
63+
html_url: "".to_string(),
6464
})
6565
}
6666
}
@@ -70,8 +70,10 @@ pub async fn run(
7070

7171
if hero.pulls[0..2].len() == index {
7272
if !hero.pulls[index].title.is_empty() {
73-
pull_req_cloned +=
74-
&format!("<:reply:1029065416905076808>[{}]({})\n", pr.title, pr.url);
73+
pull_req_cloned += &format!(
74+
"<:reply:1029065416905076808>[{}]({})\n",
75+
pr.title, pr.html_url
76+
);
7577
} else {
7678
pull_req_cloned += "<:reply:1029065416905076808>Not Available\n";
7779
}
@@ -80,7 +82,7 @@ pub async fn run(
8082
} else {
8183
pull_req_cloned += &format!(
8284
"<:reply_multi:1029067132572549142>[{}]({})\n",
83-
pr.title, pr.url
85+
pr.title, pr.html_url
8486
);
8587
}
8688

@@ -123,7 +125,7 @@ pub async fn run(
123125
c.create_action_row(|r| {
124126
r.add_button(link_button(
125127
"Hero Page",
126-
format!("https://github.com/{}", hero.github),
128+
format!("https://novu.co/contributors/{}", hero.github),
127129
"🔗".parse().unwrap(),
128130
))
129131
})

0 commit comments

Comments
 (0)