Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitivity

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitivity

A dumb utility to help you mirror your GitLab and GitHub contributions.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Gitivity

Build Status Published Version Published Downloads

A dumb utility to help you mirror your GitLab and GitHub contributions.

This tool exists for those people who regularly work on both and want to replicate their activity from one to the other. It is extremely basic, but will serve the purpose for most users. Right now it only supports GitHub and GitLab, on the public endpoints. If there's any interest I might add support for Enterprise versions, or other APIs (Bitbucket, etc).

This tool will attempt to replicate "activity" as defined by each service, in order to make charts match across services. This may not always be possible, so don't expect to see identical charts - but they should generally be pretty close. Please also keep in mind that their definitions of activity can change at any point, but I'll do my best to keep up!

How It Works

The idea here is pretty simple. You first export your commit data from a service (e.g. GitLab) and then import it into a repository locally. For each exported commit, a new empty commit will be generated with a matching timestamp and author.

The message of the commit contains an identifier we can use to filter out duplicate commits on subsequent runs by scanning the Git log. This means that you can safely schedule this to run daily or weekly without fear of duplicates.

If you have a lot of commits, it will take a long time to run initially. Making a commit takes about 25ms (on my machine), so expect a few minutes if you're porting over thousands of commits. Subsequent runs of this tool will speed up as it will only create commits for newly exported commits.

Migrating Activity

You can install gitivity from either this repository, or from npm.

Using gitivity from the CLI is simple:

gitivity export <service> <token>
gitivity import <target>

Both of these commands work via stdio so you can pipe between them, or buffer to files as an interim:

gitivity export gitlab glpat-_******************* > export.jsonl
gitivity import my-gitlab-activity < export.jsonl

This will export your GitLab activity and create a new repository located inside a new directory named my-gitlab-activity. You can then create a private GitHub repository and use it as a remote, which should mirror the activity to your profile.

Help & Issues

Although this is a tool primarily designed for my own use I'm happy to hear and consider feedback, even though I'll likely try to avoid getting too broad when it comes to things like new features. Feel free to file issues if you need help and/or have suggestions!

Keywords

FAQs

Package last updated on 14 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc