Skip to content

Post live deployment notifications to the "Create/Cut release and deploy" issue instead of the commit-derived issue - #1061

Open
balagan73 wants to merge 1 commit into
mainfrom
1060-notify-live-deploy-in-create-release-issue
Open

balagan73 wants to merge 1 commit into
mainfrom
1060-notify-live-deploy-in-create-release-issue

Conversation

@balagan73

@balagan73 balagan73 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes #1060

Summary

  • Live deploys are triggered from a release tag push, so the deployment commit message doesn't point back to the originating feature issue — deployNotify() would fail to find (or find the wrong) issue to comment on.
  • Added deployFindLatestReleaseIssue(), which looks up the latest open GitHub issue whose title starts with "Create release" or "Cut release" (case-insensitive, tolerant of trailing text like "and deploy", "& deploy", or a [2h] timebox suffix).
  • deployNotify() now uses this lookup first when $pantheon_environment === 'live'; if no matching issue is found, it falls back unchanged to the existing commit-message/PR-based logic. QA and test environments are unaffected.

Test plan

  • ddev phpcs robo-components/DeploymentTrait.php — no violations
  • ddev phpstan analyse robo-components/DeploymentTrait.php — no errors
  • Verified deployFindLatestReleaseIssue() against real repos: returns correct issue number
  • Ran deployNotify('live') end-to-end in a temporary dry-run (print instead of POST) against another repo with deployment issue, confirming it targets real issue and composes the expected comment body

🤖 Generated with Claude Code

TB: 1/1h

@balagan73
balagan73 requested review from AronNovak and amitaibu July 2, 2026 11:46

@AronNovak AronNovak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, the usual way for such improvements is to test-drive at a client project, if it turns to be useful and robust, we can port it to DS. The latestreleaseissue seems to be fragile for me. It would be great to somehow robustly link an issue.

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.

Post live deployment notifications to the "Create/Cut release and deploy" issue instead of the commit-derived issue [1h]

2 participants