Skip to content

Commit

Permalink
Merge branch 'main' of github.com:austenstone/copilot-license-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Oct 6, 2023
2 parents 54c179d + 7e0edc8 commit 9d15ae7
Show file tree
Hide file tree
Showing 9 changed files with 1,164 additions and 890 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build / Lint / Test
name: CI

on:
pull_request:
Expand All @@ -10,22 +10,15 @@ on:

jobs:
build:
name: Lint/Build/Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [ '12', '14', '16' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run lint
continue-on-error: true
- run: npm run build
- run: npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
73 changes: 0 additions & 73 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
2 changes: 1 addition & 1 deletion .github/workflows/usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Copilot Seats
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
github-token: ${{ secrets.TOKEN }}
Expand Down
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Action
# Copilot License Cleanup

Managing Github Copilot licenses can be difficult because you don't know who's actually using the tool. Run this action on a schedule to automatically remove inactive Copilot licenses. It also creates a report and a csv as part of the run.
Run this action on a schedule to automatically remove inactive Copilot licenses. It also creates a report as a job summary and csv.

## Usage
Create a workflow (eg: `.github/workflows/copilot-license-cleanup.yml`). See [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
Expand Down Expand Up @@ -34,7 +34,32 @@ jobs:
github-token: ${{ secrets.TOKEN }}
```
![image](https://github.com/austenstone/copilot-license-cleanup/assets/22425467/4695fc23-e9c7-4403-ba04-2de0e2d36242)
#### Example Auto remove
```yml
- uses: austenstone/copilot-license-cleanup@v1.1
with:
github-token: ${{ secrets.TOKEN }}
remove: true
remove-from-team: true
```
#### Example Custom days before inactive
```yml
- uses: austenstone/copilot-license-cleanup@v1.1
with:
github-token: ${{ secrets.TOKEN }}
remove: true
remove-from-team: true
inactive-days: 10
```
<details>
<summary>Job summary example</summary>
<img src="https://github.com/austenstone/copilot-license-cleanup/assets/22425467/4695fc23-e9c7-4403-ba04-2de0e2d36242"/>
</details>
## ➡️ Inputs
Various inputs are defined in [`action.yml`](action.yml):
Expand Down
Loading

0 comments on commit 9d15ae7

Please sign in to comment.