Skip to content

Add "Open in GitLab" option to room settings dropdown

Add Open in GitLab option to room settings dropdown

This is the sibling to "Open in GitHub"

Plus this MR adds support for inheriting when room is using type: GROUP

Part of https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1738 and a bit related to https://gitlab.com/gitlab-org/gitter/webapp/issues/1955

GitHub (already in place) GitLab (new)

Testing strategy

  1. Insert a new GitLab Gitter group into Mongo
    db.groups.insert({
            "name" : "_test-gitlab-group-test-community",
            "uri" : "_test-gitlab-group-test-community",
            "lcUri" : "_test-gitlab-group-test-community",
            "lcHomeUri" : "_test-gitlab-group-test-community/home",
            "homeUri" : "_test-gitlab-group-test-community/home",
            "sd" : {
                    "externalId" : "3281315",
                    "linkPath" : "gitter-integration-tests-group",
                    "public" : true,
                    "admins" : "GL_GROUP_MAINTAINER",
                    "members" : "PUBLIC",
                    "type" : "GL_GROUP"
            },
    });
  2. Insert a room in that new GitLab group
    db.troupes.insert({
            "groupId" : db.groups.findOne({ "lcUri" : "_test-gitlab-group-test-community", })._id,
            "lcUri" : "_test-gitlab-group-test-community/community",
            "uri" : "_test-gitlab-group-test-community/community",
            "sd" : {
                    "internalId" : db.groups.findOne({ "lcUri" : "_test-gitlab-group-test-community", })._id,
                    "extraAdmins" : [ ],
                    "extraMembers" : [ ],
                    "members" : "PUBLIC",
                    "public" : true,
                    "admins" : "GROUP_ADMIN",
                    "type" : "GROUP"
            }
    });
  3. Visit http://localhost:5000/_test-gitlab-group-test-community/community
  4. Click on the room settings dropdown -> Open in GitLab
  5. Notice how a new tab opens linked to https://gitlab.com/gitter-integration-tests-group

Also test with a GitHub based room opening GitHub

Edited by Eric Eastwood

Merge request reports