Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": 0,
"backfillLimit": 3,
"hideCredit": true,
"replaceText": {
"\\[([^\\]]+)\\]\\(https://github.com/[^/]+/[^/]+/compare/[^)]+\\)": "[$1](https://github.com/fireblocks/ts-sdk/releases/tag/$1)"
}
}
56 changes: 0 additions & 56 deletions .github/release-drafter.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/draft-release-from-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Draft Release from PR

on:
push:
branches:
- master_changelog_test

permissions:
contents: write
pull-requests: read

jobs:
draft-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get last merged PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list \
--state merged \
--base master_changelog_test \
--limit 1 \
--json number,title,body,labels \
> pr.json

PR_NUM=$(jq -r '.[0].number // "none"' pr.json)
PR_TITLE=$(jq -r '.[0].title // "none"' pr.json)
echo "Found merged PR: #$PR_NUM - $PR_TITLE"

- name: Get latest release version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')

if [[ -z "$LAST_TAG" || "$LAST_TAG" == "null" ]]; then
echo "No existing release found, starting from v0.1.0"
echo "LAST_TAG=v0.1.0" >> $GITHUB_ENV
else
echo "Found latest release: $LAST_TAG"
echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV
fi

- name: Calculate next version from labels
run: |
V="${LAST_TAG#v}"

MAJOR=$(echo $V | cut -d. -f1)
MINOR=$(echo $V | cut -d. -f2)
PATCH=$(echo $V | cut -d. -f3)

LABELS=$(jq -r '.[0].labels[].name' pr.json)
echo "Found labels: $LABELS"

if echo "$LABELS" | grep -q "major"; then
echo "Bumping MAJOR version"
MAJOR=$((MAJOR+1))
MINOR=0
PATCH=0
elif echo "$LABELS" | grep -q "minor"; then
echo "Bumping MINOR version"
MINOR=$((MINOR+1))
PATCH=0
else
echo "Bumping PATCH version"
PATCH=$((PATCH+1))
fi

echo "Calculated next version: v$MAJOR.$MINOR.$PATCH"
echo "VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV

- name: Create DRAFT release using PR BODY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_BODY=$(jq -r '.[0].body // ""' pr.json)

echo "Creating draft release..."
echo "Version: $VERSION"

gh release create "$VERSION" \
--draft \
--title "$VERSION" \
--notes "$PR_BODY"

echo "Draft release created successfully!"
37 changes: 37 additions & 0 deletions .github/workflows/pr-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Auto Label

on:
pull_request:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR by title
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: ${{ github.event.pull_request.title }}
PR: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
label=""

if [[ "$TITLE" =~ \(major\) ]]; then
label="major"
elif [[ "$TITLE" =~ \(minor\) ]]; then
label="minor"
elif [[ "$TITLE" =~ \(patch\) ]]; then
label="patch"
fi

if [[ -n "$label" ]]; then
echo "Found label: $label"
gh pr edit "$PR" --repo "$REPO" --add-label "$label"
else
echo "No label found in title: $TITLE"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: deepakputhraya/action-pr-title@master
with:
disallowed_prefixes: 'COR-'
prefix_case_sensitive: false
prefix_case_sensitive: false
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/UnmanagedWallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**name** | **str** | |
**customer_ref_id** | **str** | | [optional]
**assets** | [**List[WalletAsset]**](WalletAsset.md) | |
**test** | **bool** | |

## Example

Expand Down
2 changes: 1 addition & 1 deletion fireblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "14.0.0"
__version__ = "0.0.0"

# import apis into sdk package
from fireblocks.api.api_user_api import ApiUserApi
Expand Down
2 changes: 1 addition & 1 deletion fireblocks/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 1.6.2\n"
"SDK Package Version: 14.0.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
8 changes: 5 additions & 3 deletions fireblocks/models/unmanaged_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from fireblocks.models.wallet_asset import WalletAsset
from typing import Optional, Set
Expand All @@ -32,7 +32,8 @@ class UnmanagedWallet(BaseModel):
name: StrictStr
customer_ref_id: Optional[StrictStr] = Field(default=None, alias="customerRefId")
assets: List[WalletAsset]
__properties: ClassVar[List[str]] = ["id", "name", "customerRefId", "assets"]
test: StrictBool
__properties: ClassVar[List[str]] = ["id", "name", "customerRefId", "assets", "test"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -95,7 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"name": obj.get("name"),
"customerRefId": obj.get("customerRefId"),
"assets": [WalletAsset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None
"assets": [WalletAsset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
"test": obj.get("test")
})
return _obj

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fireblocks"
version = "14.0.0"
version = "0.0.0"
description = "Fireblocks API"
authors = ["Fireblocks <developers@fireblocks.com>"]
license = "MIT License"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "fireblocks"
VERSION = "14.0.0"
VERSION = "0.0.0"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 2.1.0, < 3.0.0",
Expand Down
6 changes: 4 additions & 2 deletions test/test_paginated_assets_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def make_instance(self, include_optional) -> PaginatedAssetsResponse:
address = '',
tag = '',
activation_time = '', )
], ),
],
test = True, ),
next = ''
)
else:
Expand All @@ -69,7 +70,8 @@ def make_instance(self, include_optional) -> PaginatedAssetsResponse:
address = '',
tag = '',
activation_time = '', )
], ),
],
test = True, ),
)
"""

Expand Down
4 changes: 3 additions & 1 deletion test/test_unmanaged_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def make_instance(self, include_optional) -> UnmanagedWallet:
address = '',
tag = '',
activation_time = '', )
]
],
test = True
)
else:
return UnmanagedWallet(
Expand All @@ -65,6 +66,7 @@ def make_instance(self, include_optional) -> UnmanagedWallet:
tag = '',
activation_time = '', )
],
test = True,
)
"""

Expand Down
Loading