{"id":22383769,"url":"https://github.com/khulnasoft/contribution-graph-action","last_synced_at":"2025-03-26T20:17:29.556Z","repository":{"id":243424744,"uuid":"812390798","full_name":"khulnasoft/contribution-graph-action","owner":"khulnasoft","description":"🙈 This GitHub action will automatically push empty commits to one of your repositories.","archived":false,"fork":false,"pushed_at":"2024-08-27T16:09:13.000Z","size":447,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T02:16:26.839Z","etag":null,"topics":["automatically","contribution","contribution-graph"],"latest_commit_sha":null,"homepage":"https://khulnasoft.github.io/contribution-graph-action/","language":"JavaScript","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/khulnasoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-08T18:50:07.000Z","updated_at":"2024-08-27T16:08:44.000Z","dependencies_parsed_at":"2024-06-08T20:02:03.016Z","dependency_job_id":"e4d51fd0-9fca-4bbe-a4ad-d88575a53cc8","html_url":"https://github.com/khulnasoft/contribution-graph-action","commit_stats":null,"previous_names":["khulnasoft/contribution-graph-action"],"tags_count":3,"template":false,"template_full_name":"actions/javascript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khulnasoft%2Fcontribution-graph-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khulnasoft%2Fcontribution-graph-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khulnasoft%2Fcontribution-graph-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khulnasoft%2Fcontribution-graph-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khulnasoft","download_url":"https://codeload.github.com/khulnasoft/contribution-graph-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245727720,"owners_count":20662557,"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":["automatically","contribution","contribution-graph"],"created_at":"2024-12-05T01:15:11.005Z","updated_at":"2025-03-26T20:17:29.535Z","avatar_url":"https://github.com/khulnasoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"150px\" src=\"./.github/images/cover.png\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\n  Contribution Graph Action\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/khulnasoft/contribution-graph-action/actions?query=workflow%3Abuild\"\u003e\n    \u003cimg src=\"https://github.com/khulnasoft/contribution-graph-action/workflows/build/badge.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/khulnasoft/contribution-graph-action/actions?query=workflow%3Atests\"\u003e\n    \u003cimg src=\"https://github.com/khulnasoft/contribution-graph-action/workflows/tests/badge.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/khulnasoft/contribution-graph-action/actions?query=workflow%3Aaudit\"\u003e\n    \u003cimg src=\"https://github.com/khulnasoft/contribution-graph-action/workflows/audit/badge.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/marketplace/actions/autopopulate-contribution-graph\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/action-marketplace-orange?logo=github\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/khulnasoft/contribution-graph-action/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/khulnasoft/contribution-graph-action.svg?logo=github\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Maybe most of your coding happens on another version control host, like GitLab or Bitbucket. Maybe your company uses GitHub Enterprise but hasn't enabled [unified contributions](https://docs.github.com/en/enterprise-server@latest/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise). Maybe you're looking for a new software development job and are worried that recruiters will prejudge you by your scarce contribution graph.  \n\u003e Or maybe you have [other reasons](https://twitter.com/jacobmparis/status/1265740598277025792). Whatever the case may be, you've come to the right place.\n\n## Quick start without leaving your browser ⚡\n\n1. [Create a new repo](https://github.com/new) (preferably private unless you have no shame)\n1. Click on **Create a new file**  \n   ![](./.github/images/create-new-file.png)\n1. In the **Name your file...** field, type in `.github/workflows/main.yml`\n   ![](./.github/images/name-new-file.png)\n1. Paste in one of the YAML file contents below, depending on what you want to do. Be sure to update `GIT_EMAIL`.\n1. Click the **Commit new file** button at the bottom of the page. You're all set!\n   - Note that you must enable the option below in your contribution settings for private commits to count on the graph.\n     ![](.github/images/private-contributions.png)\n\nIf you change your mind about these commits later, you can delete the repository and they'll disappear from your contribution graph.\n\n### Push a commit to GitHub once a day 🍺\n\n```yml\n# .github/workflows/main.yml\n\non:\n  schedule:\n    - cron: \"0 12 * * *\" # every day at noon\n\njobs:\n  single-commit:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n    steps:\n      - uses: khulnasoft/contribution-graph-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GIT_EMAIL: you@youremail.com # replace me\n```\n\nIf you need help with cron job syntax, [crontab guru](https://crontab.guru/) is a great resource.\n\n### Backfill a year of commits whenever you push to GitHub 🍻\n\nThis rolls a pseudorandom number generator between 1 and 5 (inclusive) to determine how many commits to make per-day.\n\n```yml\n# .github/workflows/main.yml\n\non: push\n\njobs:\n  backfill-commits:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n    steps:\n      - uses: khulnasoft/contribution-graph-action@v2\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          GIT_EMAIL: you@youremail.com # replace me\n          MAX_DAYS: 365\n          MIN_COMMITS_PER_DAY: 1\n          MAX_COMMITS_PER_DAY: 5\n```\n\nKeep reading for more cool stuff like:\n\n- skipping weekends/weekdays\n- backfilling specific time periods\n- custom commit messages\n- and more!\n\n## Environment variables 🌳\n\n| Key                   | Description                                                                                                                    | Default value                                         | Required? |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- | --------- |\n| `GITHUB_TOKEN`        | Allows this GitHub Action to make commits for you. Simply pass in `${{ secrets.GITHUB_TOKEN }}`. [Read more](#github_token-).  |                                                       | 🟩        |\n| `GIT_EMAIL`           | An email address associated with your GitHub account. Without this, contributions won't show up. [Read more](#git_email-).     |                                                       | 🟩        |\n| `GIT_BRANCH`          | Must either be the default branch or `gh-pages` for contributions to show up.                                                  | The branch that triggered this Github Action          |           |\n| `GIT_COMMIT_MESSAGE`  | The message to use for commits made by this GitHub Action.                                                                     | `chore(actions): empty commit for contribution graph` |           |\n| `ORIGIN_TIMESTAMP`    | The unix timestamp to start commits on. If you set `MAX_DAYS` greater than 1, commits will be made on days prior to this time. | The current timestamp                                 |           |\n| `MAX_DAYS`            | The maximum integer number of days to commit on. If you want to backfill a year of commits, set this to `365`.                 | `1`                                                   |           |\n| `MIN_COMMITS_PER_DAY` | The minimum integer number of commits to make per day (inclusive). Used by a pseudo-RNG.                                       | `1`                                                   |           |\n| `MAX_COMMITS_PER_DAY` | The maximum integer number of commits to make per day (inclusive). Used by a pseudo-RNG.                                       | `1`                                                   |           |\n| `INCLUDE_WEEKDAYS`    | A boolean indicating whether or not to make commits on weekdays.                                                               | `true`                                                |           |\n| `INCLUDE_WEEKENDS`    | A boolean indicating whether or not to make commits on weekends.                                                               | `true`                                                |           |\n| `FORCE_PUSH`          | A boolean indicating whether or not to force push. **WARNING:** Setting this to `true` will clear out your repo on each run!   | `false`                                               |           |\n\n### Advanced environment variables 🧙‍♂️\n\n\u003cdetails\u003e\n\n\u003csummary\u003eThere's also some advanced environment variables you can provide. Click here!\u003c/summary\u003e\n\nOnly set these if you know what you're doing:\n\n| Key                 | Description                                                                  | Default value                                                     | Required? |\n| ------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- |\n| `GIT_HOST`          | You may be able to override this to support a GitHub Enterprise environment. | `github.com`                                                      |           |\n| `GIT_SSH_COMMAND`   |                                                                              | `ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no` |           |\n| `GITHUB_ACTOR`      |                                                                              | Set by the GitHub Actions runner                                  |           |\n| `GITHUB_REPOSITORY` |                                                                              | Set by the GitHub Actions runner                                  |           |\n\n\u003c/details\u003e\n\n## How do I know this is secure? 🔒\n\nExplore the [code](src/index.js)! It's tiny and there aren't many dependencies.\n\nSpeaking of dependencies, all production npm dependencies used by this GitHub Action are [automatically audited](./.github/workflows/audit.yml) for vulnerabilities. If the badge at the top of this README is green, you're good to go.\n\nIf you're still worried about malicious code in this repository, GitHub recommends always using a specific version of any GitHub Actions you add to your repositories. [Read more](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses).\n\n```diff\nuses: khulnasoft/contribution-graph-action@2.0.0\n```\n\nAs far as data security, there's two sensitive pieces of data that this Action handles:\n\n- [`GITHUB_TOKEN`](#github_token-)\n- [`GIT_EMAIL`](#git_email-)\n\n### `GITHUB_TOKEN` 🔑\n\nGitHub has [a great article](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) about the token. It's the standard way that all GitHub Actions interact with GitHub on your behalf. The permissions of this token are both short-lived and scoped to one repo only.\n\nYou don't need to create this secret yourself; GitHub handles that for you. All you need to do is provide the token in your workflow, job, or step:\n\n```yml\nenv:\n  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n#### Getting 403 errors? ❌\n\nMake sure your token has [write permission for the `contents` scope](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs). If you're using the examples in this README, this is already done for you.\n\nYou can alternatively set this as a repo-level default:\n\n![](./.github/images/token-permissions.png)\n\n### `GIT_EMAIL` 📧\n\nThis GitHub Action requires an email associated with your GitHub account. If you provide a random or throwaway email, contributions won't show up on your GitHub profile. [Read more](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#you-havent-added-your-local-git-commit-email-to-your-profile).\n\nChances are, your email is already public if you're making commits with it. But if you're concerned about privacy, you can do either of the following:\n\n- [Add your email as a secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) and pass it in the same way as the `GITHUB_TOKEN`\n- [Use your GitHub-provided `noreply` email address](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#about-commit-email-addresses)\n\n## Contribute 👪\n\nPRs are welcome! Please read the [contributing guide](.github/CONTRIBUTING.md). This project is [MIT](LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhulnasoft%2Fcontribution-graph-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhulnasoft%2Fcontribution-graph-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhulnasoft%2Fcontribution-graph-action/lists"}