Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>mcGHUtilsNew to Visual Studio Code? Get it now.
mcGHUtils

mcGHUtils

mohanc5

|
14 installs
| (0) | Free
Provides Salesforce specific utils for github
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Welcome to MCGHUtils VS Code extension

  • Salesforce Specific Tools for Github and Territories

Features

1. Generates Salesforce package.xml for the given PRs (comma separated list) in your github repo

How to setup

  • Install the GitHub CLI command line application.
  • Authenticate by running gh cli login gh auth login from a terminal and following the steps in your browser.

# example gh auth login session
gh auth login
? What account do you want to log into? GitHub.com (or GitHub Enterprise Server)
? What is your preferred protocol for Git operations on this host? HTTPS
? Authenticate Git with your GitHub credentials? No
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: 70EE-13FF (mangled!)
Press Enter to open github.com in your browser... 
✓ Authentication complete.
- gh config set -h github.com git_protocol https
✓ Configured git protocol
✓ Logged in as <username>


  • Make sure to open the git repo folder in your VS Code before using this code

  • Select MCGH: PRs to package.xml from Command Palette

    • Provide PR numbers in comma separated list
  • Extension will provide you package.xml


2. Visualize Salesforce Territories

  • Select MCGH: Visualize Territories" from Command Palette

    • Provide auth.json for the org with format:
    
    { 
        "access_token": "xyz", "instance_url": "https://instance.salesforce.com" 
    }
    
    
    - Provide output format (png,svg,pdf)

 - Extension will create the visualization of the Territories


 ### Create package.xml for the given metadata types
 ```bash
 # Login into the org

 # For Sandboxes
 sf force auth web login -s -r http://test.salesforce.com

 # for Production
 sf force auth web login -s -r http://test.salesforce.com


  • Select MCGH: createPackageXml from Command Palette
  • Select Metadata types you need and click [Generate package.xml] button

3. Split the given package.xml for the given items list

  • This utility is designed to assist in splitting and managing Salesforce package.xml files by selectively extracting and organizing components based on a given list. The tool works in two main steps:
    1. Splitting the Package: Users select a package.xml file and a corresponding item-list (similar to a .forceignore file). The utility processes these files, updating the package.xml by commenting out components based on the item-list and saving the modified version as updated_package.xml.
    2. Extracting Commented Items: The second part of the utility takes the updated package.xml, extracts the commented components, and creates a new package.xml containing only the commented-out items, which can be used for further processing or review.

To Use

  • Select MCGH:Split Packages from Command Palette
  • This will create 2 package.xml files in /tmp/output (C:\tmp\output on Windows)
    • one with commented items in the given package.xml: updated_package.xml
    • one with only the commented items: commented_items_package.xml
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft