npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gitivity

v1.0.0

Published

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

Downloads

9

Readme

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!