{"id":17093027,"url":"https://github.com/peter-murray/inactive-users-action","last_synced_at":"2025-04-12T22:51:40.998Z","repository":{"id":43261158,"uuid":"297424261","full_name":"peter-murray/inactive-users-action","owner":"peter-murray","description":"GitHub Action for generating a report on user activity in a GitHub Enterprise Organization.","archived":false,"fork":false,"pushed_at":"2023-10-18T16:30:29.000Z","size":331,"stargazers_count":73,"open_issues_count":8,"forks_count":34,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T16:55:06.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/peter-murray.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":"2020-09-21T18:16:55.000Z","updated_at":"2025-02-17T11:47:03.000Z","dependencies_parsed_at":"2024-06-19T01:35:03.969Z","dependency_job_id":"6d5a72e7-8406-4a74-ad63-f6c44c3c3844","html_url":"https://github.com/peter-murray/inactive-users-action","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.4814814814814815,"last_synced_commit":"fc7ffb53c6e9f038db4e4435e278d7cbf5b9edd3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Finactive-users-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Finactive-users-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Finactive-users-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-murray%2Finactive-users-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-murray","download_url":"https://codeload.github.com/peter-murray/inactive-users-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248270044,"owners_count":21075790,"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-14T14:04:18.458Z","updated_at":"2025-04-12T22:51:40.956Z","avatar_url":"https://github.com/peter-murray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inactive-users-action\n\nA GitHub Action that can be run against a GitHub Organization to generate a report on user activity for a given time \nperiod. This can be useful in detecting inactive users so that licenses can be reclaimed.\n\n## Processing\n\nThis action will perform a lot of API requests against your organization to generate the necessary data for identifying\nuser activity. To be compliant with GitHub best practices, this action will perform these API calls sequentially to \navoid triggering anti-abuse restrictions on the user/bot account owner of the token.\n\nAs a guide, in testing this action takes about 15 minutes to run on an organization which contains ~410 repositories.\n\n\n## Parameters\n\n* `token`: `required` A GitHub Personal Access Token for a user that has access to the repositories and organization, specific permissions: `read:org`, `repo`, `user:email` \n* `organization`: `required` The name of the organization to process\n* `since`: A date to be used to collect information from in the form YYYY-MM-DD, if this is specified, `activity_days` is ignored\n* `activity_days`: The number of days back from now to collect information from, defaults to `30` days\n* `outputDir`: The output directory to store the report files in.\n* `octokit_max_retries`: The number of retries before failing with the octokit REST API calls, defaults to `15`.\n\n## Outputs\n\nThe GitHub Action will register the following outputs that can be referenced in other steps:\n\n* `report_csv`: The path to the CSV report file that is generated\n* `report_json`: The path to the file containing the JSON data used to generate the CSV report\n\n\n## Examples\n\nInvoke the action step providing the required parameters to analyze user activity over the last 30 days:\n\n```\nname: Analyze User Activity\nid: analyze_user_activity\nuses: peter-murray/inactive-users-action@v1\nwith:\n  token: ${{ secrets.ORGANIZATION_AND_REPO_ACCESS_TOKEN }}\n  organization: octodemo\n```\n\nGet user activity in the last 90 days for an organization and save the output CSV file as a build artifact:\n\n```\n- name: Analyze User Activity\n  id: analyze_user_activity\n  uses: peter-murray/inactive-users-action@v1\n  with:\n    token: ${{ secrets.ORGANIZATION_AND_REPO_ACCESS_TOKEN }}\n    organization: octodemo\n    activity_days: 90\n\n- name: Save User Activity Report\n  uses: actions/upload-artifact@v2\n  with:\n    name: reports\n    path: |\n      ${{ steps.analyze_user_activity.outputs.report_csv }}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Finactive-users-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-murray%2Finactive-users-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-murray%2Finactive-users-action/lists"}