Skip to content

Commit

Permalink
fixed git url parsing in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakdinesh1123 committed Feb 15, 2025
1 parent 8b42236 commit 9c1cc07
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.3] - 2025-02-15

### Added

* fixed git url parsing in release workflow [(#450)](https://github.com/Healthlane-Technologies/Zango/pull/450)

## [0.4.2] - 2025-02-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion backend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

README = os.path.join(PROJECT_DIR, "README.md")

PLATFORM_VERSION = "0.4.2"
PLATFORM_VERSION = "0.4.3"


def get_requirements(env):
Expand Down
2 changes: 1 addition & 1 deletion backend/src/zango/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


__all__ = ["internal_requests"]
__version__ = "0.4.2"
__version__ = "0.4.3"
11 changes: 7 additions & 4 deletions backend/src/zango/cli/update_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import traceback

from pathlib import Path
from urllib.parse import urlparse

import click
import requests
Expand Down Expand Up @@ -37,9 +38,11 @@ def get_remote_settings(repo_url, branch):
from django.conf import settings

# Extract the username, repository, and file path from the repo_url
repo_parts = repo_url.rstrip(".git").split("/")
username = repo_parts[-2]
repo_name = repo_parts[-1]
parsed_url = urlparse(repo_url)

# Extract path and remove leading slash
repo_parts = parsed_url.path.lstrip("/").replace(".git", "").split("/")
username, repo_name = repo_parts
file_path = "settings.json"

# Construct the URL to the GitHub API to get the file content
Expand Down Expand Up @@ -71,7 +74,7 @@ def setup_and_pull(path, repo_url, branch="main"):
latest_commit = ""
try:
# Get the latest commit hash of the specified branch
repo_parts = repo_url.rstrip(".git").split("/")
repo_parts = repo_url.replace(".git", "").split("/")
username = repo_parts[-2]
repo_name = repo_parts[-1]
api_url = f"https://api.github.com/repos/{username}/{repo_name}/git/ref/heads/{branch}"
Expand Down

0 comments on commit 9c1cc07

Please sign in to comment.