Skip to content

Implement draft-release workflow#69

Open
IgorDobryn wants to merge 1 commit into
mainfrom
implement-draft-release-workflow-for-mailtrap-python
Open

Implement draft-release workflow#69
IgorDobryn wants to merge 1 commit into
mainfrom
implement-draft-release-workflow-for-mailtrap-python

Conversation

@IgorDobryn

@IgorDobryn IgorDobryn commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Motivation

Release automation

Changes

  • Implement draft-release workflow

How to test

  • Trigger draft release workflow
  • Assert new release PR created
  • Assert new release tag is added

Summary by CodeRabbit

  • New Features
    • Added automated draft release creation for the project.
    • Release notes are now generated from merged pull requests.
    • The release process can update version information and changelog entries automatically.
    • A draft release is created with the prepared notes when a new version is detected.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The draft-release.yml GitHub Actions workflow is renamed and rewritten from a placeholder echo job into a functional pipeline. It adds workflow-level concurrency and write permissions, then computes the next semver tag, generates release notes, updates pyproject.toml and CHANGELOG.md, and opens a release PR and draft GitHub release.

Changes

Draft Release Workflow

Layer / File(s) Summary
Release automation pipeline
.github/workflows/draft-release.yml
Workflow name updated; adds concurrency and write permissions; replaces placeholder job with steps to install uv, compute next semver tag, abort on existing tag, generate release notes, conditionally update pyproject.toml/CHANGELOG.md, commit/push, open a release PR, and create a draft GitHub release.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Trigger
  participant Workflow as draft-release.yml
  participant Repo as main branch
  participant GitHub as GitHub API

  Trigger->>Workflow: Trigger workflow run
  Workflow->>Workflow: Install uv, read current version
  Workflow->>Workflow: Compute next semver tag
  Workflow->>GitHub: Check if tag exists
  GitHub-->>Workflow: Tag existence result
  Workflow->>Workflow: Generate release notes from merged PRs
  Workflow->>Repo: Update pyproject.toml and CHANGELOG.md
  Workflow->>Repo: Commit and push changes
  Workflow->>GitHub: Open release PR
  Workflow->>GitHub: Create draft GitHub release
Loading

Possibly related PRs

  • mailtrap/mailtrap-python#68: Directly precedes and is fully replaced/extended by this PR, transforming the same placeholder workflow_dispatch job into the same file's full release automation.

Suggested reviewers: DagonWat, piobeny, VladimirTaytor

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: implementing the draft-release workflow.
Description check ✅ Passed The description follows the template well with Motivation, Changes, and How to test; the optional Images and GIFs section is missing.
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.

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.

@IgorDobryn IgorDobryn marked this pull request as ready for review July 8, 2026 09:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/draft-release.yml (1)

44-86: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin the railsware/github-actions/* steps to immutable SHAs.
.github/workflows/draft-release.yml:44-83 still uses six @master refs, so this workflow can drift unexpectedly and is harder to reproduce. Pin each action to a commit SHA.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/draft-release.yml around lines 44 - 86, The workflow in
draft-release still uses mutable railsware/github-actions references, which can
change unexpectedly over time. Update each of the listed action uses in the
release job—compute-next-semver, abort-if-tag-exists, generate-release-notes,
prepend-changelog, open-sdk-release-pr, and create-draft-github-release—to
immutable commit SHAs instead of `@master` so the behavior stays reproducible and
stable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/draft-release.yml:
- Around line 60-62: The version update step expands the step output directly
inside the run command, which should be avoided; update the workflow step that
runs uv version to pass steps.bump.outputs.next through env instead. Keep the
existing condition on steps.notes.outputs.release_notes, bind the computed
version to an environment variable in the same job, and reference that variable
in the Update version in pyproject.toml step so the shell only sees a quoted env
value.

---

Nitpick comments:
In @.github/workflows/draft-release.yml:
- Around line 44-86: The workflow in draft-release still uses mutable
railsware/github-actions references, which can change unexpectedly over time.
Update each of the listed action uses in the release job—compute-next-semver,
abort-if-tag-exists, generate-release-notes, prepend-changelog,
open-sdk-release-pr, and create-draft-github-release—to immutable commit SHAs
instead of `@master` so the behavior stays reproducible and stable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abb29b89-934f-4ab0-bef3-81275a17c285

📥 Commits

Reviewing files that changed from the base of the PR and between c933b63 and 91e1535.

📒 Files selected for processing (1)
  • .github/workflows/draft-release.yml

Comment thread .github/workflows/draft-release.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants