{"id":15763283,"url":"https://github.com/nicklegan/github-org-git-audit-log-for-members-action","last_synced_at":"2025-07-01T22:32:02.486Z","repository":{"id":39273053,"uuid":"413920660","full_name":"nicklegan/github-org-git-audit-log-for-members-action","owner":"nicklegan","description":"A GitHub Action to generate a report that contains the total amount of Git clones, pushes and fetches per organization member for a set interval.","archived":false,"fork":false,"pushed_at":"2023-05-01T09:57:17.000Z","size":141,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-24T06:17:40.109Z","etag":null,"topics":["actions","audit-log","git","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-10-05T17:42:36.000Z","updated_at":"2024-06-23T22:34:46.000Z","dependencies_parsed_at":"2024-10-04T11:41:30.905Z","dependency_job_id":"280776c4-3950-4913-8513-50d71668a14d","html_url":"https://github.com/nicklegan/github-org-git-audit-log-for-members-action","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"8741fd2516973e23d8a1ca0f319491ef58fbfb55"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nicklegan/github-org-git-audit-log-for-members-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-git-audit-log-for-members-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-git-audit-log-for-members-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-git-audit-log-for-members-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-git-audit-log-for-members-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklegan","download_url":"https://codeload.github.com/nicklegan/github-org-git-audit-log-for-members-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklegan%2Fgithub-org-git-audit-log-for-members-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262375810,"owners_count":23301341,"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","audit-log","git","github-enterprise","metrics","organization","report"],"created_at":"2024-10-04T11:41:22.261Z","updated_at":"2025-07-01T22:32:02.456Z","avatar_url":"https://github.com/nicklegan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Organization Git Audit Log for Members Report Action\n\n\u003e A GitHub Action to generate a report that contains the total amount of Git clones, pushes and fetches per organization member for a set interval.\n\n## Usage\n\nThe example [workflow](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) below runs on a weekly [schedule](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events) and can be executed manually using a [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events) event.\n\n```yml\nname: Git Audit Log for Members Report\n\non:\n  schedule:\n    # Runs on every Sunday at 00:00 UTC\n    #\n    #        ┌────────────── minute\n    #        │ ┌──────────── hour\n    #        │ │ ┌────────── day (month)\n    #        │ │ │ ┌──────── month\n    #        │ │ │ │ ┌────── day (week)\n    - cron: '0 0 * * 0'\n  workflow_dispatch:\n    inputs:\n      fromdate:\n        description: 'Optional interval start date within the last 7 days (format: yyyy-mm-dd)'\n        required: false # Skipped if workflow dispatch input is not provided\n      todate:\n        description: 'Optional interval end date within the last 7 days (format: yyyy-mm-dd)'\n        required: false # Skipped if workflow dispatch input is not provided\n\njobs:\n  git-audit-log-for-members-report:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n\n      - name: Get Git Audit Log for Members\n        uses: nicklegan/github-org-git-audit-log-for-members-action@v1.0.0\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`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\u0026description=Git+Audit+Log+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 (max 7 days)   | `7`                         |                                  | `false`  |\n| `sort`            | Column used to sort the acquired audit log data               | `gitClone`                  | `gitClone`, `gitPush` `gitFetch` | `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:bulb: The audit log retains [Git events for 7 days](https://docs.github.com/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#using-the-rest-api). This is shorter than other audit log events.\n\n## Workflow dispatch inputs\n\nAn additional option to retrieve Git audit log events by 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 within the last 7 days` | A date matching the format `yyyy-mm-dd` | `false`  |\n| `Optional interval end date within the last 7 days`   | A date matching the format `yyyy-mm-dd` | `false`  |\n\n## CSV layout\n\nThe results of all except the first column will be the sum of [Git audit log events](https://docs.github.com/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#git-category-actions) for the requested interval per organization member.\n\n| Column      | Description                                                   |\n| :---------- | :------------------------------------------------------------ |\n| Username    | Member part of the requested organization                     |\n| Git clones  | Sum of Git clones for a set interval per organization member  |\n| Git pushes  | Sum of Git pushes for a set interval per organization member  |\n| Git fetches | Sum of Git fetches for a set interval per organization member |\n\nA CSV report file will be saved in the repository **reports** folder using the following naming format: **`organization`-`date`-`interval`.csv**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklegan%2Fgithub-org-git-audit-log-for-members-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklegan%2Fgithub-org-git-audit-log-for-members-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklegan%2Fgithub-org-git-audit-log-for-members-action/lists"}