Skip to content

fix: stop Heroku workflow from failing on every issue comment - #1008

Closed
rainhead wants to merge 1 commit into
mainfrom
fix/heroku-workflow-comment-trigger
Closed

fix: stop Heroku workflow from failing on every issue comment#1008
rainhead wants to merge 1 commit into
mainfrom
fix/heroku-workflow-comment-trigger

Conversation

@rainhead

@rainhead rainhead commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Heroku workflow fails on every comment posted anywhere in the repo — e.g. this run.

The issue_comment trigger was there so that commenting /refresh-heroku-status on a PR would re-post the Heroku status checks. It never worked, and the guard didn't actually gate on the magic phrase:

if: ${{ github.event.deployment_status.state != 'pending' || (...) }}

On an issue_comment event github.event.deployment_status.state is empty, and '' != 'pending' is true — so the first branch short-circuits and the job runs on any comment. It then builds the API route from github.event.deployment.sha, also empty on a comment event, yielding POST /repos/orcasound/orcasite/statuses/404 Not Found.

Across the last 200 runs:

Event Success Failure
deployment_status 56 0
issue_comment 0 144

Zero successes on the comment path, ever.

Fix

Removed the issue_comment trigger and both /refresh-heroku-status clauses. The feature isn't salvageable as written — a comment payload carries no deployment context to forward, so making it work would mean resolving the PR head SHA and then querying the deployments API for its latest status. Given nobody has had a working version of this to miss, deleting it seemed better than building it.

The deployment_status path — which works, and is still in active use for PR review apps — is untouched.

Drive-by

Bumped the pinned actions, which were behind and producing the Node 20 deprecation warnings on this workflow:

  • step-security/harden-runner v2.12.2 → v2.20.0
  • octokit/request-action v2.4.0 → v3.0.0 (node24 runner)
  • jtalk/url-health-check-action v4 → v5 (node24 runner; the inputs used here are unchanged in v5)

One cosmetic warning will remain: Unexpected input(s) 'repository', 'state', .... request-action's action.yml only declares route and mediaType, but the action reads every INPUT_* as a request parameter — that's by design, and it's why the 56 real runs succeeded.

Testing

deployment_status can't be exercised from a PR branch, since the workflow that runs is the one on the target branch. The deployment_status job is byte-identical apart from the action SHAs, and the removed conditions only ever affected issue_comment runs. The real check is that this PR's own comments no longer spawn failing Heroku runs once merged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Aef29UGmzgktdmpr9tFiCz

Summary by CodeRabbit

  • Bug Fixes

    • Improved deployment status handling by removing outdated manual refresh behavior.
    • Health checks now report deployment outcomes more reliably.
  • Chores

    • Updated deployment and health-check automation to use newer, security-pinned action versions.

The `issue_comment` trigger existed so that commenting
`/refresh-heroku-status` on a PR would re-post the Heroku status checks.
It never worked, and it fired on every comment in the repo.

The `deployment-status` job's guard read:

    github.event.deployment_status.state != 'pending' || (...)

On an `issue_comment` event that field is empty, so `'' != 'pending'` is
true and the job ran regardless of the comment body. It then built the
API route from `github.event.deployment.sha`, which is likewise empty on
a comment event, producing `POST /repos/orcasound/orcasite/statuses/`
and a 404. Across the last 200 runs, all 144 `issue_comment` runs failed
and all 56 `deployment_status` runs succeeded.

The feature is not salvageable as written: a comment payload carries no
deployment context to forward. Drop the trigger and both
`/refresh-heroku-status` clauses, leaving the working `deployment_status`
path alone.

Also bump the pinned actions, which were behind and triggering Node 20
deprecation warnings:

- step-security/harden-runner v2.12.2 -> v2.20.0
- octokit/request-action v2.4.0 -> v3.0.0
- jtalk/url-health-check-action v4 -> v5

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aef29UGmzgktdmpr9tFiCz
@rainhead
rainhead requested a review from a team as a code owner July 29, 2026 01:50
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 538bd6b5-f17b-4f5c-b24e-75ef4c3535c9

📥 Commits

Reviewing files that changed from the base of the PR and between 472133c and c6649bb.

📒 Files selected for processing (1)
  • .github/workflows/heroku.yaml

📝 Walkthrough

Walkthrough

The Heroku workflow now processes only non-pending deployment statuses, removes manual refresh handling, and updates pinned runner, health-check, and deployment-status actions.

Changes

Heroku deployment workflow

Layer / File(s) Summary
Deployment status and health-check workflow
.github/workflows/heroku.yaml
Deployment status handling now excludes pending states and no longer supports manual refresh comments. Pinned action revisions were updated for runner hardening, deployment status reporting, and successful-deployment health checks.

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

Suggested reviewers: paulcretu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main fix: preventing the Heroku workflow from failing on issue comments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/heroku-workflow-comment-trigger

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@paulcretu
paulcretu temporarily deployed to orcasite-pr-1008 July 29, 2026 01:53 Inactive
@rainhead

Copy link
Copy Markdown
Collaborator Author

Folded into #999.

@rainhead rainhead closed this Jul 29, 2026
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