{"id":15705704,"url":"https://github.com/nicklegan/github-org-member-contribution-action","last_synced_at":"2025-05-12T15:22:51.184Z","repository":{"id":39302289,"uuid":"395337143","full_name":"nicklegan/github-org-member-contribution-action","owner":"nicklegan","description":"A GitHub Action to generate a report that contains member contribution data for a set interval belonging to a GitHub organization.","archived":false,"fork":false,"pushed_at":"2023-10-03T21:51:02.000Z","size":206,"stargazers_count":5,"open_issues_count":6,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T15:22:33.009Z","etag":null,"topics":["actions","contribution","developer-productivity","github-enterprise","metrics","organization","report"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/nicklegan.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":".github/CODEOWNERS","security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-12T13:58:44.000Z","updated_at":"2024-06-23T22:34:45.000Z","dependencies_parsed_at":"2024-10-09T13:46:43.178Z","dependency_job_id":null,"html_url":"https://github.com/nicklegan/github-org-member-contribution-action","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"6f6f0724a31c2899091ba961558ce9ff0f06df36"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-member-contribution-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-member-contribution-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-member-contribution-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-member-contribution-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklegan","download_url":"https://codeload.github.com/nicklegan/github-org-member-contribution-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763997,"owners_count":21960491,"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","contribution","developer-productivity","github-enterprise","metrics","organization","report"],"created_at":"2024-10-03T20:19:15.104Z","updated_at":"2025-05-12T15:22:51.104Z","avatar_url":"https://github.com/nicklegan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Organization Member Contribution Report Action\n\n\u003e A GitHub Action to generate a report that contains member contribution data for a set interval belonging to a GitHub organization.\n\n## Usage\n\nBy default the example [workflow](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) below runs on a monthly [schedule](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events) using the amount of days from today interval as set in `action.yml` (default 30 days) and can also be triggered manually using a [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events) event.\n\n```yml\nname: Member Contribution Report\n\non:\n  schedule:\n    # Runs on the first day of the month at 00:00 UTC\n    #\n    #        ┌────────────── minute\n    #        │ ┌──────────── hour\n    #        │ │ ┌────────── day (month)\n    #        │ │ │ ┌──────── month\n    #        │ │ │ │ ┌────── day (week)\n    - cron: '0 0 1 * *'\n  workflow_dispatch:\n    inputs:\n      fromdate:\n        description: 'Optional interval start date (format: yyyy-mm-dd)'\n        required: false # Skipped if workflow dispatch input is not provided\n      todate:\n        description: 'Optional interval end date (format: yyyy-mm-dd)'\n        required: false # Skipped if workflow dispatch input is not provided\n\njobs:\n  member-contribution-report:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n\n      - name: Get Member Contributions\n        uses: nicklegan/github-org-member-contribution-action@v1.1.1\n        with:\n          token: ${{ secrets.ORG_TOKEN }}\n          fromdate: ${{ github.event.inputs.fromdate }} # Used for workflow dispatch input\n          todate: ${{ github.event.inputs.todate }} # Used for workflow dispatch input\n```\n\n## GitHub secrets\n\n| Name                 | Value                                                            | Required |\n| :------------------- | :--------------------------------------------------------------- | :------- |\n| `ORG_TOKEN`          | A `repo`, `read:org`, `read:user` scoped [Personal Access Token] | `true`   |\n| `ACTIONS_STEP_DEBUG` | `true` [Enables diagnostic logging]                              | `false`  |\n\n[personal access token]: https://github.com/settings/tokens/new?scopes=repo,read:org,read:user\u0026description=Member+Contribution+Action 'Personal Access Token'\n[enables diagnostic logging]: https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging#enabling-runner-diagnostic-logging 'Enabling runner diagnostic logging'\n\n:bulb: Disable [token expiration](https://github.blog/changelog/2021-07-26-expiration-options-for-personal-access-tokens/) to avoid failed workflow runs when running on a schedule.\n\n## Action inputs\n\n| Name              | Description                                                   | Default                     | Options                                                                                                                                                                            | Required |\n| :---------------- | :------------------------------------------------------------ | :-------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |\n| `org`             | Organization different than workflow context                  |                             |                                                                                                                                                                                    | `false`  |\n| `days`            | Amount of days in the past to collect data for                | `30`                        |                                                                                                                                                                                    | `false`  |\n| `sort`            | Column used to sort the acquired contribution data            | `commitContrib`             | `activeContrib`, `commitContrib`, `issueContrib`, `prContrib`, `prreviewContrib`, `repoIssueContrib`, `repoCommitContrib`, `repoPullRequestContrib` `repoPullRequestReviewContrib` | `false`  |\n| `committer-name`  | The name of the committer that will appear in the Git history | `github-actions`            |                                                                                                                                                                                    | `false`  |\n| `committer-email` | The committer email that will appear in the Git history       | `github-actions@github.com` |                                                                                                                                                                                    | `false`  |\n\n## Workflow dispatch inputs\n\nThe additional option to retrieve historical contribution data using a custom date interval.\nIf the below fields are left empty during [workflow dispatch input](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/), the default interval option of set days from the current date configured in __main.yml__ will be used instead.\n\n| Name                           | Value                                   | Required |\n| :----------------------------- | :-------------------------------------- | :------- |\n| `Optional interval start date` | A date matching the format `yyyy-mm-dd` | `false`  |\n| `Optional interval end date`   | A date matching the format `yyyy-mm-dd` | `false`  |\n\n## CSV layout\n\nThe results of all except the first two columns will be the sum of contributions for the requested interval per organization member.\n\n| Column                   | Description                                                     |\n| :----------------------- | :-------------------------------------------------------------- |\n| Member                   | Username of the organization member                             |\n| Has active contributions | Returns true if the member made contributions                   |\n| Commits created          | Number of commits created by the org member                     |\n| Issues opened            | Number of issues opened by the org member                       |\n| PRs opened               | Number of pull requests opened by the org member                |\n| PR reviews               | Number of pull request reviews given by the org member          |\n| Issue spread             | Number of repos the org member opened issues in                 |\n| Commit spread            | Number of repos the org member created commits in               |\n| PR spread                | Number of repos the org member opened pull requests in          |\n| PR review spread         | Number of repos the org member reviewed pull request reviews in |\n\nA CSV report file to be saved in the repository __reports__ folder using the following naming format: __organization-date-interval.csv__.\n\n:bulb: If no contribution data for an org member is returned but __Has active contributions__ returns __true__, the user was added to the organization during the requested interval which also counts as a contribution.\n\n## GitHub App authentication\n\nIn some scenarios it might be preferred to authenthicate as a [GitHub App](https://docs.github.com/developers/apps/getting-started-with-apps/about-apps) rather than using a [personal access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).\n\nThe following features could be a benefit authenticating as a GitHub App installation:\n\n- The GitHub App is directly installed on the organization, no separate user account is required.\n- A GitHub App has more granular permissions than a personal access token.\n- To avoid hitting the 5000 requests per hour GitHub API rate limit, [authenticating as a GitHub App installation](https://docs.github.com/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation) would increase the [API request limit](https://docs.github.com/developers/apps/building-github-apps/rate-limits-for-github-apps#github-enterprise-cloud-server-to-server-rate-limits).\n\nThe GitHub App authentication strategy can be integrated with the Octokit library by installing and configuring the [@octokit/auth-app](https://github.com/octokit/auth-app.js/#usage-with-octokit) npm module before [rebuilding](https://docs.github.com/actions/creating-actions/creating-a-javascript-action) the Action in a separate repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklegan%2Fgithub-org-member-contribution-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklegan%2Fgithub-org-member-contribution-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklegan%2Fgithub-org-member-contribution-action/lists"}