Skip to content

Add version bump github action#12

Merged
DevTGHa merged 2 commits intodevfrom
github-action
Apr 27, 2026
Merged

Add version bump github action#12
DevTGHa merged 2 commits intodevfrom
github-action

Conversation

@DevTGHa
Copy link
Copy Markdown
Collaborator

@DevTGHa DevTGHa commented Apr 15, 2026

Summary by CodeRabbit

  • Chores
    • Introduced automated version bumping workflow for semantic version management in release processes.
    • Updated GitHub Actions workflow tooling dependencies.

@DevTGHa DevTGHa self-assigned this Apr 15, 2026
@DevTGHa DevTGHa added the enhancement New feature or request label Apr 15, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Warning

Rate limit exceeded

@DevTGHa has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 38 minutes and 0 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7b39ef21-5dcd-4f4a-abbf-649bd78477ab

📥 Commits

Reviewing files that changed from the base of the PR and between 34cfbcb and e5346c1.

📒 Files selected for processing (2)
  • .github/workflows/bump-version.yml
  • .github/workflows/release.yml

Walkthrough

A new GitHub Actions workflow for automated semantic version bumping in pyproject.toml has been added, allowing manual triggers to parse, increment, and commit version changes. An existing release workflow action was updated to a newer version.

Changes

Cohort / File(s) Summary
Version Bumping Workflow
.github/workflows/bump-version.yml
New workflow that enables manual semantic version increments with automatic branch creation, commits, and pull request opening against the dev branch.
Release Workflow Update
.github/workflows/release.yml
Updated astral-sh/setup-uv action from v8.0.0 to v8.1.0.

Sequence Diagram

sequenceDiagram
    actor User
    participant GHA as GitHub Actions
    participant Repo as Repository
    participant Python as Python Script
    participant Git as Git Operations
    participant API as GitHub API

    User->>GHA: Trigger workflow (manual)
    GHA->>Repo: Checkout code
    Repo-->>GHA: Code ready
    GHA->>Python: Execute version bump script
    Python->>Repo: Read pyproject.toml
    Repo-->>Python: Current version
    Python->>Python: Parse & increment version
    Python->>Repo: Write updated pyproject.toml
    Repo-->>Python: File updated
    Python-->>GHA: old_version, new_version output
    GHA->>Git: Configure user/email
    GHA->>Git: Create versioned branch
    GHA->>Git: Commit changes
    GHA->>Repo: Push branch
    Repo-->>GHA: Branch pushed
    GHA->>API: Create pull request
    API-->>GHA: PR created
    GHA-->>User: Workflow complete
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A workflow so neat, version bumps complete!
Parse, increment, commit with grace,
Pull requests bloom in the dev space,
Automation hops toward release day! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new GitHub Actions workflow for version bumping in the pyproject.toml file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch github-action

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DevTGHa DevTGHa changed the base branch from main to dev April 15, 2026 11:01
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/bump-version.yml (1)

53-63: Consider adding version validation.

The version parsing assumes old_version is always in X.Y.Z format. If pyproject.toml contains a malformed version or a version with additional components (e.g., 1.0.0-alpha, 1.0), the map(int, old_version.split(".")) call will either crash or produce incorrect results.

Since this is a manually-triggered workflow, the failure would be immediately visible to the operator, which mitigates the impact. However, adding upfront validation would provide clearer error messages.

🛡️ Optional: Add version validation
          old_version = data["project"]["version"]
+         
+         # Validate version format
+         parts = old_version.split(".")
+         if len(parts) != 3 or not all(p.isdigit() for p in parts):
+             raise ValueError(f"Invalid version format: {old_version}. Expected 'X.Y.Z'")
+         
          major, minor, patch = map(int, parts)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/bump-version.yml around lines 53 - 63, The version parsing
assumes old_version is exactly "X.Y.Z" and will fail or misbehave for values
like "1.0", "1.0.0-alpha", or non-numeric components; add validation before
map(int, ...) in the bump logic: check old_version has exactly three
dot-separated parts and that each part is numeric (or use a regex like
^\d+\.\d+\.\d+$) and if validation fails raise/print a clear error indicating
the malformed version and abort; keep the rest of the bump logic that updates
major/minor/patch based on bump_type and writes new_version back to
data["project"]["version"] unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/bump-version.yml:
- Around line 53-63: The version parsing assumes old_version is exactly "X.Y.Z"
and will fail or misbehave for values like "1.0", "1.0.0-alpha", or non-numeric
components; add validation before map(int, ...) in the bump logic: check
old_version has exactly three dot-separated parts and that each part is numeric
(or use a regex like ^\d+\.\d+\.\d+$) and if validation fails raise/print a
clear error indicating the malformed version and abort; keep the rest of the
bump logic that updates major/minor/patch based on bump_type and writes
new_version back to data["project"]["version"] unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 661afe66-53e7-48e8-8237-796743a26817

📥 Commits

Reviewing files that changed from the base of the PR and between 88cb0c5 and 34cfbcb.

📒 Files selected for processing (2)
  • .github/workflows/bump-version.yml
  • .github/workflows/release.yml

@DevTGHa DevTGHa merged commit 454d53e into dev Apr 27, 2026
4 checks passed
@DevTGHa DevTGHa deleted the github-action branch April 27, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant