Skip to content
percent

GitHub Action

Seat Count

v3.0 Latest version

Seat Count

percent

Seat Count

Count the remaining seats in your GitHub plan. License notifications

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Seat Count

uses: austenstone/seat-count-action@v3.0

Learn more about this action in austenstone/seat-count-action

Choose a version

OpenSSF Scorecard

Seat Count Action

A simple Action to count the remaining seats in an GitHub plan. It is intended to be used in conjunction with other actions to do something like notify the user when there are less than 10 seats remaining.

The values output from this action could be from the organization or the enterprise depending on the GitHub plan.

Usage

Create a workflow (eg: .github/workflows/seat-count.yml). See Creating a Workflow file.

You will need to create a PAT(Personal Access Token) that has admin:org access.

Add this PAT as a secret so we can use it as input github-token, see Creating encrypted secrets for a repository.

Organizations

If your organization has SAML enabled you must authorize the PAT, see Authorizing a personal access token for use with SAML single sign-on.

Example: Check seat count every day at 12:00 AM

name: Check Seat Count
on:
  schedule:
    - cron: 0 0 * * *

jobs:
  seats:
    runs-on: ubuntu-latest
    steps:
      - uses: austenstone/seat-count-action@v3
        id: seats
        with:
          github-token: ${{secrets.TOKEN}}
    outputs:
      percentage: ${{steps.seats.outputs.percentage}}
      remaining: ${{steps.seats.outputs.remaining}}
  less-than-10:
    needs: [seats]
    if: needs.seats.outputs.remaining < 10
    runs-on: ubuntu-latest
    steps:
      - run: echo "Only ${{needs.seats.outputs.remaining}} GitHub seats remaining!"

Example Notification Actions

You can send a notifcation using any medium.

example

image

example

image

example

image

➡️ Inputs

Various inputs are defined in action.yml:

Name Description Default
github‑token Token to use to authorize. ${{ github.token }}
org The org to use for the action. ${{ github.event.organization.login }}
enterprise The enterprise to use for the action. N/A

⬅️ Outputs

Name Description
filled_seats The number of filled seats.
seats The total number of seats.
percentage Threshold percentage of seats.
remaining Threshold remaining seats.
name The name of the plan.
space The package space remaining.
private_repos The number of private repos.

Further help

To get more help on the Actions see documentation.