Coder Social home page Coder Social logo

kausko / githits Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 107 KB

Permanent storage for GitHub's Traffic Insights

Home Page: https://github.com/marketplace/actions/githits-action

License: MIT License

JavaScript 100.00%
traffic-insights views clones github-actions-javascript readme-card

githits's Introduction

GitHits

A GitHub Action for *permanently storing the traffic insights, i.e. views and counts, generated by GitHub.

*GitHub only provides traffic insights over a 14-day period. This GitHub Action was built to overcome that limitation.

Built for usage with GitHitServer.

Usage

  • Create/Retrieve a Personal Access Token with repository-level access and create a repository secret with key: PAT and value: 40-character-PAT
  • Head over to GitHub actions and create a GitHub Actions workflow file by clicking on set up a workflow yourself
  • In the created file (.github/workflows/main.yml), add the following contents:
# Controls when the action will run. 
on:
  schedule:
    - cron: "00 23 * * *"
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  j1:
    name: GitHitJob
    runs-on: ubuntu-latest
    steps:
      - name: GitHits-Action
        id: gh
        uses: kausko/GitHits@v1
        with:
          pat: ${{ secrets.PAT }}
      - name: Output
        run: echo ${{ steps.gh.outputs.status }}
  • This action will run everyday at 23:00 and populate the hits.json file. This behaviour can be changed by modifying the cron value.
  • This action can also be run manually.
  • To use this data on your README, head over to GitHitServer.

NOTE: Keep the IDs, variables and secrets consistent throughout the setup

Inspired by

githits's People

Contributors

kausko avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.