# When does a GitHub pull request automatically close a linked issue?

Exam: GH-700 — Enhancing Operational Efficiency with Agentic AI (beta)
Knowledge domain: Use GitHub platform features (20–25%)
Updated: 2026-11-19T04:47:20.969763+00:00
HTML: https://learningpathx.com/faq/GH-700/gh700-pull-request-close-issue-default-branch.html

## Also asked as

- Why did a closing keyword in my GitHub pull request fail to close the issue?
- What conditions make a GitHub pull request close its referenced issue on merge?

A supported closing keyword in a pull request description links an issue when the pull request targets the repository's default branch; merging it into that branch closes the linked issue. If the pull request targets another branch, those description keywords are ignored for this behavior.

For an issue in the same repository, use a description such as `Closes #42`. For another repository, include the owner and repository, for example `Closes owner/repository#42`. Use an ordinary issue reference when you want context without requesting this automatic closure.

With repository write permission, you can also manually link a same-repository issue from the pull request's **Development** sidebar; merging that linked pull request into the default branch closes the issue. Closing keywords in a commit message can close an issue when that commit reaches the default branch, but the containing pull request is not then listed as a linked pull request through that commit keyword.

Before choosing a closing link, decide whether the proposal completes the whole issue or only contributes to it. After merging, inspect the actual issue state and link rather than inferring closure from a comment mention or project Done status. If closure did not occur, check the description, exact issue reference and target branch first.

References: [Linking a pull request to an issue - GitHub Docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue).

Source: [GH-700: Trace Business Work from Issues to Pull Requests](https://learningpathx.com/guide/GH-700/gh-700-trace-business-work-from-issues-to-pull-requests.html)
