---
title: "How do you close issues automatically using pull requests?"  
description: "How do you close issues automatically using pull requests?"  
author: "Manish Sharma"  
published: 2025-07-08  
updated: 2025-07-20  
canonical: https://www.mindstick.com/forum/161803/how-do-you-close-issues-automatically-using-pull-requests  
category: "GitHub"  
tags: ["github", "git"]  
reading_time: 2 minutes  

---

# How do you close issues automatically using pull requests?

**How do you [close](https://yourviews.mindstick.com/story/1687/rubbing-hands-close-up-benefits) [issues](https://www.mindstick.com/articles/12944/mattresses-for-kids-and-mothers-should-meet-certain-criteria-issues-you-should-consider) automatically using pull requests?**

## Replies

### Reply by ICSM Computer

You can **automatically close GitHub issues using pull requests** by referencing the issue number with **specific keywords** in your pull request description or commit message. When the pull request is **merged into the default branch** (usually `main` or `master`), GitHub will automatically close the referenced issue.

### Syntax for Automatically Closing Issues

In your **pull request description** (or the merge commit message), use one of the following **keywords** followed by `#issue-number`:

- `Closes #123`
- `Fixes #123`
- `Resolves #123`

## Example:

```plaintext
This PR adds validation logic for coupon expiry time.
Fixes #42
```

This will **automatically close issue #42** once the PR is merged.

### Supported Keywords (case-insensitive)

| Keyword | Works Same As |
| --- | --- |
| close | closes |
| fix | fixes |
| resolve | resolves |

### Multiple Issues

You can reference **multiple issues** like this:

```plaintext
Fixes #12, closes #34, resolves #56
```

Or one per line:

```plaintext
Fixes #12
Closes #34
Resolves #56
```

### Important Notes

- **PR must be merged into the default branch** (not just any branch).
- **Only works in pull request descriptions or merge commit messages**, not individual commits unless squashed into merge.
- **Works only on GitHub (or GitHub Enterprise)**, not on GitLab or Bitbucket.

### Tip: Preview What Will Happen

GitHub will display a **linked issue preview** in the PR under the “Linked issues” section. If it says “will be closed when this pull request is merged,” it's set up correctly.


---

Original Source: https://www.mindstick.com/forum/161803/how-do-you-close-issues-automatically-using-pull-requests

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
