Skip to content

warwickschroeder/Github.Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github.Scripts

A collection of PowerShell scripts for automating GitHub operations via the gh CLI and GitHub's GraphQL/REST APIs.

Prerequisites

  • gh CLI — install with winget install GitHub.cli, then authenticate with the required scopes:

    gh auth login --scopes read:project,read:org,project

Scripts

get-issues-on-project-board.ps1

Lists all issues in a specific column of a GitHub Projects V2 board. Supports filtering out activity from a specific team, limiting results, and exporting to CSV.

Output columns: Repo, Issue #, Title, Opened, Date Added, Age (days), Days in Inbox, Comments, Reactions, Last Edit, Labels, Last External Edit (when -ExcludeTeam is used), URL.

# Basic usage — list issues in the "Inbox" column
.\get-issues-on-project-board.ps1 -Org "your-org" -ProjectNumber 1

# Exclude a team's activity and show last external edit date
.\get-issues-on-project-board.ps1 -Org "your-org" -ProjectNumber 1 -ExcludeTeam "my-team"

# Export results to CSV
.\get-issues-on-project-board.ps1 -Org "your-org" -ProjectNumber 1 -CsvPath "inbox.csv"

# Customise the column and status field names
.\get-issues-on-project-board.ps1 -Org "your-org" -ProjectNumber 1 -ColumnName "Triage" -StatusFieldName "Status"

# Limit the number of results
.\get-issues-on-project-board.ps1 -Org "your-org" -ProjectNumber 1 -Limit 10
Parameter Required Default Description
-Org Yes GitHub organisation login
-ProjectNumber Yes Projects V2 board number
-StatusFieldName No Status Name of the status field on the board
-ColumnName No Inbox Column/status value to filter by
-ExcludeTeam No Team slug; excludes members' activity from "Last External Edit"
-CsvPath No Path to export results as CSV
-Limit No 0 (all) Max number of issues to return

set-project-board-fields.ps1

Updates GitHub Projects V2 fields for issues listed in a CSV file. The -FieldMap parameter maps CSV column names to project board field names. Supports text, number, date, and single-select field types.

# Update a single field
.\set-project-board-fields.ps1 -Org "your-org" -ProjectNumber 1 -CsvPath "issues.csv" `
    -FieldMap @{ "Comments" = "My Comments Field" }

# Map multiple CSV columns to board fields
.\set-project-board-fields.ps1 -Org "your-org" -ProjectNumber 1 -CsvPath "issues.csv" `
    -FieldMap @{ "Reactions" = "Engagement"; "Age (days)" = "Issue Age" }

# Test with a limited number of rows first
.\set-project-board-fields.ps1 -Org "your-org" -ProjectNumber 1 -CsvPath "issues.csv" `
    -FieldMap @{ "Comments" = "My Comments Field" } -Limit 3
Parameter Required Default Description
-Org Yes GitHub organisation login
-ProjectNumber Yes Projects V2 board number
-CsvPath Yes Path to the input CSV file (must have a URL column)
-FieldMap Yes Hashtable mapping CSV column names to board field names
-Limit No 0 (all) Max number of CSV rows to process

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors