Skip to content

Expose changed URLs in MR ci_environments_status

Alessio Caiazza requested to merge ac-review-app-changes-33418 into master

What does this MR do?

This MR extends GET :namespace/merge_requests/:id/ci_environments_status adding a new key changed which is an array with path and external_url of the affected pages. This includes every file added, moved or modified that has a relative path, after the URL transformation, that has no extension or some common page extensions like .html (and derivates), .php, .asp, .cgi, .pl.

# GET http://localhost:3000/root/test-pages/merge_requests/5/ci_environments_status
[
  {
    "id": 40,
    "name": "review/root-master-patch-91341",
    "url": "/root/test-pages/environments/40",
    "metrics_url": null,
    "metrics_monitoring_url": "/root/test-pages/environments/40/metrics",
    "stop_url": "/root/test-pages/environments/40/stop",
    "external_url": "http://root-master-patch-91341.volatile-watch.surge.sh",
    "external_url_formatted": "root-master-patch-91341.volatile-watch.surge.sh",
    "deployed_at": "2018-10-12T13:08:21.839Z",
    "deployed_at_formatted": "Oct 12, 2018 1:08pm",
    "changes": [
      {
        path: "index.html",
        external_url: "http://root-master-patch-91341.volatile-watch.surge.sh/index.html"
      },
      {
        path: "imgs/gallery.html",
        external_url: "http://root-master-patch-91341.volatile-watch.surge.sh/imgs/gallery.html"
      },
      {
        path: "about/",
        external_url: "http://root-master-patch-91341.volatile-watch.surge.sh/about/"
      }
    ]
  }
]

What are the relevant issue numbers?

gitlab-org/gitlab-ce#33418

Does this MR meet the acceptance criteria?

Edited by Alessio Caiazza

Merge request reports