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

@btcxs/autogreen

v1.0.0

Published

自动保持 GitHub 提交状态常绿。

Downloads

1

Readme

auto-green

自动保持 GitHub 提交状态常绿。

a commit a day keeps your girlfriend away.

原理

使用 GitHub Actions 的定时任务功能,每隔一段时间自动执行 git commit,提交信息为 "a commit a day keeps your girlfriend away",灵感来自知乎问题在 GitHub 上保持 365 天全绿是怎样一种体验?下某匿名用户的回答:

曾经保持了 200 多天全绿,但是冷落了女朋友,一直绿到现在。

使用

  • 点右上角 Use this template 按钮复制本 GitHub 仓库,:warning: 千万不要 Fork,因为 fork 项目的动态并不会让你变绿 :warning:
  • 修改 ci.yml 文件的第 19、20 行 为自己的 GitHub 账号和昵称
  • (可选) 你可以通过修改 ci.yml 文件的第 8 行来调整频率

计划任务语法有 5 个字段,中间用空格分隔,每个字段代表一个时间单位。

┌───────────── 分钟 (0 - 59)
│ ┌───────────── 小时 (0 - 23)
│ │ ┌───────────── 日 (1 - 31)
│ │ │ ┌───────────── 月 (1 - 12 或 JAN-DEC)
│ │ │ │ ┌───────────── 星期 (0 - 6 或 SUN-SAT)
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
* * * * *

每个时间字段的含义:

|符号 | 描述 | 举例 | | ----- | -----------| -------------------------------------------| | * | 任意值 | * * * * * 每天每小时每分钟 | | , | 值分隔符 | 1,3,4,7 * * * * 每小时的 1 3 4 7 分钟 | | - | 范围 | 1-6 * * * * 每小时的 1-6 分钟 | | / | 每 | */15 * * * * 每隔 15 分钟 |

:由于 GitHub Actions 的限制,如果设置为 * * * * * 实际的执行频率为每 5 分执行一次。

License

auto-green is released under the MIT License. See the bundled LICENSE file for details.

name: ci

on:
  push:
    branches:
      - master
  schedule:
    - cron: "* */78 * * *"

jobs:
  autogreen:
    runs-on: ubuntu-latest
    steps:
      - name: Clone repository
        uses: actions/checkout@v2

      - name: Auto green
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "AndersonHJB"
          git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
          git pull --rebase
          git commit --allow-empty -m "a commit a day keeps your girlfriend away"
          git push