Skip to content

Conversation

@GautamBytes
Copy link

@GautamBytes GautamBytes commented Jun 5, 2025

Description

This PR adds a GitHub Actions workflow to automatically close issues when related PRs are merged, improving project maintenance and issue tracking accuracy.

Fixes #169

Changes Made

  • Added: .github/workflows/close-issues.yml - GitHub Actions workflow file
  • Features:
    • Automatic issue closing when PRs are merged to main
    • Manual trigger option for batch closing issues
    • Proper error handling and logging
    • Comments added to closed issues for transparency

How It Works

Automatic Mode

  • Triggers when PRs are merged to main branch
  • Scans PR titles and descriptions for linking keywords:
    • fixes #123, closes #456, resolves #789
    • fix #123, close #456, resolve #789
  • Automatically closes referenced issues
  • Adds comment: "Automatically closed by PR #[PR_NUMBER]"

Manual Mode

  • Can be triggered manually from Actions tab
  • Allows batch closing of specific issues
  • Useful for cleaning up issues that were already fixed

Testing

  • Workflow follows existing project formatting standards (matches formatting.yml)
  • Uses built-in GITHUB_TOKEN (no additional permissions needed)
  • Includes comprehensive error handling for edge cases

Benefits

  • ✅ Reduces manual maintenance overhead
  • ✅ Keeps issue tracker accurate and organized
  • ✅ Follows GitHub best practices for issue linking
  • ✅ No process changes required for contributors
  • ✅ Flexible (both automatic and manual modes)

Future Usage

Contributors can continue using standard GitHub linking patterns in PRs:

This PR adds the new dashboard feature.

Fixes #45, closes #67

The workflow will handle the rest automatically!


Note: This addresses the current problem where multiple issues remain open despite being fixed in merged PRs, helping maintain better project organization.

@volcano-sh-bot volcano-sh-bot requested a review from Monokaix June 5, 2025 11:15
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign monokaix
You can assign the PR to them by writing /assign @monokaix in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@GautamBytes GautamBytes force-pushed the added-github-workflow branch from b21a41b to b30dc0c Compare June 5, 2025 11:26
@GautamBytes
Copy link
Author

/assign @Monokaix

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitHub Workflow to Automatically Close Issues

3 participants