Problem
Currently deployNotify() in robo-components/DeploymentTrait.php (~line 790) determines which GitHub issue to comment on by parsing the deployment commit message (merge-commit or squash-PR patterns) to find an issue number. For live deployments this is the wrong target — live deploys are triggered from a tag push whose commit message doesn't correspond to the originating feature issue. Instead, when deploying to the live Pantheon environment, we want to find the latest open issue titled exactly "Create release and deploy" or "Cut release and deploy" (case-insensitive) and post the deployment comment there.
Agreed design
- Add a new protected method
deployFindLatestReleaseIssue(string $github_token): ?int in DeploymentTrait.php. It calls GET /repos/{project}/issues?state=open&sort=created&direction=desc&per_page=100 via the existing curl + taskExec pattern already used elsewhere in the file, skips entries that have a pull_request key (the issues endpoint also returns PRs), and returns the first issue whose title (trimmed, lowercased) exactly equals "create release and deploy" or "cut release and deploy". Returns NULL if none found.
- In
deployNotify(), when $pantheon_environment === 'live', call this new method first. If it returns an issue number, use it as the sole entry in $issue_numbers and skip the commit-message parsing entirely. If it returns NULL, fall through unchanged to the existing commit-message/PR-based logic.
- QA and test environments are untouched, keeping today's commit-message-based behavior.
- Out of scope: a separate pre-existing bug where
deployNotify() reads getenv('GITHUB_COMMIT_MESSAGE') but only TRAVIS_COMMIT_MESSAGE is ever exported by ci-scripts/prepare_deploy.sh — leave that as-is, do not fix here.
No changes needed to .github/workflows/deploy.yml or ci-scripts/*.sh; this is a self-contained change to robo-components/DeploymentTrait.php.
Problem
Currently
deployNotify()inrobo-components/DeploymentTrait.php(~line 790) determines which GitHub issue to comment on by parsing the deployment commit message (merge-commit or squash-PR patterns) to find an issue number. For live deployments this is the wrong target — live deploys are triggered from a tag push whose commit message doesn't correspond to the originating feature issue. Instead, when deploying to thelivePantheon environment, we want to find the latest open issue titled exactly "Create release and deploy" or "Cut release and deploy" (case-insensitive) and post the deployment comment there.Agreed design
deployFindLatestReleaseIssue(string $github_token): ?intinDeploymentTrait.php. It callsGET /repos/{project}/issues?state=open&sort=created&direction=desc&per_page=100via the existingcurl+taskExecpattern already used elsewhere in the file, skips entries that have apull_requestkey (the issues endpoint also returns PRs), and returns the first issue whose title (trimmed, lowercased) exactly equals "create release and deploy" or "cut release and deploy". ReturnsNULLif none found.deployNotify(), when$pantheon_environment === 'live', call this new method first. If it returns an issue number, use it as the sole entry in$issue_numbersand skip the commit-message parsing entirely. If it returnsNULL, fall through unchanged to the existing commit-message/PR-based logic.deployNotify()readsgetenv('GITHUB_COMMIT_MESSAGE')but onlyTRAVIS_COMMIT_MESSAGEis ever exported byci-scripts/prepare_deploy.sh— leave that as-is, do not fix here.No changes needed to
.github/workflows/deploy.ymlorci-scripts/*.sh; this is a self-contained change torobo-components/DeploymentTrait.php.