fixes #38 Improve close comment in manual-merge.sh#39
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
WalkthroughThe close comment message in manual-merge.sh was updated from a generic statement to include a direct URL reference to the script, providing readers with a clear link to understand how the merge conflict was resolved. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
manual-merge.sh (1)
169-169: LGTM — directly satisfies the issue requirement.The comment now matches the exact example from issue
#38and gives readers a clear trail to the recovery script.One optional consideration: the URL is hardcoded to
/blob/main/manual-merge.sh. If the script is ever renamed or relocated, this link will silently go stale. A dynamic alternative would be to derive the URL at runtime:gh CLI command to get remote repo URL♻️ Optional: derive URL dynamically from the git remote
- gh issue close "$issue" --comment "Fixed using https://github.com/SpiderStrategies/merge-bot/blob/main/manual-merge.sh" || log_warn " Failed to close issue #$issue" + REPO_URL=$(gh repo view --json url -q '.url') + gh issue close "$issue" --comment "Fixed using ${REPO_URL}/blob/main/manual-merge.sh" || log_warn " Failed to close issue #$issue"This keeps the comment accurate if the repo is ever forked or the remote changes, without touching any control flow.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@manual-merge.sh` at line 169, Update the hardcoded URL used in the gh issue close comment in manual-merge.sh so it’s derived at runtime instead of fixed to /blob/main/manual-merge.sh: determine the repository web URL from the git remote (e.g., via git remote get-url or gh repo view) and normalize it to an HTTPS GitHub browser URL, append the current branch/path to reference manual-merge.sh, then use that constructed URL in the gh issue close "$issue" --comment call; adjust the variable name near the existing gh issue close invocation so the script builds and injects the dynamic URL rather than the hardcoded one.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@manual-merge.sh`:
- Line 169: Update the hardcoded URL used in the gh issue close comment in
manual-merge.sh so it’s derived at runtime instead of fixed to
/blob/main/manual-merge.sh: determine the repository web URL from the git remote
(e.g., via git remote get-url or gh repo view) and normalize it to an HTTPS
GitHub browser URL, append the current branch/path to reference manual-merge.sh,
then use that constructed URL in the gh issue close "$issue" --comment call;
adjust the variable name near the existing gh issue close invocation so the
script builds and injects the dynamic URL rather than the hardcoded one.
Closes #38
Made with Cursor