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

contribution-streak-maintainer

v1.0.22

Published

Automatically maintain your GitHub contribution streak

Downloads

465

Readme

📅 Contribution Streak Maintainer

npm npm GitHub License GitHub Repo stars

GitHub Workflow Status GitHub issues GitHub pull requests GitHub contributors

Test GitHub last commit GitHub code size in bytes Codecov

  • Have you ever wanted to keep your contribution streak going but never been able to?
  • Do you find it challenging to make manual contributions every single day?
  • Worry no more!

Contribution Streak Maintainer is a tool, available as an npm package, designed to be used inside a GitHub Actions workflow. This npm package is utilized within your workflow, automatically maintaining your GitHub contribution streak. The GitHub Actions workflow, configured through YAML files, generates and pushes commits to your repository, ensuring your activity stays active even on days when you're not able to make manual contributions.

Now you can focus on your work, knowing that your GitHub contributions are being taken care of automatically. Keep your streak alive effortlessly by integrating the Contribution Streak Maintainer npm package into your GitHub Actions workflow!

Installation

Here is how to add my badges to your profile:

  1. Star this repository.

  2. Create a private repository your-username/name-of-your-choice

  3. Add the following workflow to your repository at .github/workflows/contribution-streak-maintainer.yml

    name: contribution-streak-maintainer
    
    on:
      workflow_dispatch:
      schedule:
        # For more information on the cron scheduler,
        # see https://crontab.guru/ or https://crontab.cronhub.io/.
        # This cron schedule means the action runs every day at midnight UTC.
        - cron: "0 22 * * *"
    
    permissions:
      contents: write
    
    jobs:
      contribution-streak-maintainer:
        runs-on: ubuntu-latest
        steps:
          - name: Make a contribution
            run: npx contribution-streak-maintainer ${{github.repository}} [email protected]
            env:
              DEVFUL_GITHUB_TOKEN: ${{ secrets.CSM_GITHUB_TOKEN }}
  4. Create your own personal access tokens (classic)

    1. Verify your email address, if it hasn't been verified yet.
    2. In the upper-right corner of any page, click your profile photo, then click Settings.
    3. In the left sidebar, click Developer settings.
    4. In the left sidebar, under Personal access tokens, click Tokens (classic).
    5. Click Generate new token button then Generate new token (classic).
    6. Under Note, enter a name for the token.
    7. Under Expiration, select No expiration for the token.
    8. Under Select scopes, check repo, read:user, user:email.
    9. Click Generate token.
    10. Note down the generated token.
  5. Create a secret for your private repository

    • Check out the docs
    • In the Name field, type CSM_GITHUB_TOKEN.
    • In the Secret field, enter the newly generated token.

NOTE: Ensure that the GitHub token (CSM_GITHUB_TOKEN) is kept private and not shared publicly.

Run Manually

You can start contribution-streak-maintainer workflow manually, or wait for it to run automatically.

Alternatively, you can perform these steps manually:

  • Go to your newly created local repo.
  • Run npx contribution-streak-maintainer <username>/<repository_name> --email=<email> --token=<token> --condition=<condition>
    • Example: npx contribution-streak-maintainer my-username [email protected] --token=gph_nJkKQKJKFb7YxqkLtFf3wvXyU6X --condition=6
  • Verify changes in AUTOMATED_CONTRIBUTIONS.md.

Configuration

| Param | ENV alias | Type | Description | Required | Default | | ------------ | --------------------- | ------ | ----------------------------------------------------------------- | -------- | ------- | | repository | DEVFUL_GITHUB_REPO | String | The owner and repository name. For example, octocat/Hello-World | Yes | | | email | | String | Primary email address associated with your GitHub account | Yes | | | token | DEVFUL_GITHUB_TOKEN | String | Github Auth token | Yes | | | condition | | String | Condition for contribution to be made | No | 0 |

By default, this action runs daily, checks if the user has made any contribution, and generates a random number of commits between 1-3. If the user sets the condition to, for example, 5, the action will only make commits if the user has made 0-5 commits that day.

Authors

License

MIT