Skip to content

Instantly share code, notes, and snippets.

View jimmybish's full-sized avatar

James Bishop jimmybish

View GitHub Profile
@jimmybish
jimmybish / org_commits.ps1
Created January 15, 2021 00:39
Get organization commits since date
# Query a GitHub organization for all commits in all repositories. Use a personal access token with admin:org scope enabled.
# This script uses GitHub CLI (cli.github.com) since it handles pagination nicely.
# Organization to query
$org = ""
# Date of earliest commit in YYYY-MM-DDTHH:MM:SSZ format
$date = "2020-01-01T00:00:00Z"

Installing the Find Inactive Users ruby script Windows 10

The GitHub Find Inactive Members example script is a handy little script that determines whether a user is still active in an organization by checking the last time each user in an organization performed an action against any of the organization's repositories. If the last action falls before the specified cut-off date, the user is considered inactive and is added to the report. The downside to the script is that it requires Ruby to run, which is something many organization owners are unfamiliar with, and the README.md isn't very Windows-friendly. This guide will outline all the required steps to get the script running on Windows 10.

  1. Install GitHub Desktop and Clone the Platform-Tools Repository
  2. Install Ruby for Windows
  3. [Install and Configure Octokit](#ins