Skip to content

Extract shell scripts from commit-as-pull-request prompt#102

Merged
brunoborges merged 1 commit intomainfrom
refactor/extract-pr-workflow-scripts
Feb 9, 2026
Merged

Extract shell scripts from commit-as-pull-request prompt#102
brunoborges merged 1 commit intomainfrom
refactor/extract-pr-workflow-scripts

Conversation

@brunoborges
Copy link
Member

Summary\n\nExtract the inline git commands from the commit-as-pull-request.prompt.md into reusable shell scripts. This simplifies the prompt from 10 steps down to 6, with the git plumbing delegated to scripts that handle edge cases (branch collisions, push verification, formatter detection).\n\n## Changes\n\n- .github/scripts/ci/parse-repo-info.sh — Parses REPO_OWNER and REPO_NAME from git remote get-url origin (supports HTTPS and SSH)\n- .github/scripts/ci/commit-and-push.sh — Verifies changes exist, optionally runs Spotless, creates branch (with collision handling), stages, commits, and pushes\n- .github/scripts/ci/sync-after-merge.sh — Checks out main, pulls, and deletes the feature branch\n- .github/prompts/commit-as-pull-request.prompt.md — Rewritten to reference the scripts; reduced from 10 steps to 6\n\n## Testing\n\nThe commit-and-push.sh and parse-repo-info.sh scripts were used to create this very PR, confirming they work end-to-end."

Move git operations into reusable scripts under .github/scripts/ci/:
- parse-repo-info.sh: extract owner/repo from remote URL
- commit-and-push.sh: verify, format, branch, commit, push
- sync-after-merge.sh: sync main and delete branch

Simplify the prompt from 10 steps to 6 by delegating to scripts.
@brunoborges brunoborges merged commit 9cbe437 into main Feb 9, 2026
2 checks passed
@brunoborges brunoborges deleted the refactor/extract-pr-workflow-scripts branch February 16, 2026 15:43
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.

1 participant