diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml new file mode 100644 index 00000000..f92a653f --- /dev/null +++ b/.github/workflows/create-pr.yml @@ -0,0 +1,25 @@ +name: Create Pull Request + +on: + push: + branches: + - 'fireblocks-api-spec/generated/*' + +jobs: + create-pull-request: + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Create pull request + run: | + gh pr create \ + --title "${{ github.event.commits[0].message }}" \ + --body "This PR was automatically generated." \ + --base master \ + --head ${{ github.ref }} \ + --reviewer asafs932,zoharsf,YoavBZ + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index d1fdfe46..c58bbeab 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.0.2" +__version__ = "1.0.3" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi diff --git a/fireblocks/api_client.py b/fireblocks/api_client.py index fb9ff8f8..42dc71b0 100644 --- a/fireblocks/api_client.py +++ b/fireblocks/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.2/python" + self.user_agent = "OpenAPI-Generator/1.0.3/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index bcd53e3a..c5c8608e 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -424,7 +424,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 1.0.2".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.0.3".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/fireblocks/user_agent_util.py b/fireblocks/user_agent_util.py index 2fe21482..dae9b5bb 100644 --- a/fireblocks/user_agent_util.py +++ b/fireblocks/user_agent_util.py @@ -16,7 +16,7 @@ class UserAgentUtil: @staticmethod def get_user_agent(is_anonymous_platform: bool, custom_user_agent: str) -> str: - user_agent = "fireblocks/sdk/python/1.0.2" + user_agent = "fireblocks/sdk/python/1.0.3" if not is_anonymous_platform: os_type = platform.system() os_version = platform.release() diff --git a/pyproject.toml b/pyproject.toml index 8a7aea4a..35beff34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "1.0.2" +version = "1.0.3" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index 3e572233..560a68af 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "1.0.2" +VERSION = "1.0.3" PYTHON_REQUIRES = ">=3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", @@ -42,7 +42,7 @@ description="Fireblocks API", author="Fireblocks", author_email="support@fireblocks.com", - url="https://pypi.org/project/fireblocks", + url="https://github.com/fireblocks/py-sdk/tree/master", keywords=["Fireblocks", "SDK", "Fireblocks API"], python_requires=PYTHON_REQUIRES, install_requires=REQUIRES, diff --git a/test/fireblocks/test_user_agent_util.py b/test/fireblocks/test_user_agent_util.py index c5bb08a9..17b19d8c 100644 --- a/test/fireblocks/test_user_agent_util.py +++ b/test/fireblocks/test_user_agent_util.py @@ -21,10 +21,10 @@ def mock_platform(mocker): mocker.patch('platform.machine', return_value="x86_64") @pytest.mark.parametrize("is_anonymous_platform, user_agent, expected", [ - (False, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.2 (Linux 5.4.0-42-generic; x86_64)"), - (True, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.2"), - (False, None, "fireblocks/sdk/python/1.0.2 (Linux 5.4.0-42-generic; x86_64)"), - (True, None, "fireblocks/sdk/python/1.0.2")]) + (False, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.3 (Linux 5.4.0-42-generic; x86_64)"), + (True, "customUserAgent", "customUserAgent fireblocks/sdk/python/1.0.3"), + (False, None, "fireblocks/sdk/python/1.0.3 (Linux 5.4.0-42-generic; x86_64)"), + (True, None, "fireblocks/sdk/python/1.0.3")]) def test_get_user_agent(mock_platform, is_anonymous_platform, user_agent, expected): # Create an instance of UserAgentUtil util = UserAgentUtil()