Skip to content

Commit 8c942f2

Browse files
committed
rss: Use human readable title field
1 parent 0847777 commit 8c942f2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/tests/worker/rss/snapshots/all__worker__rss__sync_updates_feed__sync_updates_feed-2.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ expression: content
1111
<language>en</language>
1212
<atom:link href="https://static.crates.io/rss/updates.xml" rel="self" type="application/rss+xml"/>
1313
<item>
14-
<title>foo v1.2.0</title>
14+
<title>New crate version published: foo v1.2.0</title>
1515
<link>https://crates.io/crates/foo/1.2.0</link>
1616
<guid>https://crates.io/crates/foo/1.2.0</guid>
1717
<pubDate>Sat, 22 Jun 2024 15:57:19 +0000</pubDate>
1818
<crates:name>foo</crates:name>
1919
<crates:version>1.2.0</crates:version>
2020
</item>
2121
<item>
22-
<title>foo v1.1.0</title>
22+
<title>New crate version published: foo v1.1.0</title>
2323
<link>https://crates.io/crates/foo/1.1.0</link>
2424
<guid>https://crates.io/crates/foo/1.1.0</guid>
2525
<pubDate>Sat, 22 Jun 2024 08:30:01 +0000</pubDate>
2626
<crates:name>foo</crates:name>
2727
<crates:version>1.1.0</crates:version>
2828
</item>
2929
<item>
30-
<title>bar v3.0.0-beta.1</title>
30+
<title>New crate version published: bar v3.0.0-beta.1</title>
3131
<link>https://crates.io/crates/bar/3.0.0-beta.1</link>
3232
<description><![CDATA[let&apos;s try &amp; break this &lt;item&gt;]]></description>
3333
<guid>https://crates.io/crates/bar/3.0.0-beta.1</guid>
@@ -36,23 +36,23 @@ expression: content
3636
<crates:version>3.0.0-beta.1</crates:version>
3737
</item>
3838
<item>
39-
<title>foo v1.0.0</title>
39+
<title>New crate version published: foo v1.0.0</title>
4040
<link>https://crates.io/crates/foo/1.0.0</link>
4141
<guid>https://crates.io/crates/foo/1.0.0</guid>
4242
<pubDate>Fri, 21 Jun 2024 17:01:33 +0000</pubDate>
4343
<crates:name>foo</crates:name>
4444
<crates:version>1.0.0</crates:version>
4545
</item>
4646
<item>
47-
<title>foo v0.1.1</title>
47+
<title>New crate version published: foo v0.1.1</title>
4848
<link>https://crates.io/crates/foo/0.1.1</link>
4949
<guid>https://crates.io/crates/foo/0.1.1</guid>
5050
<pubDate>Thu, 20 Jun 2024 12:45:12 +0000</pubDate>
5151
<crates:name>foo</crates:name>
5252
<crates:version>0.1.1</crates:version>
5353
</item>
5454
<item>
55-
<title>foo v0.1.0</title>
55+
<title>New crate version published: foo v0.1.0</title>
5656
<link>https://crates.io/crates/foo/0.1.0</link>
5757
<guid>https://crates.io/crates/foo/0.1.0</guid>
5858
<pubDate>Thu, 20 Jun 2024 10:13:54 +0000</pubDate>

src/worker/jobs/rss/sync_updates_feed.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ struct VersionUpdate {
9090

9191
impl VersionUpdate {
9292
fn into_rss_item(self, domain: &str) -> rss::Item {
93-
let title = format!("{} v{}", self.name, self.version);
93+
let title = format!(
94+
"New crate version published: {} v{}",
95+
self.name, self.version
96+
);
9497
let link = format!("https://{domain}/crates/{}/{}", self.name, self.version);
9598
let pub_date = self.time.and_utc().to_rfc2822();
9699

0 commit comments

Comments
 (0)