deploy-gate icon indicating copy to clipboard operation
deploy-gate copied to clipboard

Update GitHub PR comment when request expires or gets approved

Open cgoldber82 opened this issue 8 months ago โ€ข 0 comments

Problem

The deploy-gate action posts a PR comment with 'Review & approve โ†’' link when a deploy request is created. This comment never updates โ€” it still says 'Approval required' even after:

  • The request expires (link leads to dead page)
  • The request is approved (link is redundant)
  • The request is denied (confusing signal)

Solution

Option A: Webhook-driven comment updates (preferred)

PP app fires a webhook to the deploy-gate action (or a separate GitHub bot) when request status changes. The bot updates the existing PR comment:

  • Approved: 'โœ… Approved by {approver} ยท Receipt: {link}' + collapse the approval request section
  • Expired: 'โš ๏ธ Approval expired after {N}h โ€” re-run the workflow or push a commit to request again'
  • Denied: 'โŒ Denied by {approver}: {reason}'

Option B: Polling from the action

The deploy-gate action polls for status updates while the workflow is running. Less ideal but simpler.

Option C: Smart landing page

The review page URL handles stale links gracefully (covered by issue on app repo). This is complementary, not a replacement.

Success criteria

  • GitHub PR comment reflects current request status
  • No stale 'Review & approve โ†’' links pointing to expired/completed pages

cgoldber82 avatar Mar 11 '26 20:03 cgoldber82