Skip to content

Add support for fetching merge requests via RSS / Atom

What does this MR do?

This MR adds support for retrieving the merge requests of a project via RSS / Atom similar to the existing feed for issues (#29521 (closed)).

Consequently, the implementation is very symmetrical to the implementation for the issues feed, with some refactorings made especially for the views and test code to reduce duplication.

Screenshots or Screencasts (strongly suggested)

This MR adds a "Subscribe to RSS feed" button to the merge requests overview page, as already seen for the issues or some other page (user profile, etc.):

merge requests overview

Clicking on the button will output this feed:

Feed, as shown in the screenshot
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<title>Flight merge requests</title>
<link href="/flightjs/flight/-/merge_requests.atom?feed_token=My6U5g3wcbyipAgKnV22&amp;state=opened" rel="self" type="application/atom+xml"/>
<link href="https://gdk.localhost:3443/flightjs/flight/-/merge_requests" rel="alternate" type="text/html"/>
<id>https://gdk.localhost:3443/flightjs/flight/-/merge_requests</id>
<updated>2020-08-04T10:40:07Z</updated>
<entry>
  <id>https://gdk.localhost:3443/flightjs/flight/-/merge_requests/4</id>
  <link href="https://gdk.localhost:3443/flightjs/flight/-/merge_requests/4"/>
  <title>Reiciendis perferendis nihil recusandae optio quo ducimus consequatur iure.</title>
  <updated>2020-08-04T10:40:07Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/84b7f093d7ceace4beb347fdb39b95c4?s=80&amp;d=identicon"/>
  <author>
    <name>Curt Raynor</name>
    <email></email>
  </author>
  <summary>Reiciendis perferendis nihil recusandae optio quo ducimus consequatur iure.</summary>
  <description>Provident vel omnis aut neque corrupti saepe necessitatibus. Architecto omnis accusantium expedita quis non dignissimos. Qui accusamus qui minima excepturi.</description>
  <content>Provident vel omnis aut neque corrupti saepe necessitatibus. Architecto omnis accusantium expedita quis non dignissimos. Qui accusamus qui minima excepturi.</content>
  <milestone>v3.0</milestone>
  <labels>
    <label>Cafunc</label>
    <label>Corolla Wagon</label>
    <label>Envoy</label>
    <label>Phant</label>
    <label>Probe</label>
    <label>Sircell</label>
  </labels>
  <assignees>
    <assignee>
      <name>Roxanna Leuschke</name>
      <email></email>
    </assignee>
  </assignees>
  <assignee>
    <name>Roxanna Leuschke</name>
    <email></email>
  </assignee>
</entry>
<entry>
  <id>https://gdk.localhost:3443/flightjs/flight/-/merge_requests/3</id>
  <link href="https://gdk.localhost:3443/flightjs/flight/-/merge_requests/3"/>
  <title>Doloribus iste aut eos et sed nam necessitatibus harum dolorum.</title>
  <updated>2020-08-04T10:40:35Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/84b7f093d7ceace4beb347fdb39b95c4?s=80&amp;d=identicon"/>
  <author>
    <name>Curt Raynor</name>
    <email></email>
  </author>
  <summary>Doloribus iste aut eos et sed nam necessitatibus harum dolorum.</summary>
  <description>Nihil consequatur reprehenderit natus autem assumenda cupiditate omnis. Eius quis earum vel non impedit. Non eaque ut aut nisi dolorum.</description>
  <content>Nihil consequatur reprehenderit natus autem assumenda cupiditate omnis. Eius quis earum vel non impedit. Non eaque ut aut nisi dolorum.</content>
  <milestone>v3.0</milestone>
  <labels>
    <label>Cafunc</label>
    <label>Envoy</label>
    <label>Phaph</label>
    <label>Probe</label>
    <label>Sable</label>
    <label>Sircell</label>
  </labels>
  <assignees>
    <assignee>
      <name>Fidela Ankunding</name>
      <email></email>
    </assignee>
  </assignees>
  <assignee>
    <name>Fidela Ankunding</name>
    <email></email>
  </assignee>
</entry>
<entry>
  <id>https://gdk.localhost:3443/flightjs/flight/-/merge_requests/2</id>
  <link href="https://gdk.localhost:3443/flightjs/flight/-/merge_requests/2"/>
  <title>Vero expedita error numquam aliquid rerum saepe.</title>
  <updated>2020-08-04T10:40:35Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/84b7f093d7ceace4beb347fdb39b95c4?s=80&amp;d=identicon"/>
  <author>
    <name>Curt Raynor</name>
    <email></email>
  </author>
  <summary>Vero expedita error numquam aliquid rerum saepe.</summary>
  <description>Ut deserunt et at laboriosam. Ut quis doloribus consequatur fuga ut voluptas amet. Sunt reprehenderit ipsam quia atque.</description>
  <content>Ut deserunt et at laboriosam. Ut quis doloribus consequatur fuga ut voluptas amet. Sunt reprehenderit ipsam quia atque.</content>
  <milestone>v3.0</milestone>
  <labels>
    <label>Broust</label>
    <label>Bruckforge</label>
    <label>Corolla Wagon</label>
    <label>Phaph</label>
    <label>Probe</label>
    <label>Sable</label>
  </labels>
  <assignees>
    <assignee>
      <name>Administrator</name>
      <email></email>
    </assignee>
  </assignees>
  <assignee>
    <name>Administrator</name>
    <email></email>
  </assignee>
</entry>
<entry>
  <id>https://gdk.localhost:3443/flightjs/flight/-/merge_requests/1</id>
  <link href="https://gdk.localhost:3443/flightjs/flight/-/merge_requests/1"/>
  <title>Error dolores vel voluptatem reprehenderit quam rerum sint sed.</title>
  <updated>2020-08-04T10:40:35Z</updated>
  <media:thumbnail width="40" height="40" url="https://secure.gravatar.com/avatar/84b7f093d7ceace4beb347fdb39b95c4?s=80&amp;d=identicon"/>
  <author>
    <name>Curt Raynor</name>
    <email></email>
  </author>
  <summary>Error dolores vel voluptatem reprehenderit quam rerum sint sed.</summary>
  <description>Et quas debitis suscipit iusto pariatur. Ut amet delectus quis tenetur impedit. Quibusdam sunt asperiores rerum quam suscipit totam.</description>
  <content>Et quas debitis suscipit iusto pariatur. Ut amet delectus quis tenetur impedit. Quibusdam sunt asperiores rerum quam suscipit totam.</content>
  <milestone>v3.0</milestone>
  <labels>
    <label>Cafunc</label>
    <label>Corolla Wagon</label>
    <label>Probe</label>
    <label>Sable</label>
    <label>Sircell</label>
    <label>Sirpod</label>
  </labels>
  <assignees>
    <assignee>
      <name>Administrator</name>
      <email></email>
    </assignee>
  </assignees>
  <assignee>
    <name>Administrator</name>
    <email></email>
  </assignee>
</entry>
</feed>

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

I am not sure here - this MR makes use of the existing feed tokens, which could be seen as "utilizing to any type of authentication, authorization, or session handling mechanism".

Related to #29521 (closed), #202616

Merge request reports

Loading