Organization monorepo that contains Microsoft Graph repositories as unified source code.
This repository provides a monorepo structure to sync and integrate repositories from the Microsoft Graph GitHub organization into a single repository. All cloned repositories have their .git directories removed to avoid submodules and create a true monorepo.
repos-config.json- Configuration file defining which microsoftgraph repos to includerepos.md- Tab-separated data file listing all available Microsoft Graph repositoriessync-repos.sh- Script to clone the repositories and integrate them into the monoreporepos/- Directory where repositories are cloned and integrated (committed to git).github/workflows/sync-repos.yml- GitHub Actions workflow to automate syncing
To sync repositories from microsoftgraph organization into the monorepo:
./sync-repos.shThis script will:
- Read the repository list from
repos-config.json - Clone each repository into the
repos/directory - Remove all
.gitdirectories to create a true monorepo (no submodules) - Integrate the source code directly into this repository
Note: The GitHub Actions workflow automatically runs this script daily and commits any new repositories.
The repos-config.json file is automatically generated from repos.md. To update it:
# Parse repos.md and regenerate repos-config.json
awk -F'\t' 'BEGIN {
print "{"
print " \"source_org\": \"microsoftgraph\","
print " \"target_org\": \"rzonedevops/org-msg\","
print " \"repos\": ["
first = 1
}
NR > 1 && $2 != "" {
desc = $4
gsub(/"/, "\\\"", desc)
if (!first) print ","
first = 0
printf " {\n"
printf " \"name\": \"%s\",\n", $2
printf " \"description\": \"%s\"\n", desc
printf " }"
}
END {
print "\n ]"
print "}"
}' repos.md > repos-config.json- Git
- jq (JSON processor)
- Bash
Install jq on Ubuntu/Debian:
sudo apt-get install jqInstall jq on macOS:
brew install jqThis repository uses a true monorepo approach:
- All Microsoft Graph repositories are cloned into the
repos/directory - The
.gitdirectories are removed from each cloned repository - This avoids git submodules and creates a unified source tree
- All code is committed directly to this repository
- The GitHub Actions workflow automatically syncs new repositories daily
- Single git history for all Microsoft Graph code
- No submodule complexity
- Easy to search across all repositories
- Simplified dependency management
- Centralized issue tracking
This monorepo currently includes 235 repositories from the Microsoft Graph organization. See repos-config.json for the complete list.
Some notable repositories included:
- Microsoft Graph SDKs (.NET, JavaScript, Python, Java, PHP, Go, PowerShell, etc.)
- Microsoft Graph samples and training modules
- Microsoft Graph documentation
- Microsoft Graph tooling and utilities
The repository uses GitHub Actions to automatically:
- Run the sync script daily at 00:00 UTC
- Clone any new repositories listed in
repos-config.json - Remove
.gitdirectories from cloned repositories - Commit and push changes to the main branch
Manual sync can also be triggered via the GitHub Actions UI.
This mapping repository follows the licenses of the individual mapped repositories from the Microsoft Graph organization.