-
Notifications
You must be signed in to change notification settings - Fork 3
Close issue #014 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Close issue #014 #12
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 14 | ||
| 15 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| id: "014" | ||
| assignee: "" | ||
| labels: | ||
| - bug | ||
| created: 2025-11-20T14:57:43.364376+09:00 | ||
| updated: 2025-11-20T15:14:10.062556+09:00 | ||
| --- | ||
|
|
||
| # Create new issue when close | ||
|
|
||
| ## Problem | ||
|
|
||
| Closing an issue with `gi close 004 -c` is creating a brand new issue file in `./.issues/open/` instead of only moving the existing one to `./.issues/closed/`. | ||
|
|
||
| Observed console output from `~/work/cargo-note-backend`: | ||
|
|
||
| ``` | ||
| gi close 004 -c | ||
| ✓ Closed issue #004 | ||
| [feat/balance-check 9901acb] Close issue #004 | ||
| 8 files changed, 630 insertions(+), 1 deletion(-) | ||
| rename .issues/{open => closed}/004-add-transaction-history-endpoint.md (100%) | ||
| create mode 100644 .issues/open/004-save-transaction-history-to-database.md | ||
| ... | ||
| ``` | ||
|
|
||
| ## Expected Behavior | ||
|
|
||
| - The close command should move the existing issue file from `./.issues/open/` to `./.issues/closed/` and stop there. | ||
| - No new issue files should be created during close, regardless of the issue title. | ||
|
|
||
| ## Actual Behavior | ||
|
|
||
| - The existing file was moved to `./.issues/closed/004-add-transaction-history-endpoint.md`. | ||
| - A new file `./.issues/open/004-save-transaction-history-to-database.md` was created alongside the move, leaving the issue appearing open again with a new slug. | ||
|
|
||
| ## Steps to Reproduce | ||
|
|
||
| 1. In a repo with `.issues/open/004-add-transaction-history-endpoint.md`, run `gi close 004 -c`. | ||
| 2. Inspect `.issues/open/` and `.issues/closed/`. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Ensure `gi close` only relocates the targeted issue file; it must not create any new `.issues/open/*.md` file as part of the operation. | ||
| - Preserve the original filename/slug when closing, even if the issue title has changed. | ||
| - Add a regression test that covers closing an issue after its title or slug has been modified. | ||
|
|
||
| ## Success Criteria | ||
|
|
||
| - [ ] Running `gi close 004 -c` results in exactly one file in `./.issues/closed/` for ID 004 and zero files in `./.issues/open/` with ID 004. | ||
| - [ ] Closing and reopening flows handle title changes without creating duplicate files. | ||
| - [ ] New test(s) fail on current main and pass after the fix. |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.