Skip to content

issue.close

Close the issue itself, and remove the branch it was worked on.

An open pull request from the issue's branch keeps the branch and its worktree: deleting the head branch makes the forge close the pull request unmerged, and the branch may carry work for another issue. The close then ends the issue alone and names the pull request, to be merged or closed first. A forge that cannot say whether such a pull request is open keeps them too, and the line names the forge's error. A pull request that already merged means the work landed, the supplied reason no longer applies, and the close becomes cleanup: "issue already resolved". Otherwise the worktree, the local branch, and the remote branch are removed by default, with the removed head sha recorded in the close comment; --keep-branch retains them.

fm issue.close <ref> [--reason=VALUE] [--message=VALUE] [--keep-branch] [--discard]
Parameter Type Default Description
<ref> required
--reason=VALUE "" why: done, wontfix, duplicate, stale, ...
--message=VALUE "" free-text detail for the close comment
--keep-branch flag false retain the local and remote branch
--discard flag false destroy work that exists nowhere else

Example

$ fm issue.close <ref> --keep-branch