Extract shell scripts from commit-as-pull-request prompt#102
Merged
brunoborges merged 1 commit intomainfrom Feb 9, 2026
Merged
Extract shell scripts from commit-as-pull-request prompt#102brunoborges merged 1 commit intomainfrom
brunoborges merged 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\nExtract the inline git commands from the
commit-as-pull-request.prompt.mdinto 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— ParsesREPO_OWNERandREPO_NAMEfromgit 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\nThecommit-and-push.shandparse-repo-info.shscripts were used to create this very PR, confirming they work end-to-end."