Interview Prep/Git & GitHub/Remotes, Collaboration and Pull Requests

You want a PR merge to close an issue automatically.

BeginnerScenarioRemotes, Collaboration and Pull Requests
Answer

Situation read → GitHub supports closing keywords.

What I'd do →

  1. In the PR description or a commit message, write Closes #231 (also Fixes, Resolves).
  2. Use Closes ORG/REPO#231 for another repo.
  3. Merge into the default branch; the issue closes automatically.
  4. Or link manually in the PR's Development sidebar.

Why → Closing keywords only fire when the PR targets the default branch.

Interview tip → For release branches, close issues manually or via workflow.

All Git & GitHub questions Roadmap: Git & GitHub

More on Remotes, Collaboration and Pull Requests