Skip to content

Instantly share code, notes, and snippets.

View jlantz's full-sized avatar

Jason Lantz jlantz

View GitHub Profile
@jlantz
jlantz / filestruct.py
Created November 15, 2024 16:43
Simple script to help prevent GitHub Copilot from creating duplicates in a larger project
#!/usr/bin/env python3
# USAGE: python filestruct.py <path> > report.md
# Add to your .github/copilot-instructions.md
import os
import re
import sys
@jlantz
jlantz / SnapshotHashes.md
Last active October 5, 2024 21:53
A demo of CumulusCI calculating hashes of current and desired org state for comparison...

Overview

The original purpose of the CumulusCI Org History functionality was to create a hash representing the full state of the org prepared for a Scratch Org Snapshot so snapshots could be looked up by a hash of their state stored in the name.

Seems simple, right? ~4k lines of code says WRONG :)

But, those lines of code make the interface really easy now! 🎉

The example below starts with using the new cci hash dependencies task to dynamically resolve the latest version and dependencies for Salesforce.org's NPSP from its GitHub repository, one of CumulusCI's magical features.

@jlantz
jlantz / release_2gp.md
Last active September 29, 2024 17:08
Opportunities for Optimizing D2X's Release 2GP Workflow With Multiple Jobs

D2X's Release 2GP flow could be optimized by splitting into separate jobs. The advantages include:

  1. Faster build times by running jobs in parallel
  2. Better integration into GitHub's web user experience for viewing Actions Workflow executions
  3. Retry only failed jobs instead of re-running everything (release promotion + test)

This sets up the reusable workflow as callable and requires the dev-hub-auth-url secret:

name: Release 2GP
@jlantz
jlantz / CumulusCI-Org-History.md
Created September 24, 2024 04:21
A quick overview of the new Org

The functionality below is currently being developed in the https://github.com/muselab-d2x/CumulusCI fork and will be contributed to CumulusCI soon. For now, here's a brief overview...

The New cci history Command Group Shows...

 oh-snap  cci
Usage: cci [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
@jlantz
jlantz / cumulusci.yml
Last active June 23, 2024 00:37
Prototype Output of MuseLab D2X Dependency Composer
# The source cumulusci.yml file in the D2X-Cloud-Demo-1 repo defining the dependencies to be resolved...
minimum_cumulusci_version: '3.76.0'
project:
name: D2X-Cloud-Demo-1
package:
name: D2X Cloud Demo 1
namespace: d2x
api_version: '58.0'
git: