Skip to content

Polish review app command UX before 5.0.0 stable#285

Merged
justin808 merged 6 commits into
mainfrom
jg-codex/review-app-command-ux
May 12, 2026
Merged

Polish review app command UX before 5.0.0 stable#285
justin808 merged 6 commits into
mainfrom
jg-codex/review-app-command-ux

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented May 10, 2026

Summary

Polishes the generated review app PR-command UX based on observations from the react-webpack-rails-tutorial #734 deploys. Lands before 5.0.0 stable so the public surface ships clean.

Command rename to a single namespaced family:

  • /deploy-review-app+review-app-deploy
  • /delete-review-app+review-app-delete
  • /help+review-app-help

PR-open message is now short — just lists the three commands and tells the reader to comment +review-app-help for setup details, instead of dumping the full quick reference.

+review-app-help reply (.github/cpflow-help.md) now:

  • Self-identifies ("You asked for review app help. These commands are generated by cpflow.") so PR readers know what they're looking at.
  • Renames Repository secretsGitHub Actions secrets, Repository variablesGitHub Actions variables (which is where they're configured).
  • Clarifies Control Plane wording — tokens are service-account tokens scoped to a Control Plane org on controlplane.com; orgs are Control Plane orgs on controlplane.com.
  • Wraps the secrets/variables tables in a collapsed <details> block so casual readers see commands without scrolling past a wall of config.
  • Adds an Advanced: testing changes to generated workflows section documenting the gh workflow run --ref <pr-branch> pattern for testing PR-branch workflow edits before merge.

Contributing docs:

  • New Developing the GitHub flow generator section in CONTRIBUTING.md explaining template locations, surface area to keep consistent on a command rename, the generator spec (bundle exec rspec spec/command/generate_github_actions_spec.rb), actionlint usage, and how to dispatch comment-trigger workflows on a PR branch with gh workflow run before merge.

Migration note: Repos that have already generated this flow will need to regenerate the workflows or hand-edit the old command names. Acceptable because the flow only shipped in 5.0.0.rc.0 — this is the right moment to fix the public surface before stable.

Test plan

  • bundle exec rspec spec/command/generate_github_actions_spec.rb — 39 examples, 0 failures
  • bundle exec rubocop — 187 files, no offenses
  • actionlint lib/github_flow_templates/.github/workflows/*.yml — only a pre-existing SC2129 style note in cpflow-deploy-review-app.yml:94 unrelated to this change
  • CI green
  • Verify the rendered help on a sample PR after merge (+review-app-help posts the rewritten message; PR-open posts the short quick reference)

🤖 Generated with Claude Code


Note

Medium Risk
Medium risk because it changes the public comment-command surface and the exact-match trigger logic in generated GitHub Actions workflows, which can break existing repos until they regenerate templates or update runbooks.

Overview
Renames the generated review-app PR comment commands from slash commands to a namespaced +review-app-* family (+review-app-deploy, +review-app-delete, +review-app-help) and updates all generated workflow triggers to accept exact matches including GitHub’s trailing newline variants.

Polishes the generated help UX: the PR-open message is shortened to a command list, and .github/cpflow-help.md is rewritten to be clearer (updated wording for secrets/variables, collapsible advanced config/testing sections) and aligned across docs and the AI rollout prompt.

Extends the generator spec to assert the new command strings across workflows/help text, and adds contributor guidance for editing/linting/testing the GitHub flow templates.

Reviewed by Cursor Bugbot for commit 1328734. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Documentation

    • Replaced legacy slash commands with +review-app-deploy, +review-app-delete, and +review-app-help across docs, help text, generated workflows, and changelog.
    • Expanded contributing guide with instructions for developing, linting, testing, and locally validating the GitHub flow generator and generated workflow templates.
  • Tests

    • Added specs to verify generated workflows and help content use the new +review-app-* comment triggers.

Review Change Stack

Rename the generated PR commands to a single namespaced family:

  /deploy-review-app  -> +review-app-deploy
  /delete-review-app  -> +review-app-delete
  /help               -> +review-app-help

Updates the trigger workflows, the PR-open quick reference, the long-form
help (.github/cpflow-help.md), the AI rollout prompt, and the CI automation
docs to use the new names consistently. Existing repos that have already
generated this flow will need to regenerate the workflows or update the
old command names by hand; this is acceptable now because the flow has
not yet shipped in a stable release (currently 5.0.0.rc.0).

Help message changes (.github/cpflow-help.md):
- Self-identify the message ("You asked for review app help. These commands
  are generated by cpflow.") so PR readers know what they are looking at.
- Rename "Repository secrets / variables" to "GitHub Actions secrets /
  variables" to match where they are configured.
- Clarify Control Plane wording: tokens are scoped to a Control Plane org
  on controlplane.com; orgs are named accordingly.
- Wrap the secrets/variables tables in a collapsed <details> block so
  casual readers see the commands without scrolling past a wall of config.
- Add an "Advanced: testing changes to generated workflows" section that
  documents the gh workflow run pattern for testing PR-branch workflow
  edits before merge.

PR-open message (cpflow-review-app-help.yml):
- Drop the long quick reference; list the three commands and tell readers
  to comment +review-app-help for setup details.

Contributing docs:
- Add a "Developing the GitHub flow generator" section explaining where
  the templates live, which surface area to keep consistent on a command
  rename, how to run the generator spec, where actionlint applies, and
  how to dispatch comment-trigger workflows on a PR branch with gh
  workflow run before merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Walkthrough

This PR migrates review app GitHub Actions comment commands from slash-style syntax (/deploy-review-app, /delete-review-app, /help) to plus-prefixed syntax (+review-app-deploy, +review-app-delete, +review-app-help) across generated workflows, help templates, public docs, the embedded AI prompt, CONTRIBUTING, CHANGELOG, and generator specs.

Changes

Review App Command Syntax Migration

Layer / File(s) Summary
Workflow Command Triggers
lib/github_flow_templates/.github/workflows/cpflow-help-command.yml, lib/github_flow_templates/.github/workflows/cpflow-delete-review-app.yml, lib/github_flow_templates/.github/workflows/cpflow-deploy-review-app.yml
Issue comment event conditionals and job gating updated to match new command syntax: +review-app-help, +review-app-delete, and +review-app-deploy.
Workflow Messages & Embedded Prompt
lib/github_flow_templates/.github/workflows/cpflow-deploy-review-app.yml, lib/command/ai_github_flow_prompt.rb, lib/github_flow_templates/.github/workflows/cpflow-review-app-help.yml
Step summaries, embedded AI prompt text, and PR-open/help comment content updated to reference and instruct use of the +review-app-* command syntax and exact-match rules.
Template Help Documentation
lib/github_flow_templates/.github/cpflow-help.md
Help template rewritten with +review-app-* command docs, exact-match comment rules, reorganized secrets/variables tables, and advanced testing guidance for generated workflows.
Public User Documentation
docs/ai-github-flow-prompt.md, docs/ci-automation.md
Setup instructions, quick start, and generated workflow behavior sections updated to use +review-app-deploy, +review-app-delete, and +review-app-help.
Developer Guide, Changelog, Tests
CONTRIBUTING.md, CHANGELOG.md, spec/command/generate_github_actions_spec.rb
New contributing guidance documents generator development/testing; CHANGELOG notes the command rename; generator spec adds helpers/assertions ensuring generated workflows pin exact github.event.comment.body triggers for deploy/delete/help.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 Commands once wore slashes so bold,
Now plus-signs shine bright, fresh and new;
Deploy, delete, help—all retold,
Through docs and workflows, shining through!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: renaming review app PR comment commands to a new namespace before the 5.0.0 stable release, which is the primary focus of this PR.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/review-app-command-ux

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 and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 10, 2026

Code Review

Overview

This PR renames the generated review-app PR comment commands from /deploy-review-app, /delete-review-app, /help to +review-app-deploy, +review-app-delete, +review-app-help, and polishes the associated help text and contributor docs. The rename is clean and consistent — I found zero residual old-style slash commands anywhere in the codebase after the change.

What's working well

  • Complete rename: Every occurrence has been updated across workflow templates, docs, the AI prompt, and the help markdown. No stragglers.
  • Help UX improvement: Collapsing the secrets/variables tables in a <details> block is a good call. PR readers get the three-line command list immediately without scrolling through a config wall.
  • Security hygiene maintained: persist-credentials: false is consistently set on checkouts that don't need push access; the trust boundary comment on pull_request_target in the delete workflow is still intact and accurate.
  • Contributing docs: The new "Developing the GitHub flow generator" section in CONTRIBUTING.md clearly maps the surface area to keep in sync and explains how to exercise PR-branch workflow changes via gh workflow run --ref. That context is genuinely hard to discover otherwise.
  • PR-open message: Shorter is better here. The previous version front-loaded the full secrets table; the new version just lists three commands and points readers to +review-app-help.

Issues

Missing CHANGELOG entry

The Unreleased section in CHANGELOG.md is empty. This PR changes the public trigger strings for generated workflows — that's a breaking change for any repo on 5.0.0.rc.0 until it regenerates. The project's own contributing convention calls for a ### Breaking Changes entry at the top of the version section (and the tooling uses that heading to gate major-bump decisions). Worth adding one for visibility.

Spec gap: trigger command strings are not asserted

The specs verify author_association gating and fork-skip behavior, but no test asserts that the generated workflow files contain the new trigger strings (+review-app-deploy, +review-app-delete, +review-app-help). If a template edit accidentally reverts or misspells a command, CI stays green. See the inline comment on spec/command/generate_github_actions_spec.rb for the specific location.

Minor notes

  • cpflow-help.md references +review-app-deploy in the +review-app-delete exact-match note ("Same exact-match rule as +review-app-deploy"). That's accurate and intentional — just worth a quick read to confirm the cross-reference reads clearly to a first-time user.
  • The workflow_dispatch path for cpflow-help-command.yml does not gate on author_association. That's correct and intentional (manual dispatches are inherently admin-controlled), but worth a comment in the template for future maintainers who might copy the pattern.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 10, 2026

Greptile Summary

This PR renames the three generated PR comment commands from the old /-prefix style (/deploy-review-app, /delete-review-app, /help) to a namespaced +review-app-* family (+review-app-deploy, +review-app-delete, +review-app-help), and condenses the PR-open message into a short quick-reference list that points readers to +review-app-help for the full reference.

  • All trigger if conditions in the three command-handling workflows, the PR-open message template (cpflow-review-app-help.yml), the full help document (cpflow-help.md), and every prose reference in docs/ and CONTRIBUTING.md are updated in one pass — no stale occurrences remain.
  • cpflow-help.md gains a self-identification header, collapses the secrets/variables tables inside <details> blocks, and adds an "Advanced: testing changes to generated workflows" section documenting the gh workflow run --ref dispatch pattern.

Confidence Score: 5/5

Safe to merge — every command-name reference across workflows, documentation, and the AI prompt has been updated consistently with no old names remaining.

The change is a pure string rename across nine files. All six trigger-condition strings in the workflow YAML, every prose reference in docs, the help markdown, and the Ruby AI-prompt heredoc were updated in one coherent pass. A grep for the old /deploy-review-app, /delete-review-app, and /help patterns returns no hits in the changed surface area. The spec suite and RuboCop are green per the test plan. No logic, auth, or data-handling code was touched.

No files require special attention.

Important Files Changed

Filename Overview
lib/github_flow_templates/.github/workflows/cpflow-deploy-review-app.yml Renames trigger body from /deploy-review-app to +review-app-deploy in the job if condition and in the step summary message; no logic changes.
lib/github_flow_templates/.github/workflows/cpflow-delete-review-app.yml Renames trigger body from /delete-review-app to +review-app-delete in the job if condition; no logic changes.
lib/github_flow_templates/.github/workflows/cpflow-help-command.yml Renames trigger body from /help to +review-app-help; workflow file name and logic remain unchanged.
lib/github_flow_templates/.github/workflows/cpflow-review-app-help.yml PR-open message condensed to a 5-line bullet list with new command names; trailing "For setup details, comment +review-app-help." CTA added.
lib/github_flow_templates/.github/cpflow-help.md Rewrites help content with new command names, collapses secrets/variables tables in <details> blocks, adds self-identification header, and adds an "Advanced: testing changes" section with gh workflow run dispatch examples.
CONTRIBUTING.md Adds "Developing the GitHub flow generator" section covering template edit workflow, spec execution, actionlint usage, and gh workflow run testing pattern.
docs/ci-automation.md Updates all six occurrences of the old command names to the new namespaced +review-app-* commands.
docs/ai-github-flow-prompt.md Single-line update replacing /deploy-review-app with +review-app-deploy in the AI agent prompt text.
lib/command/ai_github_flow_prompt.rb Single-line update replacing /deploy-review-app with +review-app-deploy in the Ruby heredoc that generates the AI prompt.

Reviews (1): Last reviewed commit: "Polish review app command UX before 5.0...." | Re-trigger Greptile

- CHANGELOG: add Unreleased Changed entry for the +review-app-* rename
- Spec: pin the public +review-app-deploy/-delete/-help trigger strings
  so a future template edit cannot silently rename them
- cpflow-help.md: spell out the exact-match rule on the +review-app-delete
  bullet so it is self-contained for first-time readers
- cpflow-help-command.yml: comment why workflow_dispatch intentionally
  skips the author_association gate (GitHub already restricts manual
  dispatches to actions:write users)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@justin808
Copy link
Copy Markdown
Member Author

Review feedback addressed (8f6bbeb)

From @claude[bot]'s code review

  1. Missing CHANGELOG entry: Added a ### Changed entry under ## [Unreleased] documenting the +review-app-* rename. Repos that already ran cpflow generate-github-actions against 5.0.0.rc.0 need to regenerate.
  2. Spec gap (trigger command strings): Added it "pins the public +review-app-* PR comment trigger strings" in spec/command/generate_github_actions_spec.rb asserting each generated workflow contains its github.event.comment.body == '+review-app-*' literal. The byte-snapshot guard alone wouldn't have caught a silent rename — this locks the public command surface.
  3. cpflow-help.md cross-reference: The +review-app-delete bullet now inlines the exact-match rule ("no surrounding text, trailing whitespace, or trailing newline") in addition to referencing +review-app-deploy, so it reads self-contained for a first-time user who jumps straight to the delete section.
  4. workflow_dispatch author_association: Added a comment block in cpflow-help-command.yml explaining that workflow_dispatch intentionally skips the author_association gate — GitHub already restricts manual dispatches to users with actions: write, which is a stricter bar than COLLABORATOR.

Other comments — triaged, no action needed

  • @chatgpt-codex-connector[bot]: Codex usage-limit notice; no actual review was performed.
  • @coderabbitai[bot]: Walkthrough/summary explicitly stating "No actionable comments were generated." The docstring-coverage pre-merge warning is a generic preset and doesn't apply to YAML/Markdown changes in this PR.
  • @greptile-apps[bot]: 5/5 confidence approval — thanks!

Verification: CPLN_ORG=dummy-org bundle exec rspec spec/command/generate_github_actions_spec.rb (40 examples, 0 failures), bundle exec rubocop spec/command/generate_github_actions_spec.rb (clean), actionlint lib/github_flow_templates/.github/workflows/cpflow-help-command.yml (clean).

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

@justin808 Thanks for the thorough summary! The changes in 8f6bbeb look well-considered:

  • The new trigger-string pinning spec is a solid addition — byte-snapshot tests are great for regression coverage but wouldn't surface a silent command rename, so having an explicit assertion on github.event.comment.body == '+review-app-*' locks the public surface in a readable, intention-revealing way.
  • The CHANGELOG entry and the inline exact-match rule on the +review-app-delete bullet both improve the self-service experience for first-time users.
  • The workflow_dispatch auth comment is a nice breadcrumb for future maintainers who might otherwise wonder why the association gate is absent.

The test count going from 39 → 40 with all checks clean is a good sign. Happy to do another pass if you'd like a fresh review of the new commit.

ᶘ ᵒᴥᵒᶅ

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 10, 2026

All four points addressed cleanly — thanks for the thorough follow-up summary.

Quick verification of each item:

  1. CHANGELOG — Entry lands correctly under ## [Unreleased] / ### Changed with the exact regen callout for rc.0 adopters. Clear and actionable.

  2. Trigger-string specit "pins the public +review-app-* PR comment trigger strings" asserts all three github.event.comment.body == literals directly from the generated files. This is exactly the right guard — the byte-snapshot alone wouldn't catch a silent string drift.

  3. cpflow-help.md delete section — Now reads self-contained: "Comment body must be exactly +review-app-delete — no surrounding text, trailing whitespace, or trailing newline. Same exact-equality rule as +review-app-deploy." First-time readers jumping to the delete section no longer need to cross-reference.

  4. workflow_dispatch gate comment in cpflow-help-command.yml — The comment block is accurate and well-placed. The actions: writeCOLLABORATOR framing is correct — actions: write requires at minimum write collaborator access, so the gate is strictly tighter than OWNER|MEMBER|COLLABORATOR, making the intentional skip sound.

One minor observation (no action needed before merge): the cpflow-review-app-help.yml PR-open message now ends with "For setup details, comment \+review-app-help`."` — intentionally asymmetric with the full help doc (short quick-ref vs. full detail on demand), which is exactly the right UX trade-off described in the PR summary.

CI is still pending. Once that's green and you've done the live +review-app-help smoke test on a sample PR, this looks ready to merge.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 10, 2026

Review: Polish review app command UX before 5.0.0 stable

Overview

Clean, targeted rename that namespaces the three PR comment triggers under a single +review-app-* family. All occurrences are updated consistently across workflow templates, generated help, docs, the AI prompt, and specs. The + prefix sidesteps GitHub's own / shortcuts and is visually distinct from the old slash commands.

Positives

  • All trigger strings updated in the right places: the three workflow if conditions and the user-facing messages
  • Author-association gate (OWNER | MEMBER | COLLABORATOR) preserved on all three comment triggers
  • Security posture of pull_request_target usage is unchanged and well-commented
  • The <details> collapse for secrets/variables is a good UX improvement
  • New spec assertion pins the trigger strings so a future template edit cannot silently rename them
  • New CONTRIBUTING section is a genuine help for future maintainers

Issues

1. Spec gap — cpflow-review-app-help.yml command strings not covered

The new test pins trigger strings in the three event-driven workflows (deploy, delete, help-command) but not the PR-open quick reference in cpflow-review-app-help.yml. A future edit that renames the commands in those bullet lines won't be caught. Suggested addition to the spec:

def pr_open_help_workflow_path
  playground.join(".github/workflows/cpflow-review-app-help.yml")
end

# in the pinning test:
expect(pr_open_help_workflow_path.read).to include("+review-app-deploy")
expect(pr_open_help_workflow_path.read).to include("+review-app-delete")
expect(pr_open_help_workflow_path.read).to include("+review-app-help")

2. +review-app-help entry missing the exact-match caveat in cpflow-help.md

The +review-app-deploy and +review-app-delete entries both call out exact-equality matching (and that trailing whitespace or surrounding text silently no-ops). The +review-app-help entry only says "Posts this message on the PR." — a user who types please +review-app-help gets no feedback. The same caveat should be added for consistency.

3. CONTRIBUTING.md gh workflow run example omits the delete/help workflow names

The bullet gives cpflow-deploy-review-app.yml explicitly but then says "Repeat for the delete/help workflows as needed" without naming them. The full list is in cpflow-help.md, but a developer reading CONTRIBUTING.md shouldn't have to go find it. Trivially fixable.

Security

No new concerns. The pull_request_target workflows correctly avoid checking out PR head code, author_association gating is intact on all three triggers, and the workflow_dispatch bypass on the help command is correctly explained (GitHub already gates manual dispatches to actions:write users).

Comment thread spec/command/generate_github_actions_spec.rb
Comment thread lib/github_flow_templates/.github/cpflow-help.md
Comment thread CONTRIBUTING.md Outdated
- Extend the trigger-string spec so it also pins the +review-app-*
  command names in the PR-open quick-reference workflow
  (cpflow-review-app-help.yml). A future edit to that bullet list
  cannot now silently drift away from the real triggers.
- Add the same exact-equality caveat to the +review-app-help bullet in
  cpflow-help.md that the +review-app-deploy and +review-app-delete
  bullets already carry.
- Spell out cpflow-delete-review-app.yml and cpflow-help-command.yml
  explicitly in the CONTRIBUTING.md gh workflow run example so a
  developer reading that section does not have to cross-reference
  cpflow-help.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@justin808
Copy link
Copy Markdown
Member Author

Second review-app rename pass addressed (08ac574)

Closing out the three remaining nits from @claude[bot]'s most recent reviews. Each was addressed via the inline threads (now resolved):

  1. Spec gap on cpflow-review-app-help.yml — the pins the public +review-app-* PR comment trigger strings example now also asserts the three command names in the PR-open quick-reference workflow, so a future bullet edit cannot silently drift from the real triggers.
  2. +review-app-help exact-match caveat — the +review-app-help bullet in cpflow-help.md now carries the same exact-equality caveat as +review-app-deploy and +review-app-delete.
  3. gh workflow run example in CONTRIBUTING.md — the bullet now lists all three dispatch commands explicitly (cpflow-deploy-review-app.yml, cpflow-delete-review-app.yml, cpflow-help-command.yml).

Other comments — triaged, no action

  • @chatgpt-codex-connector[bot] (×2): Codex usage-limit notices; no review performed.
  • @coderabbitai[bot]: walkthrough explicitly says "No actionable comments were generated"; the later message is an acknowledgment of the previous round's summary.
  • @greptile-apps[bot] (×2): 5/5 approvals. The second pass flags the PR-open message ending with For setup details, comment +review-app-help. as intentionally asymmetric with the long-form help — that asymmetry is the deliberate quick-ref vs. detail-on-demand UX trade-off described in the PR summary, so no change.
  • @claude[bot] (earlier review): the four substantive items (CHANGELOG, trigger-string spec, cpflow-help.md cross-reference, workflow_dispatch author_association comment) were already addressed in 8f6bbeb.
  • @claude[bot] (follow-up review): the three "Issues" listed are duplicates of the inline review threads above and are now addressed in 08ac574.

Verification: CPLN_ORG=dummy-org bundle exec rspec spec/command/generate_github_actions_spec.rb (40 examples, 0 failures); bundle exec rubocop spec/command/generate_github_actions_spec.rb (clean).

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 10, 2026

All three items check out cleanly in the diff:

  1. Spec gappr_open_help_workflow_path helper added, and the new example asserts all three +review-app-* strings appear in the PR-open quick-reference workflow. A bullet edit that drifts from a real trigger will now fail.

  2. +review-app-help exact-match caveatcpflow-help.md now carries the full "Comment body must be exactly…" sentence for +review-app-help, matching the treatment of +review-app-deploy and +review-app-delete. Symmetric.

  3. gh workflow run in CONTRIBUTING.md — All three workflows (cpflow-deploy-review-app.yml, cpflow-delete-review-app.yml, cpflow-help-command.yml) are listed explicitly with their --ref flags.

The surrounding changes (the author_association comment in cpflow-help-command.yml, the collapsed <details> blocks, the workflow_dispatch callout in cpflow-help.md) are all well-placed bonus polish. Nothing stands out as needing a follow-up. LGTM for merge.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/github_flow_templates/.github/cpflow-help.md`:
- Line 63: Update the trigger behavior sentence to say “default branch” instead
of “base branch”: in the sentence that describes comment-triggered runs
(`+review-app-deploy`, `+review-app-delete`, `+review-app-help`) replace the
phrase “the base branch — not your PR branch” with wording that states GitHub
resolves workflow definitions from the repository’s default branch (e.g., “the
default branch — not your PR branch”) so the doc accurately reflects trigger
resolution.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47bf45da-1598-41df-8f65-27b9b7174eb0

📥 Commits

Reviewing files that changed from the base of the PR and between 8f6bbeb and 08ac574.

📒 Files selected for processing (3)
  • CONTRIBUTING.md
  • lib/github_flow_templates/.github/cpflow-help.md
  • spec/command/generate_github_actions_spec.rb
🚧 Files skipped from review as they are similar to previous changes (1)
  • spec/command/generate_github_actions_spec.rb

Comment thread lib/github_flow_templates/.github/cpflow-help.md Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Tip

For best results, initiate chat on the files or code changes.

@justin808 The three nits from 08ac574 are all well-targeted:

  1. Spec coverage on cpflow-review-app-help.yml — pinning the PR-open bullet list in the same example that guards the comment-body trigger strings is the right call; both surfaces are part of the same public contract.
  2. +review-app-help exact-match caveat — consistency across all three bullets removes any ambiguity for users who read only part of the help doc.
  3. CONTRIBUTING.md gh workflow run example — listing all three files explicitly makes the testing workflow reproducible without having to cross-reference elsewhere.

40 examples, 0 failures and a clean RuboCop run are good closing signals. Happy to do a fresh incremental review of the 08ac574 changes if you'd like a final pass before merge — just let me know!

ᶘ ᵒᴥᵒᶅ

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 10, 2026

Code Review

Overall

Clean, consistent rename. All command strings are updated across templates, docs, the AI prompt, and the spec in one coherent sweep — no stale /deploy-review-app or /delete-review-app references were found. The spec regression test pinning the exact trigger strings is a good guard.

Security

  • pull_request_target in cpflow-review-app-help.yml — usage is correct. The in-file comment explaining why it is safe (no checkout, no secrets beyond the implicit write token) is exactly the right documentation for a future reviewer.
  • persist-credentials: false in the help-command checkout — good practice since the job only reads a file.
  • author_association gate maintained on all three comment triggers; workflow_dispatch intentionally ungated with a comment explaining the reasoning. Both are correct.
  • Number(context.payload.inputs.pr_number) — GitHub delivers all workflow_dispatch inputs as strings even when declared type: number, so this explicit conversion is correct. GitHub validates the type at dispatch time, so NaN is not a practical concern, but the conversion is sound defensive practice.

Issues

UX: the shortened PR-open message assumes all authors can run +review-app-help

The new quick-reference comment tells every PR author to "comment +review-app-help for setup details." But +review-app-help is gated on author_association (OWNER / MEMBER / COLLABORATOR), so an external contributor who follows that instruction will get a silent no-op. The old message front-loaded all the config details precisely because it couldn't assume the author had invoke rights. This is worth either:

  • keeping the full secrets/variables table visible in the PR-open message for external contributors, or
  • noting in the message that setup details are only available to repo members.

Spec: pr_open_help assertions are weaker than the other three

The three trigger-string checks correctly assert the full expression github.event.comment.body == '+review-app-deploy'. The pr_open_help block only checks include("+review-app-deploy"), which would not catch a regression where the strings appear only in prose or a YAML comment rather than in the actual trigger condition.

Minor

  • The + prefix is uncommon in the GitHub bot-command convention (most use /). The PR description does not explain the choice; a sentence in CONTRIBUTING or CHANGELOG would help future contributors understand why + was picked over /. (Likely to avoid collision with other tooling that listens on /help.)
  • spec/command/generate_github_actions_spec.rb test description at line 203 still reads "configures delete-review-app concurrency…" — refers to the workflow file name, not a stale command string, so it is fine as-is. Just noting for completeness.

Comment thread spec/command/generate_github_actions_spec.rb
"",
"`/help`",
"Show the required GitHub variables, secrets, and workflow behavior."
"For setup details, comment `+review-app-help`."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This tells every PR author — including external contributors — to comment +review-app-help for setup details, but that command is gated on author_association (OWNER / MEMBER / COLLABORATOR). A contributor without those roles will get a silent no-op with no explanation.

The old message avoided this problem by surfacing all the config details upfront. Consider either adding a caveat ("repo members only") here, or keeping at least a summary of the required secrets/variables visible to everyone.

@Caxha254
Copy link
Copy Markdown

Saw your post about Polish review app command UX before 5.0.0 stable.

I deploy custom AI assistants — local models, persistent memory, no subscriptions. Your data stays yours.

Price: $600, 48h. Free 15-min scope call first if you want.

— Lyn
lynchatta@gmail.com


Reply or email: lynchatta@gmail.com

Polishing nits from the latest reviewer round:

- cpflow-help.md and CONTRIBUTING.md now say comment-triggered runs
  use the workflow code from the repository's default branch, not
  the base branch. GitHub resolves issue_comment workflows from the
  default branch, which is technically distinct from the PR's base
  branch and matters for repos that target non-default branches.
- The pr_open_help block in the generator spec now pins each command
  string to its actual bullet form (`"- \`+review-app-deploy\``), so a
  silent rename in the trigger-relevant text fails the spec even if
  the bare command name still appears elsewhere in the file.
- CHANGELOG entry now explains why `+` was picked over `/` (avoid
  collision with GitHub's reserved slash-command surface and other
  bots that listen on `/help`, and to make the three commands
  obviously part of one namespaced family).
@justin808
Copy link
Copy Markdown
Member Author

justin808 commented May 11, 2026

Third review-app rename pass addressed (9a5ecbf)

Closing out the three OPTIONAL nits from the most recent round; one item declined for this PR.

Addressed inline (threads resolved)

  1. [@coderabbitai[bot]] cpflow-help.md:63 — "base branch" → "default branch": GitHub resolves issue_comment workflow definitions from the repository's default branch, which is technically distinct from the PR's base branch. Updated both occurrences in cpflow-help.md (lines 63 and 71) plus the same factual wording in CONTRIBUTING.md's "Developing the GitHub flow generator" section.

  2. [@claude[bot]] spec/command/generate_github_actions_spec.rb — tighten pr_open_help assertions: The three pr_open_help checks now pin each command to its actual bullet form. A silent rename in the trigger-relevant bullet text fails the spec even when the bare command name still appears elsewhere in the YAML:

    expect(pr_open_help).to include('"- `+review-app-deploy`')
    expect(pr_open_help).to include('"- `+review-app-delete`')
    expect(pr_open_help).to include('"- `+review-app-help`')

    Used the bullet-prefix anchor rather than the wrapping-quotes form because the body-array entries are formatted as "- + backtick + +review-app-X + backtick + - …" (text follows the closing backtick before the closing quote), so the leading "- + backtick is the unique anchor for each list item.

Addressed in docs

  1. [@claude[bot]] minor: + prefix rationale: Extended the CHANGELOG.md entry to explain that the + prefix avoids collision with GitHub's reserved slash-command surface and with other bots that listen on /help, and makes the three commands obviously part of one namespaced family.

Declined for this PR — leaving thread open

  • [@claude[bot]] cpflow-review-app-help.yml:35 — external contributors get a silent no-op on +review-app-help: Real UX concern, but the fix is a design choice — bring back a summary of secrets/variables in the PR-open message, or add a "repo members only" caveat. I'd rather not pick one as a last-minute change before 5.0.0 stable. Leaving the thread open as a deliberate follow-up rather than rolling a half-thought-out fix into this PR.

Triage of non-actionable comments

  • @coderabbitai[bot] acknowledgment of the previous summary — thanks, no further changes needed.
  • @claude[bot] code review's two main "Issues" duplicate the inline comments above and are addressed in 9a5ecbf; the spec line 203 minor was explicitly noted by the reviewer as "fine as-is, just noting for completeness."

Verification: CPLN_ORG=dummy-org bundle exec rspec spec/command/generate_github_actions_spec.rb (40 examples, 0 failures); bundle exec rubocop spec/command/generate_github_actions_spec.rb (clean).

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Tip

For best results, initiate chat on the files or code changes.

@justin808 Clean final pass — all three addressed items are well-targeted:

  1. "default branch" correction — the technical distinction matters here; issue_comment events always run the workflow definition from the repo's default branch (not the PR's base), so the updated wording is both more accurate and less likely to confuse contributors debugging why their workflow edits on a feature branch don't take effect immediately.

  2. Tightened pr_open_help assertions — anchoring each check to the "- \+review-app-X` bullet prefix is the right granularity. It guards against a rename that leaves the bare command string somewhere else in the YAML while silently dropping it from the PR-open message bullets that users actually read.

  3. + prefix rationale in CHANGELOG — the collision-avoidance explanation (GitHub reserved slash-commands, other bots listening on /help, explicit namespacing) is a useful breadcrumb for anyone who later wonders why the + was chosen over /.

The deferral on the external-contributor silent no-op is a reasonable call for pre-stable — it's genuinely a UX design decision (PR-open summary vs. caveat text) that deserves its own focused discussion rather than a hasty last-minute patch.

40 examples, 0 failures and a clean RuboCop run are solid closing signals. Looks merge-ready from my side! ᶘ ᵒᴥᵒᶅ

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Tip

For best results, initiate chat on the files or code changes.

@justin808 Clean third pass — all three items are well-executed:

  1. "default branch" correction — the distinction matters: GitHub always resolves issue_comment workflow code from the repo's default branch regardless of which branch the PR targets, so the old wording was subtly misleading for anyone trying to understand why their PR-branch edits don't take effect immediately. Good catch propagating it to both cpflow-help.md and CONTRIBUTING.md.

  2. Bullet-prefix anchor form'"- \+review-app-X`'` is the right anchor given the YAML body-array entry format. It's stricter than a bare command-name check and still readable; a rename of just the bullet label (without touching the trigger condition) will now fail the spec.

  3. + prefix rationale in CHANGELOG — the slash-command collision context is useful background for anyone wondering why the namespace looks unusual; it's the kind of "why not /?" question that comes up in onboarding.

The deferral on the external-contributor silent no-op is the right call for a pre-stable release — it's a UX policy decision (caveat vs. summary vs. redirect) that deserves its own issue rather than a last-minute patch. Leaving the thread open is a good breadcrumb.

40 examples, 0 failures, RuboCop clean — looks ready to merge. 🎉

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Overall: clean and well-executed. More details in inline comments.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Overall: clean and well-executed. The rename rationale is sound, changes are consistent across all relevant files, and test coverage additions are appropriate.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Strengths:

  • Consistent rename -- all six touch-points (three workflow if: triggers, PR-open JS array, AI prompt, docs) updated together. No partial renames found.
  • Security model -- the new comment in cpflow-help-command.yml documents why workflow_dispatch lacks the author_association gate. Welcome clarification.
  • UX improvements -- shorter PR-open message, self-identifying help header, and <details> blocks for secrets/variables reduce noise for casual readers.
  • Contributing docs -- the gh workflow run --ref pattern fills a real gap; comment-triggered runs silently executing from default-branch was a non-obvious footgun.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Issue 1 -- Spec gap: cpflow-help.md command names not pinned

The new test pins trigger strings in workflow if: conditions and the JS array in cpflow-review-app-help.yml, but cpflow-help.md is not tested for the new command names. A future rename could update workflow triggers and miss the help text without a spec failure.

Suggest adding to the it block or a new one:

help_md = playground.join(".github/cpflow-help.md").read
expect(help_md).to include("`+review-app-deploy`")
expect(help_md).to include("`+review-app-delete`")
expect(help_md).to include("`+review-app-help`")

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Issue 2 -- Spec test name covers two distinct concerns

"pins the public +review-app-* PR comment trigger strings" asserts both workflow if: conditions and the PR-open comment body format. If the PR-open assertions fail, the error points at a test named "trigger strings" which is mildly confusing. Consider splitting into two it blocks or renaming to "pins the +review-app-* command strings in workflows and PR-open message".

Issue 3 -- Brittle JS-literal matching in spec (low priority)

Lines 237-239 match raw JS string literal syntax including the leading ":

expect(pr_open_help).to include('"- `+review-app-deploy`')

This is intentional but would silently break if the template switches from array-join to a heredoc or template literal. A brief comment explaining the leading " is part of the JS array element would prevent future maintainers from trimming it.

Minor nit: The CHANGELOG migration note says "update saved instructions or runbooks" -- consider also naming the generated .github/workflows/cpflow-*.yml files explicitly so users know exactly what to regenerate.

pr_open_help = pr_open_help_workflow_path.read
expect(pr_open_help).to include('"- `+review-app-deploy`')
expect(pr_open_help).to include('"- `+review-app-delete`')
expect(pr_open_help).to include('"- `+review-app-help`')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The leading " is load-bearing: it matches the opening quote of the JS array element in the template ("- \+review-app-deploy` - create or redeploy..."). A future maintainer reading this without context might trim it thinking it's a stray character. Worth a short comment here, and consider also extending the itblock with assertions oncpflow-help.md` itself:

# The leading " is the opening quote of the JS array string literal in cpflow-review-app-help.yml
expect(pr_open_help).to include('"- `+review-app-deploy`')

# Also pin command names in the long-form help markdown
help_md = playground.join(".github/cpflow-help.md").read
expect(help_md).to include("`+review-app-deploy`")
expect(help_md).to include("`+review-app-delete`")
expect(help_md).to include("`+review-app-help`")

Without the cpflow-help.md assertions a rename could update workflow triggers and miss the help text entirely.

expect(contents).to include('fs.readFileSync(".github/cpflow-help.md"')
end

it "pins the public +review-app-* PR comment trigger strings" do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test name "pins the public +review-app-* PR comment trigger strings" covers two distinct concerns: workflow if: trigger conditions (lines 232-234) and the PR-open comment body (lines 236-239). If the PR-open assertions fail the error message names a test called "trigger strings" which is mildly misleading. Consider splitting into two it blocks or broadening the name to "pins the +review-app-* command strings in workflows and PR-open message".

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Code Review

Overview

This PR renames the generated review-app PR comment triggers from /deploy-review-app, /delete-review-app, /help to the namespaced +review-app-deploy, +review-app-delete, +review-app-help family. It also shortens the PR-open comment, rewrites the help markdown with collapsible sections, and adds contributing documentation for working on the generator.

The rename is clean, well-reasoned (avoids GitHub's reserved / slash-command space and ambiguous /help collisions), and the breaking-change nature is clearly communicated in the CHANGELOG.


Correctness

Rename coverage is complete. Every touch-point is updated:

  • Workflow trigger if: conditions (deploy, delete, help)
  • Step summary message strings
  • AI rollout prompt (lib/command/ai_github_flow_prompt.rb)
  • All documentation files (docs/ci-automation.md, docs/ai-github-flow-prompt.md)
  • Changelog and contributing guide

A scan for old slash-command strings confirms none remain outside the CHANGELOG's migration note. ✅


Security

The security posture is unchanged and well-maintained:

  • author_association gating (OWNER | MEMBER | COLLABORATOR) is applied consistently to all three comment-triggered workflows.
  • The new comment in cpflow-help-command.yml correctly explains why workflow_dispatch is intentionally ungated (GitHub already requires actions: write for manual dispatches — stricter than COLLABORATOR).
  • pull_request_target usage in the PR-open workflow remains safe: no PR code is checked out, the job only posts a hardcoded message, and the existing safety comment is preserved.

Test Coverage

The three new spec examples pin the new command names across all three surfaces (workflow if: conditions, PR-open message, long-form help markdown). If a future template edit accidentally reverts a command name, CI will catch it immediately.

One minor observation on the PR-open spec (see inline comment).


Potential Issues

1. pull_request_target: [opened] doesn't cover reopened

The PR-open workflow only fires on the opened action. If a PR is closed and then reopened, the quick-reference comment won't be posted again. This is pre-existing behavior and likely acceptable (the comment lives in the PR history), but worth flagging as a known gap.

2. Exact-equality match UX friction

The github.event.comment.body == '+review-app-deploy' exact-match trigger is unchanged from before and is well-documented in the help text. However, GitHub's web UI sometimes appends a trailing newline to issue comments, which would silently no-op the command. Adding trimEnd() in the workflow condition (e.g. trimEnd(github.event.comment.body) == '+review-app-deploy') would make it more forgiving — optional improvement outside this PR's scope, but worth considering before 5.0.0 stable.

3. Placeholder inconsistency between the two gh workflow run doc sections

CONTRIBUTING.md uses <your-branch> and <pr> as placeholder tokens in the gh workflow run examples, while cpflow-help.md uses <your-pr-branch> and <pr-number>. Aligning them (preferably to the more descriptive <your-pr-branch> / <pr-number> form used in the help file) would be cleaner.


Summary

Well-executed, low-risk polish PR with clear rationale, thorough coverage, and solid test protection. The migration note is honest about the breaking change. Issues raised are minor nits — none are blockers.

Verdict: Approve with minor nits.


expect(pr_open_help).to include('"Repo owners, members, and collaborators can use these commands:"')
# The leading " is the opening quote of the JS array string literal in cpflow-review-app-help.yml.
expect(pr_open_help).to include('"- `+review-app-deploy`')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The leading " prefix in these assertions is coupling the test to the YAML JS array string-literal syntax. If the template is ever reformatted (e.g., single quotes or a template-literal instead of a JS array), these assertions will fail for a reason unrelated to the actual command name.

Consider asserting on the rendered content instead — e.g. check that the comment body that GitHub would receive contains the strings, not that the YAML source does:

Suggested change
expect(pr_open_help).to include('"- `+review-app-deploy`')
expect(pr_open_help).to include('`+review-app-deploy`')

The body value itself (+review-app-deploy) is what actually matters for the trigger; the surrounding YAML encoding is an implementation detail.

Comment thread CONTRIBUTING.md Outdated
- **Test PR-branch workflow edits in a real repo.** Comment-triggered runs (`+review-app-deploy`, `+review-app-delete`, `+review-app-help`) execute the workflow code from the repository's default branch, so they will not exercise your PR-branch changes. Generate the workflows into a downstream test repo, push to a feature branch, then dispatch each affected workflow with `gh`:

```sh
gh workflow run cpflow-deploy-review-app.yml --ref <your-branch> -f pr_number=<pr>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Placeholder naming differs from the matching block in lib/github_flow_templates/.github/cpflow-help.md, which uses <your-pr-branch> and <pr-number>. Aligning them reduces friction for readers comparing both docs:

Suggested change
gh workflow run cpflow-deploy-review-app.yml --ref <your-branch> -f pr_number=<pr>
gh workflow run cpflow-deploy-review-app.yml --ref <your-pr-branch> -f pr_number=<pr-number>

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 12, 2026

Code Review

Overview

Clean UX polish before 5.0.0 stable. The rename from /deploy-review-app+review-app-deploy (etc.) is well-motivated: + avoids GitHub's reserved / namespace and makes the three commands obviously a family. The trigger-matching improvement from exact string equality to contains(fromJson([...])) is a real bug fix — the old pattern silently no-oped when GitHub's comment editor appended a trailing newline, which is the default behavior.


What's well done

  • Trigger pattern upgradecontains(fromJson('["+review-app-deploy","+review-app-deploy\n","+review-app-deploy\r\n"]'), github.event.comment.body) is idiomatic for GitHub Actions and correctly handles both Unix (\n) and Windows (\r\n) trailing newlines. Strictly better than the old == '/deploy-review-app'.
  • Progressive disclosure in cpflow-help.md — moving workflow behavior above the <details> blocks means the most-needed content (commands + behavior) is immediately visible; config tables require a deliberate expand.
  • Migration note in CHANGELOG — explicit about the regeneration requirement and scoped correctly to rc.0 adopters.
  • Spec coverage — three new examples pin all four output surfaces (deploy workflow, delete workflow, help workflow, PR-open message, long-form markdown). The command_body_match_expression helper is a good DRY abstraction.
  • workflow_dispatch authorization rationale — the comment in cpflow-help-command.yml explaining why workflow_dispatch isn't gated on author_association is exactly the right level of documentation for a non-obvious security decision.

Issues

Minor — inconsistent punctuation in cpflow-help.md

The +review-app-help command description ends with a period; the equivalent bullets under +review-app-deploy and +review-app-delete do not. (See inline comment.)

Observation — \r-only line endings not covered

The pattern handles \n and \r\n but not bare \r. In practice, no browser-based GitHub comment editor produces bare \r, so this is not a real gap — just worth being aware of if the patterns are ever extended.

Observation — spec assertions are string-inclusion only

The new specs verify that command strings appear somewhere in the generated files, not that they're structurally in the correct position (e.g., inside the if: condition rather than a comment block). This is acceptable for a fully static template file, but a future regression that moved the expression into a comment string would pass the specs silently.


Verdict

No blocking issues. The rename is a net improvement to the UX surface, and the implementation is clean and consistent across all touch points. The migration note is appropriately scoped. Approving with the minor punctuation nit noted inline.

- Comment body must be exactly `+review-app-delete`, with no surrounding text or trailing spaces. A single trailing newline from GitHub's comment editor is accepted. Same command-match rule as `+review-app-deploy`.

`+review-app-help`
- Posts this message on the PR.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor punctuation inconsistency: this bullet ends with a period, but the equivalent first bullets under +review-app-deploy ("Creates the review app if it does not exist") and +review-app-delete ("Deletes the review app when the PR is done") do not.

Suggested change
- Posts this message on the PR.
- Posts this message on the PR

(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.body == '/deploy-review-app' &&
contains(fromJson('["+review-app-deploy","+review-app-deploy\n","+review-app-deploy\r\n"]'), github.event.comment.body) &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The contains(fromJson([...])) pattern is correct and handles GitHub's actual trailing-newline behavior well. One note for future maintainers: the three-element array covers the exact string, \n-terminated, and \r\n-terminated variants. If GitHub ever adds a leading/trailing space (e.g., from a mobile editor auto-correction), those would silently no-op. The help text already documents this boundary clearly, so this is just a heads-up rather than a request to change anything.

@justin808 justin808 merged commit b9583d8 into main May 12, 2026
12 checks passed
@justin808 justin808 deleted the jg-codex/review-app-command-ux branch May 12, 2026 05:32
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