{"id":15512075,"url":"https://github.com/minicli/action-contributors","last_synced_at":"2025-07-11T06:39:45.415Z","repository":{"id":42467832,"uuid":"427065137","full_name":"minicli/action-contributors","owner":"minicli","description":"GitHub Action to dynamically update CONTRIBUTORS file","archived":false,"fork":false,"pushed_at":"2022-10-07T17:15:42.000Z","size":39,"stargazers_count":83,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T21:46:25.440Z","etag":null,"topics":["actions","contributors","github","github-action","github-actions","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/minicli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-11T16:15:36.000Z","updated_at":"2024-02-29T12:19:55.000Z","dependencies_parsed_at":"2022-09-14T00:10:53.577Z","dependency_job_id":null,"html_url":"https://github.com/minicli/action-contributors","commit_stats":{"total_commits":19,"total_committers":5,"mean_commits":3.8,"dds":0.4736842105263158,"last_synced_commit":"4a3b8eebbe5369c9d98d4d415a47790997888143"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/minicli/action-contributors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minicli%2Faction-contributors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minicli%2Faction-contributors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minicli%2Faction-contributors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minicli%2Faction-contributors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minicli","download_url":"https://codeload.github.com/minicli/action-contributors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minicli%2Faction-contributors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264749868,"owners_count":23658288,"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":["actions","contributors","github","github-action","github-actions","hacktoberfest"],"created_at":"2024-10-02T09:53:25.155Z","updated_at":"2025-07-11T06:39:45.363Z","avatar_url":"https://github.com/minicli.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Generate / Update CONTRIBUTORS File - GitHub Action\n\nThis GitHub Action updates a CONTRIBUTORS file with the top contributors from the specified project, pulling contents from the GitHub API. You can use it in combination with an action to push changes directly into your project's main branch, or with an action that creates a PR with the updated file.\n\n### Supported Configuration via Environment Variables:\n\n- CONTRIB_REPOSITORY: The repository you want to pull contributors from. This is mandatory.\n- CONTRIB_OUTPUT_FILE: The file you want to generate, default set to `CONTRIBUTORS.md`.\n- CONTRIB_STENCIL_DIR: Where to find Stencil templates. Default set to `.stencil`.\n- CONTRIB_TEMPLATE: The [stencil](https://github.com/minicli/stencil) template to use - you can use this to customize the generated markdown file. Default set to the included `contributors.tpl` file.\n- CONTRIB_IGNORE: A comma-separated string with users to ignore. Default set to `github-actions[bot],renovate-bot,dependabot`.\n\n## Basic Usage\n\nThis action is made to use in conjunction with [test-room-7/action-update-file](https://github.com/marketplace/actions/update-files-on-github) in order to automatically commit an updated CONTRIBUTORS file in a fixed interval.\n\nThe following example sets a workflow to update the file once a month, committing the changes directly to the main project's branch:\n\n```yaml\nname: Update CONTRIBUTORS file\non:\n  schedule:\n    - cron: \"0 0 1 * *\"\n  workflow_dispatch:\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: minicli/action-contributors@v3.3\n        name: \"Update a projects CONTRIBUTORS file\"\n        env:\n          CONTRIB_REPOSITORY: 'minicli/minicli'\n          CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md'\n      - name: Commit changes\n        uses: test-room-7/action-update-file@v1\n        with:\n          file-path: 'CONTRIBUTORS.md'\n          commit-msg: Update Contributors\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\nYou need to replace the `CONTRIB_REPOSITORY` value with the GitHub project you want to pull contributors from.\n\nIf you'd prefer to create a pull request instead of committing the changes directly to the main branch, \nyou can use the [create-pull-request](https://github.com/marketplace/actions/create-pull-request) action instead. That will require also the [actions/checkout](https://github.com/actions/checkout) GitHub action.\n\n```yaml\n\nname: Update CONTRIBUTORS file\non:\n  schedule:\n    - cron: \"0 0 1 * *\"\n  workflow_dispatch:\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: minicli/action-contributors@v3.3\n        name: \"Update a projects CONTRIBUTORS file\"\n        env:\n          CONTRIB_REPOSITORY: 'minicli/docs'\n          CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md'\n      - name: Create a PR\n        uses: peter-evans/create-pull-request@v3\n        with:\n          commit-message: Update Contributors\n          title: \"[automated] Update Contributors File\"\n          token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Using a Custom Template\n\nThis action uses a simple templating lib that allows some customization for the final generated markdown file.\n\nHere's how the default template looks like:\n\n```markdown\n# Top Contributors: {{ repo }}\nShout out to our top contributors!\n\n{{ content }}\n\n_Last updated: {{ updated }}_\n```\n\nThe app will pass on the following variables to the template, which you can use as you prefer:\n- `repo`: the repository from where the data is coming from. Ex: `minicli/minicli`\n- `content`: the full list of contributors\n- `updated`: date and time the file was generated in RFC822 format\n\nTo use a custom template, create a `.tpl` file based on the default template.\nThen, include the following environment variables on your workflow:\n\n- `CONTRIB_STENCIL_DIR`: a directory in your workflow repository where you'll have your template(s). Set this as `${{ github.workspace }}/YOUR_DIRECTORY` \n- `CONTRIB_TEMPLATE`: the name of the file, without the `tpl` extension. Default: `contributors`\n\nThis template file must be committed to the same repository where the workflow is defined.\n\nThen, you'll also need to include the `actions/checkout` action to your workflow so that your repo files are available to the GitHub runner when it executes the action.\n\nHere is an example of a workflow that uses a custom template called `mytemplate.tpl`, located in a `.stencil` directory in the repository where the workflow is set:\n\n```yaml\nname: Update CONTRIBUTORS file\non:\n  schedule:\n    - cron: \"0 0 1 * *\"\n  workflow_dispatch:\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: minicli/action-contributors@v3.3\n        name: \"Update a projects CONTRIBUTORS file\"\n        env:\n          CONTRIB_REPOSITORY: 'minicli/minicli'\n          CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md'\n          CONTRIB_STENCIL_DIR: ${{ github.workspace }}/.stencil\n          CONTRIB_TEMPLATE: mytemplate\n      - name: Commit changes\n        uses: test-room-7/action-update-file@v1\n        with:\n          file-path: 'CONTRIBUTORS.md'\n          commit-msg: Update Contributors\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminicli%2Faction-contributors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminicli%2Faction-contributors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminicli%2Faction-contributors/lists"}