Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Solaflex committed Sep 19, 2024
1 parent f8a3e75 commit 01bb55e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/license_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ jobs:

- name: Authenticate GitHub CLI
run: |
Write-Host "Authenticating with GitHub CLI"
echo ${{ steps.get_workflow_token.outputs.token }} | gh auth login --with-token
- name: Sync team members
- name: Collecting membership information
shell: pwsh
run: |
Write-Host "Authenticating with GitHub CLI"
echo ${{ steps.get_workflow_token.outputs.token }} | gh auth login --with-token
Write-Host "Getting users from file"
$users = (Get-Content users.json | ConvertFrom-Json).PSObject.Properties.Name
Write-Host "Users: $users"
Expand All @@ -49,6 +47,9 @@ jobs:
$team_members = gh api orgs/${{ github.repository_owner }}/teams/test123/members | ConvertFrom-Json | ForEach-Object { $_.login }
Write-Host "Team members: $team_members"
- name: Adding new members
shell: pwsh
run: |
# Add missing users to the team
Write-Host "Checking for missing users in team"
foreach ($user in $users) {
Expand All @@ -59,6 +60,9 @@ jobs:
}
}
- name: Removing old members
shell: pwsh
run: |
# Remove users not in the list
Write-Host "Checking for users to remove from team"
foreach ($member in $team_members) {
Expand Down

0 comments on commit 01bb55e

Please sign in to comment.