Skip to content

ci: announce PyPI releases in Slack - #12

Merged
artiom merged 1 commit into
mainfrom
ci/notify-slack-on-release
Nov 16, 2026
Merged

artiom merged 1 commit into
mainfrom
ci/notify-slack-on-release

Conversation

@Gikoskos

@Gikoskos Gikoskos commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Releases go to PyPI without telling anyone. This adds a final step to the publish job in publish.yml. After the upload succeeds, it posts the tag, a link to its GitHub Release and a link to its PyPI page to the team's release channel webhook (the SLACK_RELEASES_WEBHOOK repository secret). Other Browserless packages already post releases the same way.

  • The step runs only after a successful upload, and it has continue-on-error: true, so a failed post never marks a release as failed.
  • If the secret is missing, the step logs a warning and exits successfully.
  • The payload is built with jq and every value comes from environment variables, so nothing from a ref name is pasted into the script.
  • curl retries 3 times, with a 30-second limit for each attempt.
  • CONTRIBUTING.md now mentions the notification in its release section.

The manual TestPyPI dry run (workflow_dispatch) does not post.

Related issues

None.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Documentation only
  • Chore / tooling

Checklist

  • ruff format --check . (no Python changes)
  • ruff check . (no Python changes)
  • mypy (no Python changes)
  • pytest -m "not e2e" (no Python changes)
  • python scripts/codegen.py leaves no diff
  • Tests added or updated (workflow-only change, checked as described below)
  • Docs updated
  • Did not hand-edit generated files or AUTOGEN regions
  • Title follows Conventional Commits (type: summary)
  • Title, description and commits contain no internal ticket IDs or internal links (see CONTRIBUTING.md › Public repository rules)

Notes for reviewers

How this was checked:

  • actionlint 1.7.12 passes. zizmor 1.32.0 (--offline) reports no findings. Both are the versions and checksums CI uses.
  • I ran the step's script against a local fake webhook with TAG=v0.3.0. It sent one application/json POST with this text: :package: *<https://github.com/browserless/bap-py/releases/tag/v0.3.0|v0.3.0>* of browserless-bap published to <https://pypi.org/project/browserless-bap/0.3.0/|PyPI>. The exit code was 0.
  • With an empty webhook, the step printed the warning and exited 0.

This is a ci: change, so it does not trigger a release. The first real post will come from the next release.

🤖 Generated with Claude Code


Devin Review

Summary by CodeRabbit

  • New Features
    • Successful PyPI releases now trigger a notification with links to the GitHub release and its PyPI page. If notifications are unavailable or fail, the release still completes.
  • Documentation
    • Updated release guidance to describe notifications and their effect on the release process.

After publish.yml uploads a tagged release to PyPI, post the tag, its
GitHub Release and its PyPI page to the release channel webhook. The
step is non-blocking: a failed or unconfigured post never fails the
release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gikoskos
Gikoskos requested a review from a team as a code owner November 16, 2026 14:01
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

After a successful PyPI upload, the publish workflow attempts to post a Slack release notification when SLACK_RELEASES_WEBHOOK is set. Notification failures do not fail the release job. The release instructions now describe this behavior.

Changes

Release notification

Layer / File(s) Summary
Publish and notify
.github/workflows/publish.yml, CONTRIBUTING.md
The publish workflow posts links to the GitHub release and version-specific PyPI page after a successful upload. It skips the post with a warning when the webhook secret is unset and continues if notification fails. The release instructions document these conditions.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant PublishJob
  participant PyPI
  participant SlackWebhook
  PublishJob->>PyPI: Upload package
  PyPI-->>PublishJob: Confirm successful publish
  PublishJob->>SlackWebhook: Post release links when webhook is set
  SlackWebhook-->>PublishJob: Return notification response
  Note over PublishJob: Notification failure does not fail the release job
Loading

Suggested reviewers: artiom, ahmedamien

Merge Risk: Minimal · up to a9a31

This adds an optional Slack announcement after a successful PyPI release and documents it. A failed or unconfigured notification does not fail the release, so the risk of merging is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: announce PyPI releases in Slack" matches the main change: the publish workflow gains a step that posts a Slack release notification after a successful PyPI upload. It is short, specific…
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.
Full details: Title check

Explanation

The title "ci: announce PyPI releases in Slack" matches the main change: the publish workflow gains a step that posts a Slack release notification after a successful PyPI upload. It is short, specific, and follows the conventional commit prefix. The summary and objectives both describe the same Slack notification as the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit watched the packages fly,
Then sent release links into the sky.
If Slack was quiet, none would fail,
The publish job stayed on its trail.
A little note marked each release,
While carrots waited, crisp in peace.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 674c7c9a-fa74-4f8f-8c72-7d5bf509f8bc
Commits

Reviewing files that changed from the base of the PR and between 5aeb831 and a9a3138.

Files selected for processing: 2

  • .github/workflows/publish.yml
  • CONTRIBUTING.md

Included review availability: This review used your included allowance. 8 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@artiom
artiom merged commit bebf6fa into main Nov 16, 2026
18 checks passed
@artiom
artiom deleted the ci/notify-slack-on-release branch November 16, 2026 16:14
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.

2 participants