GitHub isn’t just a place to store code anymore. For many developers, it’s a living portfolio, a snapshot of what they’re building, exploring, and learning.
Though, my GitHub profile didn’t reflect that at all. This happened when I joined a company that don't use GitHub for managing the codebase.
Most of my day-to-day work happens in a private codebase hosted on **Azure DevOps**. So even though I’m actively coding, shipping, and solving problems, my GitHub looked… inactive. Almost like I stopped coding altogether.
## The Idea
One night, I decided to fix this.
Since I genuinely enjoy building automation scripts, I thought:
Why not automatically sync my activity from azure DevOps into my GitHub account?
So I built a small script that:
1. Pulls my commits from Azure DevOps (where I’m the author)
2. Replays them into a private GitHub repository
3. Runs automatically on a daily schedule
## How It Works
The setup is pretty straightforward:
- Uses Azure DevOps APIs to fetch commits
- Filters commits by author
- Pushes them into GitHub as new commits (A private repository is recommended to contain your activity)
- Runs daily using GitHub Actions.
Now, my GitHub profile reflects actual activity again without changing how or where I work. 😁
The script was originally built for my own use, but it is open-source in case it’s useful to others.
If you’re working across different platforms and want a unified presence, this might help or at least spark an idea.
👉 Check it out:
{% embed https://github.com/Raamyy/azuredevops-commits-migrator %}
## Main function
```js
async function main() {
if(AZURE_NAME == "") {
console.error("AZURE_NAME is not set. Please add it to the github secrets with your Azure username. exiting...");
return;
}
let COMMITS = [];
let projects = await getProjects();
for (let project of projects) {
let repositories = await getRepositories(project);
for (let repo of repositories) {
let commits = await getCommits(project, repo.name, AZURE_NAME, repo.defaultBranch);
COMMITS = COMMITS.concat(commits);
}
}
COMMITS = COMMITS.sort(function (a, b) {
return new Date(a.creationDate) - new Date(b.creationDate);
});
console.log(`got toal of ${COMMITS.length} commits`);
generateGitCommits(COMMITS)
}
```
If you’re interested in extending it or making it more generic, contributions are welcome. And if you have questions, feel free to reach out.
> Now I joined a bit bigger company that still I am not sure of it's policies regarding similar, so my GitHub is back dead again 😭
Do you care about the activity graph, or do you prefer to keep work and personal strictly separate?"