diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml deleted file mode 100644 index fa5fedab5..000000000 --- a/.github/workflows/bot.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Calculate Bounty Based on Events -on: - push: - issues: - types: - - labeled - - unlabeled - - assigned - - opened - - closed - issue_comment: - types: - - created - - edited - -jobs: - calculate_bounty_job: - # ignore events invoked by bots - if: >- - github.event.pull_request.payload.sender.type != 'Bot' && github.repository != 'ubiquity/ubiquibot' - runs-on: ubuntu-latest - name: Calculate Bounty with UbiquiBot - steps: - # To use this repository's private action, - # you must check out the repository - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "18.14.1" - - - name: Install - run: yarn install - - - name: Authenticate as UbiquiBot - uses: tibdex/github-app-token@v1.7.0 - id: get_installation_token - with: - app_id: 346074 - # https://github.com/organizations/ubiquibot/settings/apps/ubiquibot-qa/installations - # https://github.com/apps/ubiquibot-qa/installations/new/permissions?target_id=4975670 - # https://github.com/settings/installations/38790399 - private_key: | - -----BEGIN RSA PRIVATE KEY----- - MIIEpQIBAAKCAQEA3QM8hM2PNtmZVDu9fMWCznTw4FefZ2JXe+3ong4TX4G/d3QD - jhjRp5PvyPI+nsK0u/22pFCduwUGTFfKxGrMfnqsoBI+S5zUm8gfViX0NGzM7Xqn - EPfTyu3gTKfaJ2G9/JXTNx02iW95vgWAq7W/g4l6VdM/RbzQkYH/Ixn7CAxxXd3Y - /Lvjw4Mo7TkWsdpwx3x7Jzdbf6RvT/7lD1bAEciOv28XxVsaEKt7JN/a0HqKullc - 7JR5jyKEhg9NjXdj1UnHhN5SNg5PorXk3FAhFiBAQZbgOpWyxzfnvBagM+MUr/Iw - Zf0pm/XuR3vfjYYyxJEeyXPTRO3MmsVrUz4yKQIDAQABAoIBAQDbx0MgQRXgkoSC - GiI1eGe6jNmYDipq8YVTrOK8gfzL5ceTrx9158Jc5aT2a8bPs4lsxEEipzQi7T01 - H7x4lEekorMVPu8J2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PhKXVnopeFJOFJkAGRc4Saa - BGZvyfK5g8aSy8Wtg4Lj7/wL4pEde4cm8AF4K0wbb3AfbDBB0GQk6N8= - -----END RSA PRIVATE KEY----- - - - name: Invoke the UbiquiBot - id: UbiquiBot - env: - GITHUB_TOKEN: ${{steps.get_installation_token.outputs.token}} - LOGDNA_INGESTION_KEY: '53239bc82c0a1a156e32f943d4995656' - SUPABASE_URL: 'https://yymbokdvicqbgzutuiwt.supabase.co' - SUPABASE_KEY: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl5bWJva2R2aWNxYmd6dXR1aXd0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODUxMTIwMzcsImV4cCI6MjAwMDY4ODAzN30.A9r4j_hlHu79HLlFY4FStPdgEc-I5SiD-MX7YGKdWyo' - X25519_PRIVATE_KEY: 'QCDb30UHUkwJAGhLWC-R2N0PiEbd4vQY6qH2Wloybyo' - FOLLOW_UP_TIME: '4 days' - DISQUALIFY_TIME: '7 days' - run: yarn start:serverless diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 973953d53..ae1b13c2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: "18.16.0" + node-version: "20.10.0" - name: Install run: yarn install diff --git a/.github/workflows/qa-automation.yml b/.github/workflows/qa-automation.yml deleted file mode 100644 index 2b8aafa53..000000000 --- a/.github/workflows/qa-automation.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Automate QA - -on: - pull_request_target: - types: - - review_requested - branches: [development, main] - -jobs: - add-to-project: - env: - ADD_TO_PROJECT_PAT: ${{ secrets.ADD_TO_PROJECT_PAT }} - name: Add issue to project - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - name: Add PR to QA project - if: contains(github.event.pull_request.requested_reviewers.*.login, 'Draeieg') - uses: actions/add-to-project@v0.5.0 - with: - project-url: https://github.com/orgs/ubiquity/projects/23 - github-token: ${{ env.ADD_TO_PROJECT_PAT }} - - - name: Create QA Issue - if: contains(github.event.pull_request.requested_reviewers.*.login, 'Draeieg') - uses: dacbd/create-issue-action@v1 - with: - token: ${{ env.ADD_TO_PROJECT_PAT }} - owner: ubiquibot - repo: staging - title: QA for ${{ github.event.pull_request.title }} - body: | - Testing pr ${{ github.event.pull_request.number }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f366d621..fd84f4f64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,8 @@ jobs: uses: tibdex/github-app-token@v1.7.0 id: get_installation_token with: - app_id: ${{ secrets.UBIQUITY_BOUNTY_BOT_APP_ID }} - private_key: ${{ secrets.UBIQUITY_BOUNTY_BOT_PRIVATE_KEY }} + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} # diff --git a/.github/workflows/update-config.yml b/.github/workflows/update-config.yml deleted file mode 100644 index c93d04bfb..000000000 --- a/.github/workflows/update-config.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Pull Request Action -permissions: write-all -on: - workflow_dispatch: - -env: - GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - name: Check out repository - uses: actions/checkout@v3 - - - name: Install jq and yq - run: | - sudo apt-get -y install jq - sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq - sudo chmod +x /usr/bin/yq - - - name: Get UbiquiBot Token - uses: tibdex/github-app-token@v1.7.0 - id: get_installation_token - with: - app_id: ${{ secrets.UBIQUITY_BOUNTY_BOT_APP_ID }} - private_key: ${{ secrets.UBIQUITY_BOUNTY_BOT_PRIVATE_KEY }} - - - name: Update Config Params and Create Pull Requests - run: | - urls=$(curl -sSL https://raw.githubusercontent.com/ubiquity/devpool-directory/development/projects.json | jq -r '.urls[]') - - for url in $urls - do - repoName=$(basename $url) - ownerName=$(echo $url | awk -F/ '{print $(NF-1)}') - - git clone $url $repoName - cd $repoName - defaultBranch=$(git branch --show-current) - - # make a branch to update config # - git branch update - git checkout update - - curl -sSL https://raw.githubusercontent.com/ubiquity/ubiquibot/development/ubiquibot-config-default.json > default.json - declare -A param_mapping=( - ["evm-network-id"]="network-id chain-id" - ["price-multiplier"]="base-multiplier" - #add more configs as needed - ) - - ### update configs ### - # Iterate over the mapping and perform updates using sed - for new_param in "${!param_mapping[@]}" - do - old_params="${param_mapping[$new_param]}" - for old_param in $old_params - do - # only update param if the old ones exist - exist_old_param=$(yq "has(\"$old_param\")" .github/ubiquibot-config.yml) - if $exist_old_param; then - yq ".$new_param = .$old_param | del(.$old_param)" .github/ubiquibot-config.yml > temp.yml - mv temp.yml .github/ubiquibot-config.yml - fi - done - # if new param still doesent exist add default from ubiquibot-config-default.json - exist_new_param=$(yq "has(\"$new_param\")" .github/ubiquibot-config.yml) - if ! $exist_new_param; then - echo adding - def_val=$(jq -r ".[\"$new_param\"]" ubiquibot-config-default.json) - yq ".$new_param=$def_val" .github/ubiquibot-config.yml > temp.yml - mv temp.yml .github/ubiquibot-config.yml - fi - done - - git config user.email "113181824+UbiquiBot[bot]@users.noreply.github.com" - git config user.name "UbiquiBot[bot]" - - git add .github/ubiquibot-config.yml - git commit -m "build: use latest ubiquibot config setup" - git remote set-url origin https://${{ secrets.ADD_TO_PROJECT_PAT }}@github.com/$ownerName/$repoName.git - git push -f origin update - - curl -L \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.get_installation_token.outputs.token }}"\ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/$ownerName/$repoName/pulls \ - -d '{ - "title": "build: use latest ubiquibot config setup", - "base": "'"$defaultBranch"'", - "head": "update" - }' - cd .. - done \ No newline at end of file diff --git a/.nvmrc b/.nvmrc index a5e8bba26..790e1105f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.3.0 +v20.10.0 diff --git a/package.json b/package.json index 807d2253b..3f9884a9e 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "typescript": "^4.9.5" }, "engines": { - "node": ">=18" + "node": ">=20.10.0" }, "lint-staged": { "*.{ts,json}": [