[wrangler] Add pull request title to preview deployment annotations - #15307
Merged
Conversation
Detects the pull/merge request title from GitHub Actions (GITHUB_EVENT_PATH's pull_request.title) and GitLab CI (CI_MERGE_REQUEST_TITLE), with a generic PULL_REQUEST_TITLE env var as a provider-agnostic fallback. Attaches it to preview deployments as the workers/pull_request_title annotation, alongside the existing pull request number/URL, repository URL, and commit SHA annotations added in #14966. Other CI providers (CircleCI, Bitbucket Pipelines, TeamCity) are intentionally not covered: CircleCI only exposes the title as a pipeline value that isn't wired into a job's environment by default, Bitbucket Pipelines has no PR title env var at all, and TeamCity requires an explicitly-configured Pull Requests build feature. All are out of scope for this change. Not surfaced in the wrangler preview CLI output, matching the existing precedent for workers/repository_url and workers/commit_sha (only the pull request URL gets a dedicated output line).
🦋 Changeset detectedLatest commit: 0875601 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
workers-devprod
requested review from
a team and
jamesopstad
and removed request for
a team
August 21, 2026 20:04
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Contributor
Contributor
|
@for-the-kidz Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
Contributor
1 similar comment
Contributor
dario-piotrowicz
approved these changes
Aug 24, 2026
workers-devprod
approved these changes
Aug 24, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
Contributor
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
for-the-kidz
enabled auto-merge (squash)
August 24, 2026 14:47
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #14966 — adds the pull/merge request title to
wrangler previewdeployment annotations, using the same detection pattern as the PR number/URL, repository URL, and commit SHA added there.Detects the title from:
pull_request.titlein theGITHUB_EVENT_PATHevent payload (theGITHUB_REF-only fallback path can't recover a title, since it isn't encoded in the ref)CI_MERGE_REQUEST_TITLEPULL_REQUEST_TITLEAttaches it as the
workers/pull_request_titleannotation, alongside the existingworkers/pull_request_number,workers/pull_request_url,workers/repository_url, andworkers/commit_shaannotations. This is best effort — if no title can be detected, nothing changes.CircleCI, Bitbucket Pipelines, and TeamCity are intentionally out of scope for this change:
pipeline.event.github.pull_request.title) that isn't wired into a job's environment by defaultNot surfaced in the
wrangler previewCLI output, matching the existing precedent forworkers/repository_urlandworkers/commit_sha(only the pull request URL gets a dedicated output line).A picture of a cute animal (not mandatory, but encouraged)
Note
This is a contribution from an AI agent: OpenCode, claude-sonnet-5.