Julien Lengrand-Lambert 7751460b0c And with sources?
2023-09-04 16:18:28 +02:00
2023-09-04 16:07:46 +02:00
2023-06-29 13:27:09 +02:00
2023-09-04 16:18:28 +02:00
2023-07-07 10:55:57 +02:00
2023-07-07 10:55:57 +02:00
2023-09-04 16:18:28 +02:00
2023-06-23 16:23:00 +02:00
2023-06-29 13:27:09 +02:00
2023-06-29 14:23:53 +02:00

GitHub repository statistics

This action grabs repository traffic from GitHub and send them to Repo Insights.

The main idea here is to get over the limitation of Github's traffic view, which only shows the last 14 days of traffic.

Inputs

access-token

Required The action requires a GitHub access token with write access to the repository. You can create one here.

Note: Make sure to add the token to your repository secrets and not to hardcode it in your workflow.

repository

The repository to grab the statistics from. Defaults to the current repository.

Note: Use the full name of the repository, including the owner. For example: jlengrand/github-repository-stats-action.

server-url

The URL of the Repo Insights server to send the data to. Used only for internal testing, and should not be used in production. Defaults to https://www.repoinsights.com/.

Outputs

payload

Payload contains all the data grabbed from the GitHub API and sent to the website.

Example usage

You will need some sort of trigger to run the action. I recommend you use a cron job. You can run it once a week, or more often in order to avoid losing data in case the action fails.

on:
  schedule:
    - cron: '30 5 * * *' # Every day at 5:30 AM UTC

jobs:
  stats_job:
    runs-on: ubuntu-latest
    name: Grabbing latest statistics from the repository, every day
    steps:
      - name: Grabbing repo stats
        id: stats
        uses: /jlengrand/github-repository-stats-action
        with:
          access-token: ${{ secrets.ACCESS_TOKEN }}

License

See the LICENSE file for license rights and limitations.

Author

Description
No description provided
Readme MIT 578 KiB
Languages
JavaScript 98.2%
Shell 1.8%