diff --git a/.github/issue-labeler-config.yml b/.github/issue-labeler-config.yml new file mode 100644 index 00000000..2fbfe66c --- /dev/null +++ b/.github/issue-labeler-config.yml @@ -0,0 +1,3 @@ +# Adds the "S-triage" label ot any issue that gets opened. +S-triage: + - "/.*/" diff --git a/.github/workflows/gh-issues.yml b/.github/workflows/gh-issues.yml new file mode 100644 index 00000000..69054648 --- /dev/null +++ b/.github/workflows/gh-issues.yml @@ -0,0 +1,38 @@ +name: "Auto-add GH issues to project" +# Add all issues opened to the issue board for triage and assignment +# GitHub Org and Project Automation +# https://www.notion.so/nibiru/GitHub-Org-and-Project-Automation-c771d671109849ee9fda7c8b741cd66a?pvs=4 + +on: + issues: + types: ["opened", "labeled"] + +permissions: + issues: write + contents: read + +jobs: + # https://github.com/actions/add-to-project + add-to-project: + name: "Add GH ticket to project" + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v1.0.2 + with: + project-url: https://github.com/orgs/NibiruChain/projects/8 + github-token: ${{ secrets.NIBIRU_PM }} + + label-triage: + name: "Add GH ticket to project" + runs-on: ubuntu-latest + # The action comes from the "Activty types" for the "issues" webhook event + # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#issues + if: "github.event.action == 'opened'" + steps: + - uses: github/issue-labeler@v3.4 + if: join(github.event.issue.labels) == '' + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: ".github/issue-labeler-config.yml" + enable-versioned-regex: 0 + not-before: "2024-05-01T00:00:00Z" diff --git a/CHANGELOG.md b/CHANGELOG.md index 47333df2..92b3e2f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [4.5.2](https://github.com/NibiruChain/ts-sdk/compare/v4.5.1...v4.5.2) (2024-09-24) + +### Miscellaneous Chores + +- develop -> main ([#370](https://github.com/NibiruChain/ts-sdk/issues/370)) ([ec2a25b](https://github.com/NibiruChain/ts-sdk/commit/ec2a25bd3d02cdeb6b56fad1b1a85c9c249dc697)), closes [#362](https://github.com/NibiruChain/ts-sdk/issues/362) [#366](https://github.com/NibiruChain/ts-sdk/issues/366) [#367](https://github.com/NibiruChain/ts-sdk/issues/367) [#369](https://github.com/NibiruChain/ts-sdk/issues/369) [#368](https://github.com/NibiruChain/ts-sdk/issues/368) [#362](https://github.com/NibiruChain/ts-sdk/issues/362) [#366](https://github.com/NibiruChain/ts-sdk/issues/366) [#367](https://github.com/NibiruChain/ts-sdk/issues/367) [#362](https://github.com/NibiruChain/ts-sdk/issues/362) [#366](https://github.com/NibiruChain/ts-sdk/issues/366) [#367](https://github.com/NibiruChain/ts-sdk/issues/367) +- **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](https://github.com/NibiruChain/ts-sdk/commit/c2c27e57a5f94f2180f2df0ad67597790809b143)) + ### [4.5.1](https://github.com/NibiruChain/ts-sdk/compare/v4.5.0...v4.5.1) (2024-08-09) ### Miscellaneous Chores diff --git a/package.json b/package.json index a4a475bd..4488fd48 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nibiruchain/nibijs", "description": "The TypeScript SDK for the Nibiru blockchain.", - "version": "4.5.1", + "version": "4.5.2", "license": "MIT", "repository": { "type": "git", diff --git a/src/sdk/utils/faucet.test.ts b/src/sdk/utils/faucet.test.ts index ef3d4825..3e8d5c26 100644 --- a/src/sdk/utils/faucet.test.ts +++ b/src/sdk/utils/faucet.test.ts @@ -78,7 +78,7 @@ describe("useFaucet", () => { test("should request funds from faucet with default amounts", async () => { await useFaucet({ address, chain, grecaptcha }) - const expectedCoins = ["11000000unibi", "100000000unusd", "100000000uusdt"] + const expectedCoins = ["10000000unibi"] expect(fetch).toHaveBeenCalledWith(expectedUrl, { method: "POST", @@ -91,10 +91,9 @@ describe("useFaucet", () => { }) test("should request funds from faucet with custom amounts", async () => { - const amts = { nibi: 5, nusd: 50, usdt: 50 } - await useFaucet({ address, chain, amts, grecaptcha }) + await useFaucet({ address, chain, grecaptcha }) - const expectedCoins = ["5000000unibi", "50000000unusd", "50000000uusdt"] + const expectedCoins = ["10000000unibi"] expect(fetch).toHaveBeenCalledWith(expectedUrl, { method: "POST", diff --git a/src/sdk/utils/faucet.ts b/src/sdk/utils/faucet.ts index afa589ea..2c561efc 100644 --- a/src/sdk/utils/faucet.ts +++ b/src/sdk/utils/faucet.ts @@ -2,33 +2,18 @@ import { fetch } from "cross-fetch" import { Chain, chainToParts } from "." /** - * Sends 11 NIBI, 100 NUSD, and 100 USDT to the given address from the testnet faucet. + * Sends 10 NIBI to the given address from the testnet faucet. */ export async function useFaucet({ address, chain, - amts, grecaptcha, }: { address: string chain: Chain - amts?: { nibi: number; nusd: number; usdt: number } grecaptcha: string }): Promise { - if (!amts) { - // default values - amts = { - nibi: 11, - nusd: 100, - usdt: 100, - } - } - - const coins: string[] = [ - `${amts.nibi * 1e6}unibi`, - `${amts.nusd * 1e6}unusd`, - `${amts.usdt * 1e6}uusdt`, - ] + const coins: string[] = [`${10e6}unibi`] const faucetUrl = faucetUrlFromChain(chain) // Execute faucet request