Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create replacements for legacy authors feeds (RSS, YAML) #18

Open
preaction opened this issue Jun 19, 2018 · 0 comments
Open

Create replacements for legacy authors feeds (RSS, YAML) #18

preaction opened this issue Jun 19, 2018 · 0 comments

Comments

@preaction
Copy link
Member

The current site has a few APIs that allow authors to see their data via YAML, or to subscribe to recent reports via RSS. These feeds are advertised as orange buttons near the upper-right of the author's page (example author page for PREACTION).

For backwards compatibility, we should create these same feeds in this app. We should add a single method to CPAN::Testers::Web::Controller::Legacy called author_feeds. This method should return either an RSS or a YAML document based on the format requested (use $c->respond_to() to vary the responses).

There are two RSS feeds: One with all reports, one without PASS reports (called <author>-nopass.rss). A stash value ("nopass") should be used when wanting to filter the list of reports returned.

Once the controller action is written, and routes created, the Apache config will be updated to proxy to these replacements.

RSS Example

<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<atom:link href="http://www.cpantesters.org/author/P/PREACTION-nopass.rss" rel="self" type="application/rss+xml" />
<title>CPAN Testers Reports</title>
<link>http://www.cpantesters.org/</link>
<description>news and updates for the CPAN Testers Reports website</description>
<language>en</language>
<pubDate>Tue, 19 Jun 2018 17:31:43 GMT</pubDate>
<generator>Labyrinth v5.32</generator>
<item>
<title>FAIL Git-ReleaseRepo-0.006 5.24.1 on linux 4.4.0-81-generic (x86_64-linux)</title>
<link>http://www.cpantesters.org/cpan/report/0e9d34fe-1892-11e8-bb4d-81605a155286</link>
<description>FAIL Git-ReleaseRepo-0.006 5.24.1 on linux 4.4.0-81-generic (x86_64-linux)</description>
<guid isPermaLink="false">http://www.cpantesters.org/cpan/report/0e9d34fe-1892-11e8-bb4d-81605a155286</guid>
<pubDate>Fri, 23 Feb 2018 12:07:00 GMT</pubDate>
</item>
</channel>
</rss>

YAML Example

---
- csspatch: unp
  cssperl: rel
  dist: Log-Any
  distribution: Log-Any
  distversion: Log-Any-1.705
  fulldate: '201806190155'
  guid: c64c49ce-7363-11e8-a1cf-bb670eaac09d
  id: '96220041'
  osname: linux
  ostext: GNU/Linux
  osvers: 4.16.0-1-686
  perl: 5.12.3
  platform: i686-linux
  postdate: '201806'
  state: pass
  status: PASS
  tester: '"Chris Williams (BINGOS)" <[email protected]>'
  type: '2'
  uploadid: '305255'
  version: '1.705'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant