A GitHub personal access token with org:admin
scopes. Add this to the repository as a secret named ORG_TOKEN
GitHub Org Name. The token generated in Step 1 must have org admin rights over this org.
Generates a CSV file with the name {org-name}-repo-owners-report.csv
Quickstart: Use this template repository & follow the instructions to get the report
name: Repo Owners report
on:
workflow_dispatch:
inputs:
org-name:
description: 'Org Name'
required: true
jobs:
call-repo-owners:
runs-on: ubuntu-latest
name: Repo Owners
steps:
- id: run-script
uses: rohitnb/repo-owners-report@main
with:
org-token: ${{ secrets.ORG_TOKEN }}
org-name: ${{ github.event.inputs.org-name }}
- uses: actions/upload-artifact@v3.1.3
with:
name: repo-owners-report
path: ${{ github.event.inputs.org-name }}-repo-owners-report.csv
Set the environment variables ORG_TOKEN
and ORG_NAME
export ORG_TOKEN=ghp_************
export ORG_NAME=org-a
Run the script
node src/index.js
{org-name}-repo-owners-report.csv
will be generated locally