In this post, I describe two new features implemented in the new release of Orchard Collaboration: Connectors for SVN and GIT source controls. It was a long time that I had the idea of implementing connectors to integrate GIT and SVN with Orchard Collaboration. After requesting the feature in one of the forums by a user, I got enough courage to start doing that. These connectors allow you to provide necessary fields to connect to source control repositories, and they regularly scan the source code repositories and import the Commits log into the Orchard. In case of finding any matching with existing Tickets, they attach the Commit to the Ticket. The matching is done by finding the ticket number with leading “#” character in the Commit description. For example, if the Commit contains “#231”, then it will be attached to the Ticket with Number 231. The attached Commits of tickets are visible in the detailed views of tickets.

GIT Integration

For Git repository, there are two modules that need to be activated. OC.GITConnector and OC.GitConnector.Tickets. Orchard Collaboration version 2.6 has a specific recipe to install them. In case you want to use those modules in a website that is not built by that recipe, you have to install them yourself. After installing them, you can see the Git Client in the Settings section of Orchard Dashboard.

Here, you must provide the address of the repository, a local folder for cloning the remote repository (Orchard Collaboration clones the remote repository into the App_Data/Sites/[Tenant]/Git/[Local]), the GIT branches that you want to scan them, and the necessary credentials to connect to the remote repository. As soon as you provide those fields and Save the settings, Orchard Collaboration will start scanning the remote repository. It scans the repository every two minutes. You can check the last status of the scanning by refreshing the Git Client page of the settings. For each Commit, the module creates a GITCommit ContentItem.

    The Orchard Collaboration recipe creates a special Workflow that is responsible for attaching Commits to the Tickets. In case of installing the module manually, you have to create the necessary workflow yourself. Here is the default workflow of Orchard Collaboration.

For SVN repository, the corresponding modules are OC.SVNConnector and OC.SVNConnector.Ticket. The settings and the process is the same as the one for GIT repository. For each SVN revision, Orchard Collaboration creates a SVNCommit ContentItem and there is a corresponding workflow too.