{"id":17084555,"url":"https://github.com/nsaunders/star-trak","last_synced_at":"2026-05-04T01:31:24.318Z","repository":{"id":224378594,"uuid":"763113731","full_name":"nsaunders/star-trak","owner":"nsaunders","description":"Monitor GitHub stars","archived":false,"fork":false,"pushed_at":"2024-03-03T13:35:58.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T20:12:24.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsaunders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-25T15:43:36.000Z","updated_at":"2024-02-25T15:43:59.000Z","dependencies_parsed_at":"2024-02-25T16:44:59.725Z","dependency_job_id":"81889006-6392-4eb6-8710-60ef983bb7a5","html_url":"https://github.com/nsaunders/star-trak","commit_stats":null,"previous_names":["nsaunders/star-trak"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Fstar-trak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Fstar-trak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Fstar-trak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsaunders%2Fstar-trak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsaunders","download_url":"https://codeload.github.com/nsaunders/star-trak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245111928,"owners_count":20562511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T13:07:55.771Z","updated_at":"2026-05-04T01:31:19.284Z","avatar_url":"https://github.com/nsaunders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Star Trak\n\n[![Build Status](https://github.com/nsaunders/star-trak/workflows/build/badge.svg)](https://github.com/nsaunders/star-trak/actions/workflows/build.yml?query=branch%3Amaster)\n[![Latest release](http://img.shields.io/github/release/nsaunders/star-trak.svg)](https://github.com/nsaunders/star-trak/releases)\n\n## Overview\n\nEver noticed fluctuations in your repository's GitHub star count and wondered\nwhat happened? This action helps you track star activity using the\n[List Stargazers API](https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#list-stargazers).\nThe data are written in JSON format to a file of your choosing. You can use the\n[EndBug/add-and-commit](https://github.com/EndBug/add-and-commit) action to\ncommit the result to your Git repository or even publish it to an external\nservice like S3.\n\n## Getting started\n\n### Personal Access Token\n\nYou'll first need to create a Personal Access Token (PAT) to allow access to the\nList Stargazers API. Follow\n[these instructions](https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\nto create your PAT with the **public_repo** scope.\n\nNext, add the PAT to your repository's encrypted secrets following\n[these instructions](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).\nYou can choose any name you want; but, if you're looking for a suggestion,\n**GH_ACCESS_TOKEN** works well.\n\n### Workflow configuration\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003e [!NOTE]\n\u003e This section focuses on configuring this particular action. For a complete\n\u003e workflow you can use, see [Sample workflow](#sample-workflow) below.\n\u003c!-- prettier-ignore-end --\u003e\n\nYou'll need to add a step like this to your GitHub Actions workflow file.\n\n```yaml\n- uses: nsaunders/star-trak@v1\n  with:\n    path: .github/stars.json # default\n    repo: ${{ github.repository }}\n    token: ${{ secrets.GH_ACCESS_TOKEN }}\n```\n\n#### How it works\n\nWhen this step runs:\n\n- the file at the specified `path` will be read if it exists;\n- a new entry containing _added_ and _removed_ stargazers will be added; and\n- the result will be saved to the file at the specified `path`.\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003e [!NOTE]\n\u003e If the file at the specified `path` does not exist, it will automatically be\n\u003e created for you.\n\u003c!-- prettier-ignore-end --\u003e\n\n#### Inputs\n\n| Name      | Description                                                                                                                                                                                                                                                                                          | Required? |\n| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |\n| **path**  | The path (relative to the workspace) where star data will be written in JSON format. If the file does not exist, then it will be created automatically. Otherwise, new data will be added to it while preserving any existing data. If not specified, this setting defaults to _.github/stars.json_. | optional  |\n| **repo**  | The repository whose stars to monitor in _\u0026lt;owner\u0026gt;/\u0026lt;repository\u0026gt;_ format. A typical value, obtained from the [github context](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context), would be `${{ github.repository }}`.                                       | required  |\n| **token** | The PAT used to access the List Stargazers API                                                                                                                                                                                                                                                       | required  |\n\n#### Recommendations\n\n1. Use a\n   [`schedule` event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)\n   to run the workflow on a recurring schedule. Weekly is a \"sensible default\",\n   but you may want to consider running it daily if your repository's stars\n   fluctuate more frequently, in order to ensure that all activity is captured.\n2. Use [actions/checkout](https://github.com/actions/checkout) and\n   [EndBug/add-and-commit](https://github.com/EndBug/add-and-commit) to ensure\n   that history is saved across workflow runs. Alternatively, you can design any\n   workflow that begins by retrieving your `stars.json` file (e.g. from a S3\n   bucket) into your workspace and saving it back to the same place at the end.\n\n## Sample workflow\n\nstars.yml:\n\n```yaml\nname: stars\n\non:\n  schedule:\n    - cron: \"45 23 * * 0\"\n\njobs:\n  update:\n    name: update\n\n    runs-on: ubuntu-latest\n\n    env:\n      STARS_PATH: meta/stars.json\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: nsaunders/star-trak@v1\n        with:\n          path: ${{ env.STARS_PATH }}\n          repo: ${{ github.repository }}\n          token: ${{ secrets.GH_ACCESS_TOKEN }}\n\n      - uses: EndBug/add-and-commit@v9\n        with:\n          add: ${{ env.STARS_PATH }}\n          author_name: GitHub Actions\n          author_email: 41898282+github-actions[bot]@users.noreply.github.com\n          message: Log repository stars.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsaunders%2Fstar-trak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsaunders%2Fstar-trak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsaunders%2Fstar-trak/lists"}