Skip to content

Commit

Permalink
Merge pull request #3520 from balancer/auto-allowlist-pool
Browse files Browse the repository at this point in the history
Add webhook to allowlist pools
  • Loading branch information
timjrobinson authored Jun 22, 2023
2 parents f98129f + 349ed2d commit 32992ba
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/allowlist-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Allowlist pool

on:
workflow_dispatch:
inputs:
network:
type: choice
description: Network
required: true
options:
- mainnet
- polygon
- arbitrum
- gnosis-chain
poolType:
type: choice
description: Pool Type
required: true
options:
- Weighted
- Stable
poolId:
type: string
description: Pool ID
required: true
poolDescription:
type: string
description: Pool Description
required: false

jobs:
allowlist-pool:
uses: ./.github/workflows/allowlist.yml
with:
network: ${{ github.event.inputs.network }}
poolType: ${{ github.event.inputs.poolType }}
poolId: ${{ github.event.inputs.poolId }}
poolDescription: ${{ github.event.inputs.poolDescription }}
14 changes: 14 additions & 0 deletions .github/workflows/allowlist-webhook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Allowlist Pool Webhook

on:
repository_dispatch:
types: ['allowlist_pool']

jobs:
allowlist-pool:
uses: ./.github/workflows/allowlist.yml
with:
network: ${{ github.event.client_payload.network }}
poolType: ${{ github.event.client_payload.poolType }}
poolId: ${{ github.event.client_payload.poolId }}
poolDescription: ${{ github.event.client_payload.poolDescription }}
21 changes: 4 additions & 17 deletions .github/workflows/allowlist.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
name: Allowlist pool

on:
workflow_dispatch:
workflow_call:
inputs:
network:
type: choice
description: Network
type: string
required: true
options:
- mainnet
- polygon
- arbitrum
- gnosis-chain
poolType:
type: choice
description: Pool Type
type: string
required: true
options:
- Weighted
- Stable
poolId:
type: string
description: Pool ID
required: true
poolDescription:
type: string
description: Pool Description
required: false

jobs:
allowlist-pool:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -44,7 +31,7 @@ jobs:
- name: Install deps
run: npm install cac
- name: Run allowlist script
run: npx vite-node ./src/lib/scripts/automatic-prs/allowlist-pool.ts --network ${{github.event.inputs.network}} --poolType ${{github.event.inputs.poolType}} --poolId \"${{github.event.inputs.poolId}}\" --poolDescription "${{github.event.inputs.poolDescription}}"
run: npx vite-node ./src/lib/scripts/automatic-prs/allowlist-pool.ts --network ${{inputs.network}} --poolType ${{inputs.poolType}} --poolId \"${{inputs.poolId}}\" --poolDescription "${{inputs.poolDescription}}"
- name: Run eslint fix of updated config files
run: npm run lint:fix:config
- name: Create Pull Request
Expand Down

1 comment on commit 32992ba

@vercel
Copy link

@vercel vercel bot commented on 32992ba Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.