151 Commits

Author SHA1 Message Date
Sameen Karim d5bb33e489 additional lock file test 2026-03-25 21:57:22 -04:00
Sameen Karim 629ea06d70 non-blocking saves for non-critical writes 2026-03-25 21:21:26 -04:00
Sameen Karim 37e32a5137 only lock for writes 2026-03-25 20:39:48 -04:00
Sameen Karim 211e563d1f lock failure exit code 2026-03-25 20:06:18 -04:00
Sameen Karim e568d7f005 add file locking to prevent concurrent stack file edits 2026-03-25 19:14:00 -04:00
Sameen Karim 0f6746456d Merge pull request #6 from github/skarim/ghes-custom-hostname-support
support custom hostnames
2026-03-25 18:05:03 -04:00
Sameen Karim 865b4704d7 support custom hostnames for ghes 2026-03-25 17:35:16 -04:00
Sameen Karim e7fdf6dd9c Merge pull request #5 from github/skarim/fix-initial-branch-prefix
fix: initial branch missing prefix
2026-03-25 17:33:34 -04:00
Sameen Karim 0b9293a4cb disallow prefix or numbered flags with adopt 2026-03-25 16:13:08 -04:00
Sameen Karim 569c63577f assert runInit success 2026-03-25 16:07:56 -04:00
Sameen Karim 3aa8c8eda3 consolidated prefix input and validation 2026-03-25 15:48:32 -04:00
Sameen Karim 103fc37383 fix for initial branch missing prefix 2026-03-25 15:10:00 -04:00
Sameen Karim 90eb9994dd Merge pull request #4 from github/skarim/agent-skill-improvements
Update SKILL.md instructions for branch naming and git ops
2026-03-25 10:00:49 -04:00
Sameen Karim 1e7f19c583 rebase after squash merge clarifications 2026-03-25 09:43:43 -04:00
Sameen Karim 408eecf18e clarify staging changes across branches 2026-03-25 09:36:47 -04:00
Sameen Karim b3811441ce clearer prefix instructions 2026-03-25 09:27:05 -04:00
Sameen Karim 4e0263f146 Merge pull request #3 from github/copilot/fix-github-actions-workflow-release
fix: correct ldflags quoting in release workflow
2026-03-25 00:09:03 -04:00
copilot-swe-agent[bot] c4caac744a fix: use = syntax in go_build_options ldflags to avoid word-splitting
The release workflow was passing `-ldflags '-X ...'` via `go_build_options`,
which gets set as the `GO_BUILD_OPTIONS` environment variable. In
`build_and_release.sh`, this variable is expanded unquoted (`${GO_BUILD_OPTIONS}`),
so bash word-splits it on spaces. Single quotes inside an unquoted variable
expansion are literal characters, not shell quotes - causing `'-X` (with the
literal quote character) to be passed as the value for `-ldflags`, which is
invalid.

Fix: use `-ldflags=-X=path.Var=value` (no spaces, single token) so bash word
splitting produces exactly one argument. The `=` syntax is supported by both
the Go build tool (for `-ldflags`) and the Go linker (for `-X`).

Co-authored-by: skarim <1701557+skarim@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-stack/sessions/7f8aece9-d05c-478e-8864-ff0b5e00b3a8
2026-03-25 03:44:16 +00:00
copilot-swe-agent[bot] 5cb96cf1a8 Initial plan 2026-03-25 03:37:16 +00:00
Sameen Karim de206825d6 Merge pull request #1 from github/skarim/gh-stack-prototype
Stacks CLI prototype with core operations
2026-03-24 23:31:59 -04:00
Sameen Karim c26f8b0dfa use correct var in error msg 2026-03-24 23:10:04 -04:00
Sameen Karim b2ba2c224e throw error for non-numeric args 2026-03-24 23:09:24 -04:00
Sameen Karim d5fcf12415 update gh-stack file schema 2026-03-24 23:08:50 -04:00
Sameen Karim 0c088446ed clean up go.mod 2026-03-24 17:57:45 -04:00
Sameen Karim b53bc7ad69 mock gh api client for tests 2026-03-24 17:54:56 -04:00
Sameen Karim b99f7257e0 set release version via ldflags 2026-03-24 17:29:39 -04:00
Sameen Karim 0869244c12 fix for help output properly showing "gh stack" 2026-03-24 17:08:54 -04:00
Sameen Karim 0c27492b71 more test coverage and clean up 2026-03-24 16:44:35 -04:00
Sameen Karim f03f9f3335 fix: return early from sync on rebase conflict
When a rebase conflict was detected during 'gh stack sync', the function
continued to push branches and reported 'Stack synced' with exit code 0.
Now it persists PR state and returns ErrConflict immediately, preventing
the confusing post-conflict push and success message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 15:13:13 -04:00
Sameen Karim 30584211db default to named branches, numbering is a flag set on init 2026-03-24 14:00:23 -04:00
Sameen Karim 309e12a8ab skills file for agents 2026-03-24 11:08:35 -04:00
Sameen Karim 1304670224 flag to specify remote and bypass interactive prompt 2026-03-24 01:36:05 -04:00
Sameen Karim d6e6db7a45 json output mode for view 2026-03-24 01:13:10 -04:00
Sameen Karim 260497643a exit codes by error type 2026-03-24 00:38:04 -04:00
Sameen Karim 6e9927d124 rm update pr base logic, should all happen on server 2026-03-23 04:46:55 -04:00
Sameen Karim 1a1f49f2fb exit with nonzero status on error 2026-03-23 04:22:45 -04:00
Sameen Karim 50fdc33683 support commit msg editor, update stage all flag to match git commit, better error handling 2026-03-23 03:54:12 -04:00
Sameen Karim 14364a2408 waterfall pr lookup by url, number, branch name 2026-03-22 21:28:50 -06:00
Sameen Karim 426ad11175 wrap example commands in quotes for non TTY 2026-03-22 20:27:37 -06:00
Sameen Karim 24e18bd088 Handle SIGINT gracefully during interactive prompts
When Ctrl+C is pressed during a prompter interaction, the CLI now prints
a friendly 'Received interrupt, aborting operation' message instead of
ugly wrapped errors like 'failed to read prefix: could not prompt:
interrupt'.

Changes:
- Add isInterruptError(), printInterrupt(), and errInterrupt sentinel
  to cmd/utils.go for centralized interrupt detection
- Update all 8 prompt sites (init, push, checkout, utils) to detect
  survey's terminal.InterruptErr and exit cleanly
- Update callers of resolveStack, pickRemote, and ensureRerere to
  propagate interrupt without double-printing errors
- Change ensureRerere signature to return error so callers can abort
  on interrupt
- Add tests for interrupt detection helpers

Closes td-746bdc

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 20:26:26 -06:00
Sameen Karim 0a55e35b8b block adopting branches with existing PRs 2026-03-22 17:11:48 -06:00
Sameen Karim 5ea2ec8cb3 clean up chained branches display 2026-03-22 16:45:28 -06:00
Sameen Karim 47d1a3faa2 use full commit sha 2026-03-22 14:20:14 -07:00
Sameen Karim 7144d88d70 politely enable rerere and cache decline 2026-03-22 14:01:16 -07:00
Sameen Karim 7bb5ca271c move active branch indices to stack 2026-03-22 09:38:08 -07:00
Sameen Karim d22f0c3377 clearer wording in navigate 2026-03-22 09:18:11 -07:00
Sameen Karim 22fa202522 shared loadStack helper for all cmds 2026-03-22 08:52:03 -07:00
Sameen Karim e874e26374 push all branches atomically and resolve remotes 2026-03-21 23:35:39 -07:00
Sameen Karim 627832dcd0 rm placeholders 2026-03-19 13:22:58 -04:00
Sameen Karim 9d2a7cf8dd use multiline commit msgs for pr body 2026-03-19 12:39:34 -04:00