Skip to content
LearningPathX
Learning PathsFree TestsExam InfoHow it worksNews
Sign inChoose a certification
  1. Home/
  2. Certifications/
  3. GH-700/
  4. GH-700 Learning Path/
  5. Study FAQs/
  6. When does a GitHub pull request automatically close a linked issue?

Study FAQ

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

Exam · GH-700Knowledge domain · Use GitHub platform features (20–25%)Updated Nov 19, 2026
Also asked as 2
  • 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?

Answer

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.

Full explanation

GH-700: Trace Business Work from Issues to Pull Requests

Study guide · GH-700

Read the full explanation →
← Back to GH-700 FAQsView learning path →

Related questions

When should I use table, board, or roadmap views in GitHub Projects? →How should I configure GitHub Projects for business planning? →How do I create a repository issue directly from GitHub Projects? →Why can Done in GitHub Projects differ from business completion? →Why can a GitHub project collaborator be unable to see private repository items? →Does assigning a GitHub issue or pull request mean the person approved it? →
LearningPathX

A focused path to certification, one clear step at a time.

© 2026 LearningPathX. All rights reserved.

Product

CertificationsLearning PathsFree TestsHow it worksNews

Company

SubscriptionHelp centerContact usPrivacyTerms

Follow us

Your privacy choices

We use analytics cookies to understand how LearningPathX is used and improve your learning experience. Analytics will only start after you accept.