GitHub provides a way to link issues to PRs. This is useful to see what PRs are associated with what issues. However, when you make this link, the issue will close when the PR is merged.
This is not a good idea because it can cause Issues to be closed prematurely. This can lead to confusion and lost work.
Luckily, GitHub provides a way to avoid this auto-closing behavior by disabling it in the repository settings.
Issues should not be closed until all the tasks are complete and have a done comment as per closing PBIs with context.
❌ Figure: Bad example - Linking Issues to PRs might cause premature closing
If your team prefers to keep the linking functionality but disable the auto-close behavior, repository administrators can now turn this off in the repository settings:
See Managing the automatic closing of issues in your repository for more details.