Operations 9 min read

Pull Request Diff Copy Plugin for VSTS: Incremental Deployment and CI/CD Automation

This article introduces the Pull Request Diff Copy plugin for Visual Studio Team Services, explains its background, how it extracts incremental file differences during pull‑request builds, and details the automated CI/CD pipeline used to develop, test, and publish the extension, significantly reducing deployment time.

DevOps
DevOps
DevOps
Pull Request Diff Copy Plugin for VSTS: Incremental Deployment and CI/CD Automation

Visual Studio Team Service (VSTS) has evolved for 13 years and, after five years of online operation, is now a mature commercial DevOps toolchain. Its Marketplace offers over 15,000 plugins for Visual Studio, VS Code, and VSTS itself, providing developers with a rich ecosystem of extensions to boost productivity.

Pull Request Diff Copy Plugin Background

In a previous article ( DevOps Documentation Center Technical Evolution ) we noted that our documentation site (https://docs.devopshub.cn) accumulated over 2,000 documents and more than 2 GB of data. A full redeployment of the site once took 1 hour 45 minutes, an unacceptable delay for frequent updates.

To address this, team member Li Xiaoming researched incremental publishing, resulting in the Pull Request Diff Copy plugin.

Plugin URL: https://marketplace.visualstudio.com/items?itemName=lean-soft.pull-request-diff-copy

GitHub repository: https://github.com/lean-soft/pull-request-diff-copy

The plugin works simply: using VSTS/TFS branch policies, when a Pull Request is created or updated, the CI build triggers the plugin, which compares the feature branch with the master branch, extracts the differing files, and packages them as an incremental file bundle.

After the Pull Request triggers, the task runs and extracts the diff files, as shown in the log output:

The resulting diff package matches the Pull Request and can be consumed by downstream CD pipeline tasks.

Using this plugin, the entire CI/CD pipeline execution time dropped to under one minute, allowing developers to see site changes within seconds after updating the feature branch.

Plugin Deployment and Release Pipeline Implementation

To streamline development, testing, and publishing of the plugin to the VSTS Marketplace, we built an automated CI/CD pipeline. As a build‑task extension, it must be tested within an existing CI build and requires Pull Request context. The typical workflow includes:

1) Modify code 2) Update version number (required for marketplace publishing) 3) Package with the tfx tool into a VSIX file 4) Install/update the VSIX on a test TFS/VSTS server 5) Trigger a build and review logs

If tests fail, the cycle repeats; fixing a small issue may take 1 minute to edit code but at least 5 minutes to package and deploy, leading to low efficiency.

Our automated pipeline uses our company’s TFS server as the test environment, reuses the same CI that validates the documentation center, and after a successful test, a manual approval triggers publishing to the VSTS Marketplace and synchronizes the code to GitHub.

We also replace the VSIX version number with Build.BuildId , so developers no longer need to manually bump versions; the build system handles it.

We hope the Pull Request Diff Copy plugin helps others; please submit feedback via GitHub if you encounter issues.

Feedback URL: https://github.com/lean-soft/pull-request-diff-copy/issues

Related Articles:

DevOps Documentation Center Technical Practice Evolution

Microsoft R&D Cloud Suite VSTS in China

Markdown/reST Documentation DevOps Pipeline

7 Useful Git GUI Clients

Connecting to TFS/VSTS Git Repositories via SSH

GitHub + VSTS Bidirectional Sync

CI/CDplugindevopspull requestVSTSincremental deployment
DevOps
Written by

DevOps

Share premium content and events on trends, applications, and practices in development efficiency, AI and related technologies. The IDCF International DevOps Coach Federation trains end‑to‑end development‑efficiency talent, linking high‑performance organizations and individuals to achieve excellence.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.