Skip to content

Feat(workflow): add step to fetch latest stable ABP version and updat…#24818

Merged
m-aliozkaya merged 3 commits intodevfrom
skoc/action
Feb 6, 2026
Merged

Feat(workflow): add step to fetch latest stable ABP version and updat…#24818
m-aliozkaya merged 3 commits intodevfrom
skoc/action

Conversation

@skoc10
Copy link
Contributor

@skoc10 skoc10 commented Feb 5, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to automatically fetch the latest stable ABP version from the GitHub API and use it when updating the Studio documentation version mapping file. Previously, the ABP version was hardcoded as "dev".

Changes:

  • Added a new step to fetch the latest stable ABP version from GitHub releases API
  • Refactored the version-mapping.md update step to use environment variables instead of inline shell variable substitution
  • Improved Python script formatting with consistent indentation and extracted a parse_range helper function


if not handled:
new_rows.insert(0, f"| {studio} | {abp} |\n")
new_rows.insert(0, f"| {studio} | {abp} |\\n")
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The escaped newline \\n in the f-string will result in a literal backslash-n being written to the file instead of an actual newline character. Since the file is being written using writelines(), which doesn't add newlines automatically, you should use \n (single backslash) or ensure each line already ends with a newline character. The existing rows in the file likely already have newlines from readlines(), but these new lines need proper newlines too.

Copilot uses AI. Check for mistakes.
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/abpframework/abp/releases/latest)

ABP_VERSION=$(echo "$RESPONSE" | jq -r '.tag_name')
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API response is being parsed with jq -r '.tag_name', which extracts the tag name from the GitHub release. However, GitHub release tags often include a 'v' prefix (e.g., 'v8.0.0'). Depending on how this version is used in the version-mapping.md file, you may need to strip the 'v' prefix to ensure consistency. Consider using ABP_VERSION=$(echo "$RESPONSE" | jq -r '.tag_name' | sed 's/^v//') if the version should not include the prefix.

Suggested change
ABP_VERSION=$(echo "$RESPONSE" | jq -r '.tag_name')
ABP_VERSION=$(echo "$RESPONSE" | jq -r '.tag_name' | sed 's/^v//')

Copilot uses AI. Check for mistakes.
studio_range, abp_version = m.groups()

studio_range, abp_version = m.groups()
if abp_version != abp:
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ABP version is being compared as a string (if abp_version != abp), which is appropriate if both are strings. However, if the version format varies (e.g., 'v8.0.0' vs '8.0.0'), this comparison will fail. Ensure that the version format is consistent, or normalize both versions before comparison. This is related to the potential 'v' prefix issue in the API response parsing.

Copilot uses AI. Check for mistakes.
python3 <<EOF
import os
import re
from packaging.version import Version
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packaging module is not installed in the workflow. Before using from packaging.version import Version, you need to add a step to install the package using pip install packaging. Without this, the Python script will fail with an ImportError at runtime.

Copilot uses AI. Check for mistakes.
new_rows.append(row) # already covered
handled = True
new_rows.append(row)
elif studio == end.next_patch():
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next_patch() method does not exist in the packaging.version.Version class. This will cause an AttributeError when the condition is evaluated. You need to implement a custom method to calculate the next patch version, such as incrementing the patch number manually or using a different versioning library that supports this operation.

Copilot uses AI. Check for mistakes.
handled = True
new_rows.append(f"| {v} - {studio} | {abp} |\n")
handled = True
new_rows.append(f"| {start} - {studio} | {abp} |\\n")
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The escaped newline \\n in the f-string will result in a literal backslash-n being written to the file instead of an actual newline character. Since the file is being written using writelines(), which doesn't add newlines automatically, you should use \n (single backslash) or ensure each line already ends with a newline character. The existing rows in the file likely already have newlines from readlines(), but these new lines need proper newlines too.

Copilot uses AI. Check for mistakes.
@skoc10
Copy link
Contributor Author

skoc10 commented Feb 6, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 6, 2026

@skoc10 I've opened a new pull request, #24821, to work on those changes. Once the pull request is ready, I'll request review from you.

[WIP] Add step to fetch latest stable ABP version
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ skoc10
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@m-aliozkaya m-aliozkaya merged commit 07ee683 into dev Feb 6, 2026
1 of 2 checks passed
@m-aliozkaya m-aliozkaya deleted the skoc/action branch February 6, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants