Skip to content

rohitnb/repo-owners-report

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo Owners Report

Inputs

org-token

A GitHub personal access token with org:admin scopes. Add this to the repository as a secret named ORG_TOKEN

org-name

GitHub Org Name. The token generated in Step 1 must have org admin rights over this org.

Outputs

Generates a CSV file with the name {org-name}-repo-owners-report.csv

Example Usage

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

Local Testing

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

About

Generate a CSV of repo name and owners

Resources

License

Stars

Watchers

Forks

Packages

No packages published