Skip to content

Add script to ping PR authors and issue reporters after a release#329

Open
wallrj-cyberark wants to merge 1 commit into
cert-manager:masterfrom
wallrj-cyberark:add-ping-release-prs-script
Open

Add script to ping PR authors and issue reporters after a release#329
wallrj-cyberark wants to merge 1 commit into
cert-manager:masterfrom
wallrj-cyberark:add-ping-release-prs-script

Conversation

@wallrj-cyberark

Copy link
Copy Markdown
Member

What does this do?

Adds hack/ping-release-prs.sh — a script to post "available for testing" comments on PRs and their linked closing issues after a pre-release or final release is published.

Motivation

During the v1.21.0-beta.0 release process, pings had to be posted manually for ~40 PRs and issues across the full changelog. The process was error-prone:

  • Two different comment formats had been used in prior releases, making it hard to detect existing pings reliably.
  • GitHub's default API page size (30 comments) caused false negatives on PRs with long comment threads, nearly resulting in duplicate pings.

This script automates the process reliably.

How it works

For each PR number passed on the command line:

  1. Checks whether any comment already contains the release tag URL (using per_page=100 to avoid pagination false negatives). Skips the PR if already pinged.
  2. Posts a brief comment on the PR mentioning the author and linking to the release.
  3. Fetches the PR's closing issues. For each linked issue, skips if self-reported (reporter == PR author), skips if already pinged, otherwise posts a comment mentioning the issue reporter.

The script is idempotent — safe to run multiple times.

Usage

# Dry run first to verify what would be posted
./hack/ping-release-prs.sh \
  --release v1.21.0-beta.0 \
  --dry-run \
  8893 8858 8791 ...

# Real run
./hack/ping-release-prs.sh \
  --release v1.21.0-beta.0 \
  8893 8858 8791 ...

# Different repo
./hack/ping-release-prs.sh \
  --release v1.21.0-beta.0 \
  --repo cert-manager/cert-manager \
  8893 8858 ...

Requirements

  • gh (GitHub CLI), authenticated
  • jq

hack/ping-release-prs.sh checks each given PR number to see whether a
ping comment referencing the release tag URL has already been posted (using
per_page=100 to avoid missing comments on long threads). If not, it posts a
brief comment on the PR and on any linked closing issues, skipping
self-reported issues automatically.

The script is idempotent and supports --dry-run.

Signed-off-by: Richard Wall <richard.wall@cyberark.com>
@cert-manager-prow cert-manager-prow Bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Jul 1, 2026
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshvanl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant