You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Copilot License Management
v1.1
Managing Github Copilot licenses can be a pain. Run this action to get a report of inactive users and optionally remove them.
Create a workflow (eg: .github/workflows/copilot-license-cleanup.yml
). See Creating a Workflow file.
You will need to create a PAT(Personal Access Token) that has manage_billing:copilot
access.
Add this PAT as a secret TOKEN
so we can use it for input github-token
, see Creating encrypted secrets for a repository.
If your organization has SAML enabled you must authorize the PAT, see Authorizing a personal access token for use with SAML single sign-on.
name: Cleanup Copilot Licenses
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
copilot:
name: Copilot Seats
runs-on: ubuntu-latest
steps:
- uses: austenstone/[email protected]
with:
github-token: ${{ secrets.TOKEN }}
Various inputs are defined in action.yml
:
Name | Description | Default |
---|---|---|
github‑token | Token to use to authorize. | ${{ github.token }} |
organization | The organization to use for the action | ${{ github.repository_owner }} |
remove | Whether to remove inactive users | false |
remove-from-team | Whether to remove inactive users from their assigning team | false |
inactive‑days | The number of days to consider a user inactive | 90 |
job-summary | Whether to output a summary of the job | true |
csv | Whether to output a CSV of inactive users | false |
Name | Description |
---|---|
inactive-seats | JSON array of inactive seats |
inactive-seat-count | The number of inactive seats |
removed-seats | The number of seats removed |
seat-count | The total number of seats |
To get more help on the Actions see documentation.