Skip to content

Commit

Permalink
Merge pull request #97 from multiformats/master-upgrade
Browse files Browse the repository at this point in the history
upgrade@8022060774
  • Loading branch information
galargh authored Feb 23, 2024
2 parents 8449efc + 990085c commit d4cf920
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Discover workspaces
id: workspaces
run: echo "this=$(ls github | jq --raw-input '[.[0:-4]]' | jq -sc add)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
working-directory: terraform
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup terraform
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Discover workspaces
id: workspaces
env:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup terraform
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
skip-fix: ${{ steps.skip-fix.outputs.this }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
TF_VAR_write_delay_ms: 300
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -142,14 +142,14 @@ jobs:
installation_id: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
token: ${{ steps.token.outputs.token }}
path: head
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: base
- name: Download YAML configs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
TF_WORKSPACE: ${{ github.repository_owner }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize scripts
run: npm install && npm run build
working-directory: scripts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
workspaces: ${{ steps.workspaces.outputs.this }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
TF_VAR_write_delay_ms: 300
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.RO_AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Discover workspaces
id: workspaces
env:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup terraform
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
installation_id: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
- uses: ./.github/actions/git-config-user
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: npm ci && npm run build
working-directory: scripts
- name: Update PRs
Expand Down
16 changes: 0 additions & 16 deletions scripts/src/actions/remove-inactive-members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ function getResources<T extends Resource>(
* a. do not have 'KEEP:' in their inline comment AND
* b. have not been added to the team recently (if passed through NEW_TEAM_MEMBERS) AND
* c. have not performed any activity on any repository the team they're a member of has access to in the past X months.
* 6. It removes teams which:
* a. do not have 'KEEP:' in their inline comment AND
* b. do not have members anymore.
*/
async function run(): Promise<void> {
const newMembers = JSON.parse(process.env.NEW_MEMBERS || '[]')
Expand Down Expand Up @@ -189,19 +186,6 @@ async function run(): Promise<void> {
}
}

// remove teams that have no members
const teams = getResources(config, Team)
const teamMembersAfterRemoval = config.getResources(TeamMember)
for (const team of teams) {
const hasMembers = teamMembersAfterRemoval.some(
teamMember => teamMember.team === team.name
)
if (!hasMembers) {
console.log(`Removing ${team.name} team`)
config.removeResource(team)
}
}

config.save()
}

Expand Down

0 comments on commit d4cf920

Please sign in to comment.