Skip to content

chore: Add GitHub Actions workflow to automatically close linked issues upon merging pull requests into the dev branch.#16

Merged
marvinjameserosa merged 1 commit intodevfrom
chore/15-close-issue-automation
Feb 6, 2026
Merged

chore: Add GitHub Actions workflow to automatically close linked issues upon merging pull requests into the dev branch.#16
marvinjameserosa merged 1 commit intodevfrom
chore/15-close-issue-automation

Conversation

@geraldsberongoy
Copy link
Copy Markdown
Contributor

@geraldsberongoy geraldsberongoy commented Feb 6, 2026

Auto Close Issue on Dev Merge

Description

This PR adds a GitHub Actions workflow that automatically closes linked issues when a pull request is merged into the dev branch. This automation streamlines our development workflow by reducing manual issue management overhead.

What's New

  • Automated Issue Closure: When a PR is merged to dev, any issues referenced with keywords (closes, fixes, resolves, etc.) in the PR description are automatically closed
  • Audit Trail: Adds a comment to each closed issue indicating which PR triggered the closure
  • Smart Detection: Uses regex pattern matching to find all linked issues in PR descriptions

Technical Details

Workflow Trigger:

  • Runs on pull_request events with type closed targeting the dev branch
  • Only executes if the PR was actually merged (not just closed)

Permissions:

  • issues: write - to close issues and add comments
  • pull-requests: read - to read PR body content

Supported Keywords:
The workflow recognizes the following keywords followed by #<issue_number>:

  • close, closes, closed
  • fix, fixes, fixed
  • resolve, resolves, resolved

Example Usage

In your PR description, simply reference issues like:
Closes #15 Fixes #23

Benefits

  • ✅ Reduces manual work for maintainers
  • ✅ Ensures issues are closed promptly when work is merged
  • ✅ Maintains clear traceability between PRs and issues
  • ✅ Improves project management workflow

Note: This workflow only affects the dev branch. Issues will be closed when PRs merge to dev, aligning with our development workflow where dev is the primary integration branch.

Closes #15

…es upon merging pull requests into the dev branch.
@geraldsberongoy geraldsberongoy linked an issue Feb 6, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@marvinjameserosa marvinjameserosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: implement auto close issue on dev branch merge

2 participants