rss-git
Github’s gone to shit, let’s use a normal rss feed to cheaply federate git related (social) activity!
Structure
Let’s repurpose the de-facto format of standard RSS feeds for something that can be displayed reasonably in any RSS reader, but which can also be used to build useful tooling around.
Top-level feed information
<title>
whatever you want to name this activity feed e.g. “cblgh’s fav computer projects” or “my project feed”<link>
link to where your own repositories can be found, or your personal homepage<description>
an optional description for this activity feed “here’s where i list all the cool things i’ve come across while browsing fediverse. mostly it’s projects made by friends :)”
Entry information
<title>
, contains the following format depending on the activity that happened:fav: <project name>
create: <project name>
fork: <project name>
follow: <feed title or username>
move: <project name>
<link>
links to the git repository in question- in the case of
follow
the link will be to another rss-git feed!
- in the case of
<description>
contains an optional project description<pubDate>
is the date of the activity taking place (when it was fav’d, when a repo was created)<source>
the original source of the repository if possible to discern (otherwise often same as<link>
; see Examples below)- only relevant for
fork
andmove
- only relevant for
<guid>
an optional rss field that can help rss readers. if handwriting the feed, pick a number you haven’t used yet. if generating a feed, take the<pubDate>
and express it in unix time (milliseconds since 1970 jan 1)
rss-git feeds are recommended to limit the amount of entries to the latest 250, but go nuts if you want to keep it unlimited i guess :)
fork
and move
are basically identical but have different semantics:
- for a fork the original may still persist and be updated,
- for a moved repo the original is to be regarded as obsolete
Example
fav
I favourite github.com/cabal-club/cabal-cli, my rss-git feed entry for that would be:
<item>
<title>fav: cabal-cli</title>
<link>https://github.com/cabal-club/cabal-cli.git</link>
<guid>1683377178000</guid>
<description>(optional project description)</description>
<pubDate>Fri, 06 May 2023 13:46:18 +0100</pubDate>
</item>
Note: The title starts with the action (fav) followed by the project name, and the link is directly to the git repository.
create
The repository https://github.com/cabal-club/cable-core.js.git is created.
<item>
<title>create: cable-core.js</title>
<link>https://github.com/cabal-club/cable-core.js.git</link>
<guid>1683377178000</guid>
<description>(optional project description)</description>
<pubDate>Fri, 06 May 2023 13:46:18 +0100</pubDate>
</item>
fork
The user slatian
, over at codeberg, forks the repository at https://github.com/cblgh/lieu.git to https://codeberg.org/slatian/lieu.devel-fork.git
Actions relating to the forked repo should reference the fork by setting the source: <source>https://codeberg.org/slatian/lieu.devel-fork.git</source>
<item>
<title>fork: lieu</title>
<link>https://codeberg.org/slatian/lieu.devel-fork.git</link>
<source>https://github.com/cblgh/lieu.git</source>
<guid>1683377178000</guid>
<description>(optional project description)</description>
<pubDate>Fri, 06 May 2023 13:46:18 +0100</pubDate>
</item>
Note: link contains the url that a repository has been forked to (not the source)
move
The repository https://github.com/slatian/lieu.git is moved to https://codeberg.org/slatian/lieu.devel-fork.git. The github source is now regarded as obsolete.
Future actions relating to the repo should use the new location as the source <source>https://codeberg.org/slatian/lieu.devel-fork.git</source>
.
<item>
<title>move: lieu</title>
<link>https://codeberg.org/slatian/lieu.devel-fork.git</link>
<source>https://github.com/slatian/lieu/</source>
<guid>1683377178000</guid>
<description>(optional project description)</description>
<pubDate>Fri, 06 May 2023 13:46:18 +0100</pubDate>
</item>
Note: link contains the url that a repository has been moved to (not the source)
follow
<item>
<title>follow: cblgh</title>
<link>https://cblgh.org/rss-git.xml</link>
<guid>1683377178000</guid>
<description>(optional description taken verbatim from the followed feed's description)</description>
<pubDate>Fri, 06 May 2023 13:46:18 +0100</pubDate>
</item>
Note: link contains the url to another git-rss feed!
Atom structure
Since some people prefer atom, and most RSS readers handle both atom & rss, here’s the equivalent fields for atom feeds!
- the wrapping container is
<entry>
instead of rss’s<item>
<title>
remains the same as for rss<link>
remains the same as for rss<updated>
is used instead of rss’s<pubDate>
<summary>
is used instead of rss’s<description>
<id>
is an atom required unique ID; this could be the timestamp from<update>
expressed in unix time (milliseconds since 1970 jan 1)
Atom Examples
fav
<entry>
<title>fav: cabal-cli</title>
<link>https://github.com/cabal-club/cabal-cli.git</link>
<id>1683377178000</id>
<summary>(optional project description)</summary>
<updated>Fri, 06 May 2023 13:46:18 +0100</updated>
</entry>
Note: The title starts with the action (fav) followed by the project name, and the link is directly to the git repository.
create
<entry>
<title>create: cable-core.js</title>
<link>https://github.com/cabal-club/cable-core.js.git</link>
<id>1683377178000</id>
<summary>(optional project description)</summary>
<updated>Fri, 06 May 2023 13:46:18 +0100</updated>
</entry>
fork
<entry>
<title>fork: lieu</title>
<link>https://codeberg.org/slatian/lieu.devel-fork.git</link>
<source>https://github.com/cblgh/lieu.git</source>
<id>1683377178000</id>
<summary>(optional project description)</summary>
<updated>Fri, 06 May 2023 13:46:18 +0100</updated>
</entry>
move
<entry>
<title>move: lieu</title>
<link>https://codeberg.org/slatian/lieu.devel-fork.git</link>
<source>https://github.com/slatian/lieu/</source>
<id>1683377178000</id>
<summary>(optional project description)</summary>
<updated>Fri, 06 May 2023 13:46:18 +0100</updated>
</entry>
follow
<entry>
<title>follow: cblgh</title>
<link>https://cblgh.org/rss-git.xml</link>
<id>1683377178000</id>
<summary>(optional description taken verbatim from the followed feed's description)</summary>
<updated>Fri, 06 May 2023 13:46:18 +0100</updated>
</entry>
Usage
The underlying structure can be used in many different ways:
- When you find a repo you like, put it into your list of favourites and generate a rss-git feed from that list
- Create a simple link aggregation site that lets users keep track of favourited / created repositories with a very clear right to exit (just bring your feed with you!)
- Existing git frontends could be augmented to output rss feeds following the semantics defined above
Whatever way you want to create a git activity feed, whether it’s by hand through your static site generator, your own tool or whatever: go for it! :)